-
Notifications
You must be signed in to change notification settings - Fork 380
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
Translations #345
Comments
Hi @simonsan, I would love to see the infrastructure used elsewhere. We will eventually publish the i18n helpers (google/comprehensive-rust#462), but for now I recommend installing them with cargo install --git https://github.com/google/comprehensive-rust i18n-helpers |
Published now as https://github.com/google/mdbook-i18n-helpers 🚀 |
It will probably still take some time until we can fully adopt it, as it seems like that Markdown formatting isn't transferred in the translation process. Afaiu that could destroy the ability to further translate things within a language, when we would reformat the original markdown. Tracking: google/mdbook-i18n-helpers#19 |
You are correct: the Markdown text is copied as-is to the PO files. So if you mass-format it, the translations will stop working. My work arounds for this are:
I hope to write a tool for the second option soon since I plan to standardize the formatting of my own Markdown files. |
Thanks for the clarification <3 |
Maybe I should clarify that the mdbook-i18n-helpers extract the text on a per-paragraph basis right now. So changes only invalidate a single paragraph at a time. If you add/remove a few words in a paragraph, Gettext will do a good job at finding the old paragraph when you update your |
Comprehensive Rust has developed a nice translation mechanism for mdbook books: https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md
We could make some research on how to adapt to that workflow making it possible to translate
Rust patterns
to different languages.Newer simplified Chinese could be the starter.
The text was updated successfully, but these errors were encountered: