You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a mdbook-gettext renderer collects the text from the entire book and outputs a messages.pot file which is ready to be translated
a translate preprocessor uses a xx.po file (with translations) to translate the text on-the-fly into an output language.
Hooking into mdbook like this seems nice: I don't need to know about where the Markdown files are on disk and I can reuse things such as BookItem.
However, I don't need the renderer and the preprocessor most of the time: I only need them when publishing a new version. It would therefore be nice if mdbook build would have new command line options which lets me enable/disable the renderer and preprocessor.
Does that sound like a reasonable idea? I think mdbook serve should have the same options.
My workaround right now is to modify the book.toml file to enable the renderer and preprocessor when needed.
The text was updated successfully, but these errors were encountered:
We had a discussion in google/comprehensive-rust#1998 about a similar topic: how can we include configuration for a renderer (mdbook-pandoc in this case) without requiring that everybody installs the dependencies for the renderer?
One solution would be to let mdbook build and serve take a list of renderer to use. That would be a subset of the renderers configured in book.toml.
Another solution just occurred to me: we could extract the configuration that isn't used all the time to a separate file. When we want to use it, we do something like
I'm adding support for translations to https://github.com/google/comprehensive-rust/ — via the code I posted in #1864. My plan is to do this via a renderer and a preprocessor:
mdbook-gettext
renderer collects the text from the entire book and outputs amessages.pot
file which is ready to be translatedtranslate
preprocessor uses axx.po
file (with translations) to translate the text on-the-fly into an output language.Hooking into mdbook like this seems nice: I don't need to know about where the Markdown files are on disk and I can reuse things such as
BookItem
.However, I don't need the renderer and the preprocessor most of the time: I only need them when publishing a new version. It would therefore be nice if
mdbook build
would have new command line options which lets me enable/disable the renderer and preprocessor.Does that sound like a reasonable idea? I think
mdbook serve
should have the same options.My workaround right now is to modify the
book.toml
file to enable the renderer and preprocessor when needed.The text was updated successfully, but these errors were encountered: