Skip to content

Add translation into the official repository #196

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
dalance opened this issue Jul 26, 2024 · 6 comments
Closed

Add translation into the official repository #196

dalance opened this issue Jul 26, 2024 · 6 comments

Comments

@dalance
Copy link

dalance commented Jul 26, 2024

This is only suggestion.
I'm a contributer of Japanese translation of RBE, and worked to merge Japanese translation into the official repository.
I think merging into the official has some advantages than the independent repository.

  • [As translator] Fixes in the official will be reflected immediately
  • [As translator] Tracking the official and searching the changes are not required
  • [As user] The official URL (https://doc.rust-lang.org/rust-by-example/) can be used
  • [As user] Through language selector in the page, language can be changed like from your language to English and vise versa

If you are interesting in this suggestion, please see https://github.com/rust-lang/rust-by-example/blob/master/TRANSLATING.md.
I can support you, if you have any question.

@Binlogo
Copy link

Binlogo commented Aug 16, 2024

This is only suggestion. I'm a contributer of Japanese translation of RBE, and worked to merge Japanese translation into the official repository. I think merging into the official has some advantages than the independent repository.

  • [As translator] Fixes in the official will be reflected immediately
  • [As translator] Tracking the official and searching the changes are not required
  • [As user] The official URL (https://doc.rust-lang.org/rust-by-example/) can be used
  • [As user] Through language selector in the page, language can be changed like from your language to English and vise versa

If you are interesting in this suggestion, please see https://github.com/rust-lang/rust-by-example/blob/master/TRANSLATING.md. I can support you, if you have any question.

Awesome job and great suggestion 👍. Thank you for bringing this up. I believe that multi-language official support for Rust books, especially for entry-level resources like RBE, will significantly enhance the learning experience for users. With the language selector on the page, users can more easily stay updated with the latest English version. I'd like to help here.

cc @YangFong What do you think?

@YangFong
Copy link
Member

It's fun, I'll try it.

@Binlogo
Copy link

Binlogo commented Aug 18, 2024

@YangFong Great, thanks for your reply and I'm glad you're interested as well. Following @dalance's suggestion and guidance, I've started a try. Here's some research for your information:

Current Status

  • This rust-by-example-cn repo is not a fork of the original official source. It has significantly enhanced the user experience and differs greatly from the upstream version.
  • According to TRANSLATING.md at the official repo, it uses the Gettext system for translations, making it difficult to easily import and use our existing translations.

Therefore, merging this repo directly into the official repository is challenging. I've initiated a fork from the original repository to prepare for adding a Chinese translation.

Declaration: I am not currently a member of the [rust-lang-cn] organization, so I forked it under my personal account. However, I highly recommend that we create a new fork directly from the official repository. @YangFong, if possible, let's create a fork under the [rust-lang-cn] organization as [rust-lang-cn/rust-by-example], allowing us to collaborate on the new repo and add the Chinese translation to the official repository together.


Actions Tracking

@YangFong
Copy link
Member

@Binlogo Ok, I invite you to join the organization, please check whether you can fork your branch into the organization, if not, please contact me, I will fork the operation. Thank you for your help.

@mgeisler
Copy link

  • According to TRANSLATING.md at the official repo, it uses the Gettext system for translations, making it difficult to easily import and use our existing translations.

Hi there 👋 😄 I developed the mdbook-i18n-helpers plugin used by the Japanese translation.

Converting two Markdown files (in two different languages, say, English and Chinese) back to a PO file is something we have looked at google/mdbook-i18n-helpers#30.

It is not something that can be 100% automated, but it should be possible to write a tool that will match up distinctive markers such as headings and list items and then use this to guess what belong together.

The output would be a rough starting point. Even with perfect matching, mdbook-i18n-helpers requires the original language to be the source of truth. This means that if there are completely new pages in the Chinese translation, then they will disappear unless you write an English page to "attach" it to. The same happens on the level of headings, list items, and even individual table cells.

I ran into this for Comprehensive Rust and worked with the translators to "port" their additions back to the English text. It's basically a more strict system than a free-form clone.

@Binlogo
Copy link

Binlogo commented Oct 17, 2024

Following the guidance from Rust by Example's translation instructions, all steps have been completed, and the RBE Chinese translation has been deployed nightly. We can now close this issue and mark it as resolved. 🎉

@Binlogo Binlogo closed this as completed Oct 17, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants