google / mdbook-i18n-helpers

Translation support for mdbook. The plugins here give you a structured way to maintain a translated book.
Apache License 2.0
127 stars 25 forks source link

Allow formatting in the `SUMMARY.md` file #100

Closed mgeisler closed 10 months ago

mgeisler commented 11 months ago

This first changes mdbook-xgettext so that formatting is preserved from the SUMMARY.md file.

Next, mdbook-gettext is changed to translate text from the SUMMARY.md file without formatting: this is necessary since mdbook strips formatting before sending the TOC to the preprocessor.

Fixes #66.

mgeisler commented 11 months ago

TODO: I would like to add an end-to-end test of this: something which verifies that what we extract in mdbook-xgettext works with what mdbook-gettext expects.

mgeisler commented 10 months ago

TODO: I would like to add an end-to-end test of this: something which verifies that what we extract in mdbook-xgettext works with what mdbook-gettext expects.

I suppose the unit tests here are good enough — and we'll be testing this soon enough in Comprehensive Rust.

mgeisler commented 10 months ago

@dyoo, does this look reasonable to you?