Expand description
Helpers for translating mdbook
projects.
The functions here are used to implement a robust
internationalization (i18n) workflow for mdbook
. This allows you
to translate your books into other languages while also making it
easy to keep the translations up to date as you edit the original
source text.
See https://github.com/google/mdbook-i18n-helpers for details on
how to use the supplied mdbook
plugins.
Modules§
- directives
- gettext
- This file contains main logic used by the binary
mdbook-gettext
. - normalize
- Normalize the Markdown in a PO or POT file.
- preprocessors
- renderers
- xgettext
- This file contains main logic used by the binary
mdbook-xgettext
.
Structs§
Enums§
- Group
- Markdown events grouped by type.
Functions§
- extract_
events - Extract Markdown events from
text
. - extract_
messages - Extract translatable strings from
document
. - group_
events - Group Markdown events into translatable and skipped events.
- new_
cmark_ parser - Like
mdbook::utils::new_cmark_parser
, but also passes aBrokenLinkCallback
. - reconstruct_
markdown - Render a slice of Markdown events back to Markdown.
- translate_
events - Translate
events
usingcatalog
. - trim_
paragraph - Trim
new_events
if they’re wrapped in an unwanted paragraph. - wrap_
sources - Re-wrap the sources field of a message.