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

Combining with i18n-helpers from Comprehensive Rust? #32

Open
mgeisler opened this issue Mar 19, 2023 · 1 comment
Open

Combining with i18n-helpers from Comprehensive Rust? #32

mgeisler opened this issue Mar 19, 2023 · 1 comment

Comments

@mgeisler
Copy link

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).

@mgeisler
Copy link
Author

mgeisler commented Apr 4, 2023

I've published the plugins in a separate repository for now: https://github.com/google/mdbook-i18n-helpers.

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

1 participant