@@ -7,7 +7,7 @@ How to use the translation infrastructure with your `mdbook` project.
77Run
88
99``` shell
10- $ cargo install mdbook-i18n-helpers
10+ cargo install mdbook-i18n-helpers
1111```
1212
1313to install three binaries:
@@ -77,7 +77,7 @@ To extract the original text and generate a `messages.pot` file, you run
7777` mdbook ` with the ` mdbook-xgettext ` renderer:
7878
7979``` shell
80- $ MDBOOK_OUTPUT=' {"xgettext": {"pot-file": "messages.pot"}}' \
80+ MDBOOK_OUTPUT=' {"xgettext": {"pot-file": "messages.pot"}}' \
8181 mdbook build -d po
8282```
8383
@@ -89,7 +89,7 @@ To start a new translation for a fictional `xx` locale, first generate the
8989` po/messages.pot ` file. Then use ` msginit ` to create a ` xx.po ` file:
9090
9191``` shell
92- $ msginit -i po/messages.pot -l xx -o po/xx.po
92+ msginit -i po/messages.pot -l xx -o po/xx.po
9393```
9494
9595You can also simply copy ` po/messages.pot ` to ` po/xx.po ` if you don't have
@@ -110,7 +110,7 @@ the `po/xx.po` file with new messages, first extract the source text into a
110110` po/messages.pot ` template file. Then run
111111
112112``` shell
113- $ msgmerge --update po/xx.po po/messages.pot
113+ msgmerge --update po/xx.po po/messages.pot
114114```
115115
116116Unchanged messages will stay intact, deleted messages are marked as old, and
@@ -153,7 +153,7 @@ To use the `po/xx.po` file for your output, you simply set `book.language` to
153153` xx ` . You can do this on the command line:
154154
155155``` shell
156- $ MDBOOK_BOOK__LANGUAGE=xx mdbook build -d book/xx
156+ MDBOOK_BOOK__LANGUAGE=xx mdbook build -d book/xx
157157```
158158
159159This will set the book's language to ` xx ` and store the generated files in
@@ -165,7 +165,7 @@ Like normal, you can use `mdbook serve` to view your translation as you work on
165165it. You use the same command as with ` mdbook build ` above:
166166
167167``` shell
168- $ MDBOOK_BOOK__LANGUAGE=xx mdbook serve -d book/xx
168+ MDBOOK_BOOK__LANGUAGE=xx mdbook serve -d book/xx
169169```
170170
171171To automatically reload the book when you change the ` po/xx.po ` file, add this
0 commit comments