mdbook-i18n
mdbook-i18n copied to clipboard
Combining with i18n-helpers from Comprehensive Rust?
Hi there!
I have been wondering how I can use this plugin for i18n on a Rust course I published last year: https://github.com/google/comprehensive-rust.
The course is translated using a system I wrote myself. I created to mdbook plugins: a preprocessor (which does the translation) and a renderer (which extracts the text to translate). They live in the i18n-helpers directory and I plan to publish them as an independent project to make it easy for people to reuse them.
The preprocessor translates into a single language, so I simply run it once per language. If I understand the mdbook-i18n preprocessor correctly, it automates this and runs mdbook build once per language in output.i18n.translations.
Would you be up for combining this somehow?
I've been thinking of extending my helpers with a mdbook-i18n command which would do more or less what your renderer does: calling mdbook build repeatedly for each translation. That way I'm sure to get all the settings from book.toml applied, which I need in order to invoke the mdbook-gettext preprocessor which does the actual translation (plus any other custom preprocessors people have enabled).
I've published the plugins in a separate repository for now: https://github.com/google/mdbook-i18n-helpers.