-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fa: add Persian/Farsi language #1042
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Hi @DannyRavi, thanks for getting this started! I updated the PR description to mention #671 — if you do that in the coming PRs, then they'll automatically be listed on that issue. We can merge this when you sign the CLA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial translation to Farsi
theme/index.hbs
Outdated
@@ -1,5 +1,5 @@ | |||
<!DOCTYPE HTML> | |||
<html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}"> | |||
<html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the revert — let's also take out the extra space so that the file is completely untouched 😄
<html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}"> | |
<html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}"> |
po/fa.po
Outdated
|
||
#: src/SUMMARY.md:10 | ||
msgid "Rust Ecosystem" | ||
msgstr "اکو سیستم Rsut" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgstr "اکو سیستم Rsut" | |
msgstr "اکوسیستم Rsut" |
po/fa.po
Outdated
|
||
#: src/SUMMARY.md:20 | ||
msgid "What is Rust?" | ||
msgstr "زبان رااست چیه؟" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgstr "زبان رااست چیه؟" | |
msgstr "زبان رااست چیست؟" |
po/fa.po
Outdated
|
||
#: src/SUMMARY.md:22 | ||
msgid "Small Example" | ||
msgstr "یه مثال ساده" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgstr "یه مثال ساده" | |
msgstr "یک مثال ساده" |
po/fa.po
Outdated
|
||
#: src/SUMMARY.md:23 | ||
msgid "Why Rust?" | ||
msgstr "چرا رااست؟" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgstr "چرا رااست؟" | |
msgstr "چرا Rust؟" |
To be consistent , since you have not written Rust in Persian alphabet.
po/fa.po
Outdated
|
||
#: src/SUMMARY.md:32 | ||
msgid "Slices" | ||
msgstr "برشها" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding Slice in parenthesis, unless برش is a familiar term for software engineers.
po/fa.po
Outdated
|
||
#: src/SUMMARY.md:143 | ||
msgid "From and Into" | ||
msgstr "از و به داخل" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't translate these. These are trait names.
po/fa.po
Outdated
|
||
#: src/SUMMARY.md:144 | ||
msgid "Read and Write" | ||
msgstr "خواندن و نوشتن" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, trait names. Don't translate. The same applies to Drop and Default.
po/fa.po
Outdated
|
||
#: src/SUMMARY.md:158 | ||
msgid "Propagating Errors with ?" | ||
msgstr "انتشار خطاها با چه روشی؟" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"?" is an operator.
msgstr "انتشار خطاها با چه روشی؟" | |
msgstr "انتشار خطاها با استفاده از عملگر ؟" |
po/fa.po
Outdated
|
||
#: src/SUMMARY.md:168 | ||
msgid "Integration Tests" | ||
msgstr "تست های یک پارچه" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this is the correct translation.
po/fa.po
Outdated
|
||
#: src/SUMMARY.md:170 | ||
msgid "Unsafe Rust" | ||
msgstr "رااست ناامن" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't translate this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your suggestions.
All suggestions have been made.
@DannyRavi Thanks for taking the initiative. I have left some comments, but I did not get to go through the entire translation. Can you split this PR into smaller ones? That way it will be a lot easier to review it. |
Thanks a lot @rbehjati! @DannyRavi, I reached out internally to see if I could find someone speaking Persian to skim over the PR. The test output says
So most of the file is just empty — as expected since this is the initial import. @DannyRavi I suggest you commit the suggestions by @rbehjati and avoid adding more strings to the file just now. We need to get it committed first so that you and others can update it in smaller PRs going forward. A PR per file or top-level directory can work well. @rbehjati if the PR looks okay, then I suggest we merge it ASAP and move onto smaller PRs going forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I had a quick look at the rest of the translation and it generally looks good to me.
I see that translating Box and Crate is becoming tricky. My general advice is to keep the original English words for keywords and first class concepts of the language. Learners will eventually want to write code, and knowing the original English words will make that easier for them.
I know that some other translations have kept the English word as well — and some have added it in parenthesis after the translation. I'm happy with either approach. You could consider starting a discussion about it to hear what others think. |
Thanks. I think in some cases it is good to have a translation, with the original English word in parenthesis, but sometimes it is better to avoid a translation all together (unless it is for fun ;)). I leave it to @DannyRavi to start a discussion. |
* A partial translation into Farsi
A simple start to add Persian language to "comprehensive-rust" book
Part of #671.