async-book
async-book copied to clipboard
i18n question
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?
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).
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.
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)
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).
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
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
Traditional Chinese translation is also available. And here is the forked repo. We are really looking forward to any form of i18n supports.
Russian translation completed, deployed here: https://doc.rust-lang.ru/async-book
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:
- en: https://funkill.github.io/async-book-i18n/en
- ru: https://funkill.github.io/async-book-i18n/ru
- zh-tw: https://funkill.github.io/async-book-i18n/zh-tw
- zh-cn: https://funkill.github.io/async-book-i18n/zh-cn
UPD: For this example repo language hardcoded in custom theme, change language button placed in top right near print button.
@cramertj Can we include translations to this repository and build all books with i18n render?
That sounds fine to me!
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:
- Gather translated contents
- Modify the CI file, add environment for every
%lang%
- build with corresponding
%lang%
contents. then serve to theasync-book/%lang%/
site.
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.
Ok. So let me find out how to solve the conflict when merge with master's CI.