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

Add book.translations to support translation preprocessors #2029

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jooyunghan
Copy link

Related to #5

When set, build runs a renderer for each translations after setting
book.language to a subdirectory.

For example, when it's set ["ko", "ja"], mdbook build -d book will
generate the output:

book/
  (default output)
  ko/
    (ko output)
  ja/
    (ja output)

This enables translation to be handled by preprocessors. For example, it
could be PO-file based translation based on book.language.

When set, `build` runs a renderer for each translations after setting
`book.language` to a subdirectory.

For example, when it's set `["ko", "ja"]`, `mdbook build -d book` will
generate the output:

```
book/
  (default output)
  ko/
    (ko output)
  ja/
    (ja output)
```

This enables translation to be handled by preprocessors. For example, it
could be PO-file based translation based on `book.language`.
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Feb 22, 2023
Jooyung Han added 4 commits February 22, 2023 15:19
When linking between translations, we can use `path_html` instead of
changing .md to .html with `path`.
`cargo test` and `cargo fmt --check` pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants