@@ -8,6 +8,12 @@ source code.
8
8
the Markdown docs (reference manual, tutorials, etc.) distributed with
9
9
this git repository.
10
10
11
+ [ po4a] ( http://po4a.alioth.debian.org/ ) is required for generating translated
12
+ docs from the master (English) docs.
13
+
14
+ [ GNU gettext] ( http://www.gnu.org/software/gettext/ ) is required for managing
15
+ the translation data.
16
+
11
17
# Building
12
18
13
19
To generate all the docs, just run ` make docs ` from the root of the repository.
@@ -38,3 +44,40 @@ http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
38
44
39
45
A nice quick reference (for non-pandoc markdown) is at:
40
46
http://kramdown.rubyforge.org/quickref.html
47
+
48
+ # Notes for translators
49
+
50
+ To start the translation for a new language, see po4a.conf at first.
51
+
52
+ To generate .pot and .po files, do something like:
53
+
54
+ ~~~~
55
+ po4a --copyright-holders="The Rust Project Developers" \
56
+ --package-name="Rust" \
57
+ --package-version="0.10-pre" \
58
+ -M UTF-8 -L UTF-8 \
59
+ po4a.conf
60
+ ~~~~
61
+
62
+ (the version number must be changed if it is not 0.10-pre now.)
63
+
64
+ Now you can translate documents with .po files, commonly used with gettext. If
65
+ you are not familiar with gettext-based translation, please read the online
66
+ manual linked from http://www.gnu.org/software/gettext/ . We use UTF-8 as the
67
+ file encoding of .po files.
68
+
69
+ When you want to make a commit, do the command below before staging your
70
+ change:
71
+
72
+ ~~~~
73
+ for f in doc/po/**/*.po; do
74
+ msgattrib --untranslated $f -o $f.strip
75
+ if [ -e $f.strip ]; then
76
+ mv $f.strip $f
77
+ else
78
+ rm $f
79
+ fi
80
+ done
81
+ ~~~~
82
+
83
+ This removes untranslated entries from .po files to save disk space.
0 commit comments