Skip to content
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

Merged
merged 9 commits into from
Aug 9, 2023
Merged

fa: add Persian/Farsi language #1042

merged 9 commits into from
Aug 9, 2023

Conversation

DannyRavi
Copy link
Collaborator

@DannyRavi DannyRavi commented Jul 30, 2023

A simple start to add Persian language to "comprehensive-rust" book

Part of #671.

@google-cla
Copy link

google-cla bot commented Jul 30, 2023

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.

@mgeisler mgeisler changed the title add Persian/Farsi language to comprehensive-rust fa: add Persian/Farsi language Jul 31, 2023
@mgeisler
Copy link
Collaborator

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.

@mgeisler mgeisler mentioned this pull request Jul 31, 2023
Copy link
Collaborator Author

@DannyRavi DannyRavi left a 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 Show resolved Hide resolved
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 }}">
Copy link
Collaborator

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 😄

Suggested change
<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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "اکو سیستم Rsut"
msgstr "اکوسیستم Rsut"

po/fa.po Outdated

#: src/SUMMARY.md:20
msgid "What is Rust?"
msgstr "زبان رااست چیه؟"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "زبان رااست چیه؟"
msgstr "زبان رااست چیست؟"

po/fa.po Outdated

#: src/SUMMARY.md:22
msgid "Small Example"
msgstr "یه مثال ساده"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "یه مثال ساده"
msgstr "یک مثال ساده"

po/fa.po Outdated

#: src/SUMMARY.md:23
msgid "Why Rust?"
msgstr "چرا رااست؟"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 "برش‌ها"
Copy link
Collaborator

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 "از و به داخل"
Copy link
Collaborator

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 "خواندن و نوشتن"
Copy link
Collaborator

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 "انتشار خطاها با چه روشی؟"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"?" is an operator.

Suggested change
msgstr "انتشار خطاها با چه روشی؟"
msgstr "انتشار خطاها با استفاده از عملگر ؟"

po/fa.po Outdated

#: src/SUMMARY.md:168
msgid "Integration Tests"
msgstr "تست های یک پارچه"
Copy link
Collaborator

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 "رااست ناامن"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't translate this.

Copy link
Collaborator Author

@DannyRavi DannyRavi Aug 8, 2023

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.

@rbehjati
Copy link
Collaborator

rbehjati commented Aug 8, 2023

@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.

@mgeisler
Copy link
Collaborator

mgeisler commented Aug 8, 2023

@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

303 translated messages, 1 fuzzy translation, 1466 untranslated messages.

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.

Copy link
Collaborator

@rbehjati rbehjati left a 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.

@mgeisler
Copy link
Collaborator

mgeisler commented Aug 9, 2023

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.

@rbehjati
Copy link
Collaborator

rbehjati commented Aug 9, 2023

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.

@rbehjati rbehjati merged commit c674d39 into google:main Aug 9, 2023
30 checks passed
yohcop pushed a commit to yohcop/comprehensive-rust that referenced this pull request Sep 12, 2023
* A partial translation into Farsi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants