Skip to content

Commit e0b9822

Browse files
committed
---
yaml --- r: 148261 b: refs/heads/try2 c: 1ba61b9 h: refs/heads/master i: 148259: 16d162a v: v3
1 parent 0222135 commit e0b9822

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 729715779a904860fb75898b0f6df89d0c675ab1
8+
refs/heads/try2: 1ba61b915b39cd81deb24b782906e3cf5f409944
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ source code.
88
the Markdown docs (reference manual, tutorials, etc.) distributed with
99
this git repository.
1010

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+
1117
# Building
1218

1319
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
3844

3945
A nice quick reference (for non-pandoc markdown) is at:
4046
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

Comments
 (0)