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

i18n question #26

Open
huangjj27 opened this issue Jul 28, 2019 · 14 comments
Open

i18n question #26

huangjj27 opened this issue Jul 28, 2019 · 14 comments

Comments

@huangjj27
Copy link
Contributor

I'm about to write a Chinese Translation of this book(I have a translated version for the old book), and I found that mdbook can use multilanguage feature, So is it a good time to start i18n works now?

@funkill
Copy link
Contributor

funkill commented Jul 28, 2019

Officially mdbook not support i18n. PR by gambhiro with i18n was rejected.

Also i agree with idea of starting i18n works now.

We (in Russian community) start translation of this book and use GitLocalize for tracking changes (our translatioin on GitLocalize, i can add other languages for test this tool).

@cramertj
Copy link
Member

cramertj commented Aug 2, 2019

That would be awesome! I know nothing about i18n + mdbook, but I'd be happy to do anything I can to help make this book more accessible to folks.

@funkill
Copy link
Contributor

funkill commented Aug 2, 2019

Currently i don't understand development flow of mdbook, but i want add i18n to mdbook for start using i18n in TRPL and other official books. (I suggest using GitLocalize or other tool for TRPL here, after that we started testing of GitLocalize)

@huangjj27
Copy link
Contributor Author

huangjj27 commented Aug 3, 2019

I tried GitLocalize and consider it ok for translation. As for the publication of localized document, we can use CI to copy only the translated documents and build it as a github page. However, I don't know how to make the translations linked to the original one(translation as a subpage of the original book).

@funkill
Copy link
Contributor

funkill commented Aug 3, 2019

However, I don't know how to make the translations linked to the original one(translation as a subpage of the original book).

With current version of mdbook (without l10n) - nothing. Mdbook (with l10n) must create crooslinks between translations

@huangjj27
Copy link
Contributor Author

Simplified Chinese translation is on here, making CI work by replacing the src directory on CI with the translated one.

In order to get update from upstream to my fork, I don't translate the docs on the original files, but copy them to a new directores that can be recognized by GitLocalize. It should be much more easier for both translating and reviewing.

Progess is slow for pure-hand-typed translation

@weihanglo
Copy link
Member

Traditional Chinese translation is also available. And here is the forked repo. We are really looking forward to any form of i18n supports.

@funkill
Copy link
Contributor

funkill commented Aug 30, 2019

Russian translation completed, deployed here: https://doc.rust-lang.ru/async-book

@funkill
Copy link
Contributor

funkill commented Sep 6, 2019

Hi all!

I wrote very simple i18n plugin for mdbook. This plugin has some limitations, e.g. it don't support cross links between translations but in future i want add that.

Also i create example repo with "Async book" and deploy created books with that plugin:

UPD: For this example repo language hardcoded in custom theme, change language button placed in top right near print button.

@funkill
Copy link
Contributor

funkill commented Nov 20, 2019

@cramertj Can we include translations to this repository and build all books with i18n render?

@cramertj
Copy link
Member

That sounds fine to me!

@huangjj27
Copy link
Contributor Author

I get an idea, that we may use GitLocalize to put translated content into src_%lang% directories, then we serve translation under https://rust-lang.github.io/async-book/%lang%/. Here are the steps:

  1. Gather translated contents
  2. Modify the CI file, add environment for every %lang%
  3. build with corresponding %lang% contents. then serve to the async-book/%lang%/ site.

@taiki-e
Copy link
Member

taiki-e commented Aug 1, 2020

As said in #63, I'd prefer not to include translations directly in this repo.

I'd prefer not to include translations directly in this repo because we can't immediately propagate changes made in English versions to other language versions and have no bandwidth to maintain them.

Instead, I would accept a PR to add a page for links to translations, like rust/book's translations appendix.

@huangjj27
Copy link
Contributor Author

Ok. So let me find out how to solve the conflict when merge with master's CI.

Jimskapt added a commit to Jimskapt/async-book-fr that referenced this issue Dec 29, 2021
taiki-e pushed a commit that referenced this issue Dec 29, 2021
huangjj27 pushed a commit to huangjj27/async-book that referenced this issue Jun 25, 2022
huangjj27 pushed a commit to huangjj27/async-book that referenced this issue Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants