You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-16 22:27:34 +02:00
remove $ from code blocks in translations
This commit is contained in:
@ -31,7 +31,7 @@ You will need the [Gettext] utilities (`msginit`, `msgmerge`). Under Debian and
|
||||
Ubuntu, you can install with:
|
||||
|
||||
```shell
|
||||
$ sudo apt install gettext
|
||||
sudo apt install gettext
|
||||
```
|
||||
|
||||
Ensure you can build the book, and that `mdbook serve` works. For this, follow
|
||||
@ -56,7 +56,7 @@ To extract the original English text and generate a `messages.pot` file, you run
|
||||
`mdbook` with a special renderer:
|
||||
|
||||
```shell
|
||||
$ MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' \
|
||||
MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' \
|
||||
mdbook build -d po
|
||||
```
|
||||
|
||||
@ -68,7 +68,7 @@ To start a new translation, first generate the `po/messages.pot` file. Then use
|
||||
`msginit` to create a `xx.po` file for the fictional `xx` language:
|
||||
|
||||
```shell
|
||||
$ msginit -i po/messages.pot -l xx -o po/xx.po
|
||||
msginit -i po/messages.pot -l xx -o po/xx.po
|
||||
```
|
||||
|
||||
You can also simply copy `po/messages.pot` to `po/xx.po`. Then update the file
|
||||
@ -100,7 +100,7 @@ the `po/xx.po` file with new messages, first extract the English text into a
|
||||
`po/messages.pot` template file. Then run
|
||||
|
||||
```shell
|
||||
$ msgmerge --update po/xx.po po/messages.pot
|
||||
msgmerge --update po/xx.po po/messages.pot
|
||||
```
|
||||
|
||||
Unchanged messages will stay intact, deleted messages are marked as old, and
|
||||
@ -129,7 +129,7 @@ output.
|
||||
To use the `po/xx.po` file for your output, run the following command:
|
||||
|
||||
```shell
|
||||
$ MDBOOK_BOOK__LANGUAGE=xx mdbook build -d book/xx
|
||||
MDBOOK_BOOK__LANGUAGE=xx mdbook build -d book/xx
|
||||
```
|
||||
|
||||
This will update the book's language to `xx`, it will make the `mdbook-gettext`
|
||||
@ -142,7 +142,7 @@ Like normal, you can use `mdbook serve` to view your translation as you work on
|
||||
it. You use the same command as with `mdbook build` above:
|
||||
|
||||
```shell
|
||||
$ MDBOOK_BOOK__LANGUAGE=xx mdbook serve -d book/xx
|
||||
MDBOOK_BOOK__LANGUAGE=xx mdbook serve -d book/xx
|
||||
```
|
||||
|
||||
When you update the `po/xx.po` file, the translated book will automatically
|
||||
|
Reference in New Issue
Block a user