Internationalization support via mdbook-i18n-helper
* include links to the github sources * prepare hint on howto create other language versions
This commit is contained in:
43
README.md
43
README.md
@@ -2,10 +2,10 @@
|
||||
|
||||
![Welcome to the element-call book.][element_call_book]
|
||||
|
||||
This repository contains the text source for `The Element-Call` book.
|
||||
This repository contains the text source for "The Element-Call" book.
|
||||
We will further reference to it as the `Element-Call Book`.
|
||||
|
||||
[element_call_book]: https://gitea.networkx.de/rzerres/element-call-book/src/branch/main/src/img/element-call-1.png
|
||||
[element_call_book]: https://gitea.networkx.de/rzerres/element-call-book/src/branch/main/src/img/element-call-webui.png
|
||||
<!--
|
||||
WIP: once it is ready to be shipped
|
||||
[The book is available in dead-tree form from No Starch Press][nostarch].
|
||||
@@ -46,22 +46,35 @@ some process flows.
|
||||
|
||||
[crates.io]: https://crates.io/crates/cargo-readme
|
||||
|
||||
##### Multilingual version of mdBook
|
||||
The `Element-Call` book aims to make translations as flawless as
|
||||
possible. We are using v0.4.12 that will do the job. There is a
|
||||
patch available that adds the needed salt to organize a book as a
|
||||
multilingual structure: All sources stored in a single hirachical
|
||||
code tree. This work isn't finished yet, but good enough to make
|
||||
use of this branch for our productive needs. Thank you [Nutomic
|
||||
and Ruin0x11][mdbook localization].
|
||||
|
||||
You can force the installation of a given version number
|
||||
with:
|
||||
If you need a given version of `mdbook`, you may force it's
|
||||
installation the following call:
|
||||
|
||||
```rust
|
||||
console $ cargo install mdbook --vers 0.4.12 mdbook-linkchecker mdbook-mermaid
|
||||
console $ cargo install mdbook --vers 0.4.40 mdbook-linkchecker mdbook-mermaid
|
||||
```
|
||||
|
||||
##### Multilingual version of mdBook
|
||||
|
||||
The `Element-Call` book aims to make translations as flawless as
|
||||
possible. With [`mdbook-i18n-helpers`][mdbook_i18n_helpers] you gain
|
||||
`Gettext Translation Support` with three extensions.
|
||||
|
||||
```console
|
||||
$ cargo install mdbook-i18n-helpers
|
||||
```
|
||||
|
||||
It will install three binaries:
|
||||
|
||||
* mdbook-xgettext: This program extracts the source text. It is an mdbook renderer.
|
||||
* mdbook-gettext: This program translates the book into a target language.
|
||||
It is an mdbook preprocessor.
|
||||
* mdbook-i18n-normalize: This program normalizs a PO file. Use it after breaking changes.
|
||||
|
||||
Please have a look to the online documentation on howto actually use the Gettext subsystem.
|
||||
|
||||
[mdbook_i18n_helpers]: https://github.com/google/mdbook-i18n-helpers?tab=readme-ov-file
|
||||
[mdbook_i18n_helpers_usage]: https://github.com/google/mdbook-i18n-helpers/blob/main/i18n-helpers/USAGE.md
|
||||
|
||||
##### Cargo handled README
|
||||
|
||||
We do make uses of the crate [cargo-readme]. It resolves rust `doc
|
||||
@@ -125,6 +138,7 @@ To run the tests:
|
||||
$ mdbook test
|
||||
```
|
||||
|
||||
<!--
|
||||
##### Building a language variant of the book
|
||||
|
||||
Translated version of the book will be placed inside the code tree
|
||||
@@ -139,6 +153,7 @@ $ MDBOOK_BOOK__src=src/de mdbook build --dest-dir book/de --open
|
||||
|
||||
The rendered HTML output will be placed underneath the
|
||||
`book/de` subdirectory. Since we appended the `--open` parameter, your default browser should be fired up and ... tada!
|
||||
!-->
|
||||
|
||||
#### 🛠️ Development
|
||||
==================
|
||||
|
||||
Reference in New Issue
Block a user