-
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
Persian translation #671
Comments
Let me know if/when you run into rust-lang/mdBook#1486 — then we'll have to work on adding good support for right-to-left languages in mdbook. |
sure, on it. thanks pal @mgeisler |
@DannyRavi, I tried out the translation in #1042 and the text looks like this out of the box: Adding Does this look more correct to you? I cannot read it, so it's hard for me to judge how it looks 🙂 Ideally, we should fix this in the upstream mdbook project (rust-lang/mdBook#1486), but we can perhaps prototype a fix for them here and then contribute it upstream. I'm thinking we can simply use different |
Before starting the translation of the texts. I noticed that the book has a problem with right-to-left texts according to links #1486 and #671 |
Hi @DannyRavi, could you test locally with modified theme/index.hbs
@@ -1,5 +1,5 @@
<!DOCTYPE HTML>
-<html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}">
+<html lang="{{ language }}" dir="rtl" class="sidebar-visible no-js {{ default_theme }}">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8"> This simply adds the |
Hey @DannyRavi, @mbpouri, and @javad-jafari — would you be able to review each other's PRs? We have #1209 (by @DannyRavi) and #1341 (by @javad-jafari) open right now. |
Hey there, i just saw this issue and the work you guys all are doing, that mean a lot to Persian community, Thank you all. Can we use custom font for Persian translation? it's not pretty good. I'm available to change and fix it if you are okay with it. |
@DannyRavi @mbpouri I just checked some of translations and it seems there is a good amount of ZWNG missing in translations, let's fix them before merge to ensure a good quality text. |
Hi @hamidrezakp, thanks for joining in!
Awesome! If you can write a PR which tweaks the CSS, then I would be happy to add it! We should ultimately add this upstream in https://github.com/rust-lang/mdBook/ since we're relying on the right-to-left support recently added there (rust-lang/mdBook#1641). If the fix/improvement is clear, then I suggest adding it upstream directly. Otherwise we can also modify our CSS and theme as needed. Just let me know. |
If we can find 2-3 people who are interested in reviewing, then add yourself to the CODEOWNERS file. That way you'll be auto-added to future PRs and will thus be able to do everything yourself — @henrif75 and myself should not really be involved in the Persian translation 😄 |
So let me open an issue there and ask them if we can use custom fonts for Persian language; if not, we add it here. |
Yeah you are right 😄 it's just impossible for you to review or check translations, I think i can find some friends in Persian Rust community that are willing to be maintainer here. |
Hey folks, so existed about this. |
@hamidrezakp I see there is a problem with the #1209 and I see no change in that PR. |
I've just made a look. I see lots of not related changes (mostly code style and text formatting, new lines, etc...). Besides that I see that a lot of chapters are not translated.I want to know is there a bigger plan to split chapters and assign the task of translation of each chapter to one person? I rather get involved in the translation itself and start making a bigger picture of who is translating which parts. I'll start translating the "Day 2" morning. (from chapter 12 to 17) and open a new PR. |
Yeah i agree but maybe you can just check last commit (although it contains a lot of non-related things to translation and that's because of poor formatting i guess). Anyways, That's a good idea to split the translation task into smaller chunks and more organized so contributors can easily pick 'em up and translate. If you can open a draft PR that mentions what you are working on would be great. |
Hi @hamidrezakp . |
@DannyRavi my suggestion is using |
@DannyRavi @mehrad77 |
If the poor formatting is about lines being re-wrapped in strange ways, then we have a solution for that: we recently (#1359) introduced a GitHub check which requires PO files to be formatted consistently. This boils down to following the preparation section of TRANSLATIONS.md and then running
Btw, I've found that using
is very quick and shows me that changes of #1341 in a nice way. |
Great idea! Feel free to use the discussions here or any other convenient place! |
First of all, special thanks to @mgeisler for adding dir="rtl|ltr" to the html template When you add dir="rtl" to html, the page direction will be right to left, but what about the English text (or any other LTR text) between the contents (or vice versa)? For example, In #1413 , I proposed a simple way to handle it with theme but not the most suitable way for doing it. It's better to mention it here as well. |
Thanks @moaminsharifi for looking at this. As I wrote in #1413, I think we should first understand if the right-to-left support works okayish for fully-translated pages. If it does, then the problem you point out is a temporary problem — if it doesn't, then I would need help from people here to find a good solution. |
@mgeisler, For the time being, I think we should close that github issue #1413 until the pages are completely translated, then check it out again. |
Part of #671 **Summary of changes:** - Persian version of book messages synced to original book - Translate sidebar menu * I just translate and double check until `# src/SUMMARY.md:333` part*
Part of #671 Summary of changes: - Translate Part 1,2 - Recheck `#, fuzzy` lines and synced their translations Co-authored-by: Kaveh <hamidrkp@riseup.net>
Hi @moaminsharifi, the svgbob images disappeared from the translation pipeline with google/mdbook-i18n-helpers#75 by @dyoo: we now only translate a code block if it contains We should restore this and google/mdbook-i18n-helpers#76 is in some sense about this problem: with that feature implemented, we should be able to say "always translate Note that our text extraction tooling will become more fine-grained with google/mdbook-i18n-helpers#109, which will be merged later today or tomorrow after a small rebase. |
Part of: #671 #1433 ## Issue: When we render SVG tags in persian ( `<html dir="rtl" ...>`) make confiliect: ![svg-rtl-issue](https://github.com/google/comprehensive-rust/assets/11869014/ce825736-4367-41fa-acd3-6e395926d7c7) originally: *[7.2 Arrays and for Loops](https://google.github.io/comprehensive-rust/exercises/day-1/for-loops.html#arrays-and-for-loops)* ![svg-rtl-issue-2](https://github.com/google/comprehensive-rust/assets/11869014/0a494392-2407-47ec-91f1-0098414b83d3) originally: *[16.2 Moved Strings in Rust](https://google.github.io/comprehensive-rust/ownership/moved-strings-rust.html)* ## Proposed method: as we talked in #1433, again in there adding ``` [dir="rtl"] svg { direction: ltr; } ``` fix issue like: ![svg-rtl-issue-fix](https://github.com/google/comprehensive-rust/assets/11869014/5d82c413-709a-42dd-b24b-1ff2c8be55ba) ![svg-rtl-issue-2-fixture](https://github.com/google/comprehensive-rust/assets/11869014/da2bf319-212e-4edd-9135-82f51e5e0381)
Amazing work done here by @DannyRavi, @alix1383, @javad-jafari! When you're ready, please add a link to the language drop-down. |
Congratulations! I've created a new issue #2435 and I'll send a PR soon. |
Adds Farsi to the drop-down language selector and minor rearrangement on Translation page #671
Hi @mbpouri, here is an issue for you!
I don't see any translation on https://doc.rust-lang.org/book/appendix-06-translation.html, but perhaps there is a Persian Rust community somewhere where you can find translations of common words 😄
The translation is live at https://google.github.io/comprehensive-rust/fa/.
The text was updated successfully, but these errors were encountered: