Skip to content

Commit d150f6b

Browse files
committed
auto merge of #11507 : omasanori/rust/reduce-po, r=alexcrichton
This work is done by execute these commands manually: $ po4a --copyright-holders="The Rust Project Developers" \ --package-name="Rust" \ --package-version="0.10-pre" \ -M UTF-8 -L UTF-8 \ doc/po4a.conf $ for f in doc/po/**/*.po; do > msgattrib --untranslated $f -o $f.strip > if [ -e $f.strip ]; then > mv $f.strip $f > else > rm $f > fi > done It should be managed by the build system automatically to use in our translation workflow, but I've not yet done that. At least one mostly-translated (over 80% translation rate) document is needed to test the translation workflow, so I'll working on Japanese translation.
2 parents 9dbbfb8 + 006d169 commit d150f6b

23 files changed

+3847
-13137
lines changed

doc/README.md

+46
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,43 @@ 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+
Notice: The procedure described below is a work in progress. We are working on
51+
translation system but the procedure contains some manual operations for now.
52+
53+
To start the translation for a new language, see po4a.conf at first.
54+
55+
To generate .pot and .po files, do something like:
56+
57+
~~~~
58+
po4a --copyright-holder="The Rust Project Developers" \
59+
--package-name="Rust" \
60+
--package-version="0.10-pre" \
61+
-M UTF-8 -L UTF-8 \
62+
po4a.conf
63+
~~~~
64+
65+
(the version number must be changed if it is not 0.10-pre now.)
66+
67+
Now you can translate documents with .po files, commonly used with gettext. If
68+
you are not familiar with gettext-based translation, please read the online
69+
manual linked from http://www.gnu.org/software/gettext/ . We use UTF-8 as the
70+
file encoding of .po files.
71+
72+
When you want to make a commit, do the command below before staging your
73+
change:
74+
75+
~~~~
76+
for f in doc/po/**/*.po; do
77+
msgattrib --translated $f -o $f.strip
78+
if [ -e $f.strip ]; then
79+
mv $f.strip $f
80+
else
81+
rm $f
82+
fi
83+
done
84+
~~~~
85+
86+
This removes untranslated entries from .po files to save disk space.

doc/po/ja/complement-cheatsheet.md.po

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# Japanese translations for Rust package
2+
# Copyright (C) 2014 The Rust Project Developers
3+
# This file is distributed under the same license as the Rust package.
4+
# Automatically generated, 2014.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: Rust 0.10-pre\n"
9+
"POT-Creation-Date: 2014-01-13 12:01+0900\n"
10+
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
11+
"Last-Translator: Automatically generated\n"
12+
"Language-Team: none\n"
13+
"Language: ja\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Plural-Forms: nplurals=1; plural=0;\n"
18+
19+
#. type: Plain text
20+
#: doc/complement-cheatsheet.md:13
21+
#, fuzzy
22+
#| msgid ""
23+
#| "~~~~ let x: f64 = 4.0; let y: uint = x as uint; assert!(y == 4u); ~~~~"
24+
msgid "~~~ let x: int = 42; let y: ~str = x.to_str(); ~~~"
25+
msgstr ""
26+
"~~~~\n"
27+
"let x: f64 = 4.0;\n"
28+
"let y: uint = x as uint;\n"
29+
"assert!(y == 4u);\n"
30+
"~~~~"
31+
32+
#. type: Plain text
33+
#: doc/complement-cheatsheet.md:17
34+
#, fuzzy
35+
#| msgid ""
36+
#| "[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz [win-exe]: "
37+
#| "http://static.rust-lang.org/dist/rust-0.7-install.exe"
38+
msgid ""
39+
"Use [`FromStr`](http://static.rust-lang.org/doc/master/std/from_str/trait."
40+
"FromStr.html), and its helper function, [`from_str`](http://static.rust-lang."
41+
"org/doc/master/std/from_str/fn.from_str.html)."
42+
msgstr ""
43+
"[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz\n"
44+
"[win-exe]: http://static.rust-lang.org/dist/rust-0.7-install.exe"
45+
46+
#. type: Plain text
47+
#: doc/complement-cheatsheet.md:22
48+
#, fuzzy
49+
#| msgid ""
50+
#| "~~~~ let x: f64 = 4.0; let y: uint = x as uint; assert!(y == 4u); ~~~~"
51+
msgid "~~~ let x: Option<int> = from_str(\"42\"); let y: int = x.unwrap(); ~~~"
52+
msgstr ""
53+
"~~~~\n"
54+
"let x: f64 = 4.0;\n"
55+
"let y: uint = x as uint;\n"
56+
"assert!(y == 4u);\n"
57+
"~~~~"
58+
59+
#. type: Plain text
60+
#: doc/complement-cheatsheet.md:29
61+
#, fuzzy
62+
#| msgid "~~~~ use std::task::spawn;"
63+
msgid "~~~ use std::num::ToStrRadix;"
64+
msgstr ""
65+
"~~~~\n"
66+
"use std::task::spawn;"
67+
68+
#. type: Plain text
69+
#: doc/complement-cheatsheet.md:33
70+
#, fuzzy
71+
#| msgid ""
72+
#| "~~~~ let x: f64 = 4.0; let y: uint = x as uint; assert!(y == 4u); ~~~~"
73+
msgid "let x: int = 42; let y: ~str = x.to_str_radix(16); ~~~"
74+
msgstr ""
75+
"~~~~\n"
76+
"let x: f64 = 4.0;\n"
77+
"let y: uint = x as uint;\n"
78+
"assert!(y == 4u);\n"
79+
"~~~~"
80+
81+
#. type: Plain text
82+
#: doc/complement-cheatsheet.md:37
83+
#, fuzzy
84+
#| msgid ""
85+
#| "[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz [win-exe]: "
86+
#| "http://static.rust-lang.org/dist/rust-0.7-install.exe"
87+
msgid ""
88+
"Use [`FromStrRadix`](http://static.rust-lang.org/doc/master/std/num/trait."
89+
"FromStrRadix.html), and its helper function, [`from_str_radix`](http://"
90+
"static.rust-lang.org/doc/master/std/num/fn.from_str_radix.html)."
91+
msgstr ""
92+
"[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz\n"
93+
"[win-exe]: http://static.rust-lang.org/dist/rust-0.7-install.exe"
94+
95+
#. type: Plain text
96+
#: doc/complement-cheatsheet.md:40
97+
#, fuzzy
98+
#| msgid "~~~~ use std::task::spawn;"
99+
msgid "~~~ use std::num::from_str_radix;"
100+
msgstr ""
101+
"~~~~\n"
102+
"use std::task::spawn;"
103+
104+
#. type: Plain text
105+
#: doc/complement-cheatsheet.md:46
106+
#, fuzzy
107+
#| msgid "## Operators"
108+
msgid "# File operations"
109+
msgstr "## 演算子"
110+
111+
#. type: Plain text
112+
#: doc/complement-cheatsheet.md:54
113+
#, fuzzy
114+
#| msgid "~~~~ use std::task::spawn;"
115+
msgid "~~~ {.xfail-test} use std::path::Path; use std::io::fs::File;"
116+
msgstr ""
117+
"~~~~\n"
118+
"use std::task::spawn;"
119+
120+
#. type: Plain text
121+
#: doc/complement-cheatsheet.md:63
122+
#, fuzzy
123+
#| msgid ""
124+
#| "[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz [win-exe]: "
125+
#| "http://static.rust-lang.org/dist/rust-0.7-install.exe"
126+
msgid ""
127+
"Use the [`lines`](http://static.rust-lang.org/doc/master/std/io/trait.Buffer."
128+
"html#method.lines) method on a [`BufferedReader`](http://static.rust-lang."
129+
"org/doc/master/std/io/buffered/struct.BufferedReader.html)."
130+
msgstr ""
131+
"[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz\n"
132+
"[win-exe]: http://static.rust-lang.org/dist/rust-0.7-install.exe"
133+
134+
#. type: Plain text
135+
#: doc/complement-cheatsheet.md:77
136+
#, fuzzy
137+
#| msgid "## Using other crates"
138+
msgid "# String operations"
139+
msgstr "## 他のクレートの利用"
140+
141+
#. type: Plain text
142+
#: doc/complement-cheatsheet.md:88 doc/guide-container.md:4
143+
#, fuzzy
144+
msgid "# Containers"
145+
msgstr "## 本書の表記について"
146+
147+
#. type: Plain text
148+
#: doc/complement-cheatsheet.md:176
149+
#, fuzzy
150+
#| msgid "[The foreign function interface][ffi]"
151+
msgid "# FFI (Foreign Function Interface)"
152+
msgstr "[他言語間インターフェース (foreign function inferface)][ffi]"

doc/po/ja/complement-lang-faq.md.po

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Japanese translations for Rust package
2+
# Copyright (C) 2014 The Rust Project Developers
3+
# This file is distributed under the same license as the Rust package.
4+
# Automatically generated, 2014.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: Rust 0.10-pre\n"
9+
"POT-Creation-Date: 2014-01-13 12:01+0900\n"
10+
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
11+
"Last-Translator: Automatically generated\n"
12+
"Language-Team: none\n"
13+
"Language: ja\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Plural-Forms: nplurals=1; plural=0;\n"
18+
19+
#. type: Plain text
20+
#: doc/complement-lang-faq.md:83
21+
#, fuzzy
22+
#| msgid ""
23+
#| "[bug-3319]: https://github.com/mozilla/rust/issues/3319 [wiki-start]: "
24+
#| "https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust"
25+
msgid ""
26+
"[rustc]: https://github.com/mozilla/rust/tree/master/src/librustc [resolve]: "
27+
"https://github.com/mozilla/rust/blob/master/src/librustc/middle/resolve.rs "
28+
"[borrowck]: https://github.com/mozilla/rust/blob/master/src/librustc/middle/"
29+
"borrowck/"
30+
msgstr ""
31+
"[bug-3319]: https://github.com/mozilla/rust/issues/3319\n"
32+
"[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-"
33+
"developing-Rust"
34+
35+
#. type: Plain text
36+
#: doc/complement-lang-faq.md:110
37+
#, fuzzy
38+
#| msgid ""
39+
#| "[bug-3319]: https://github.com/mozilla/rust/issues/3319 [wiki-start]: "
40+
#| "https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust"
41+
msgid ""
42+
"[unwind]: https://github.com/mozilla/rust/issues/908 [libgcc]: https://"
43+
"github.com/mozilla/rust/issues/1603"
44+
msgstr ""
45+
"[bug-3319]: https://github.com/mozilla/rust/issues/3319\n"
46+
"[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-"
47+
"developing-Rust"
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Japanese translations for Rust package
2+
# Copyright (C) 2014 The Rust Project Developers
3+
# This file is distributed under the same license as the Rust package.
4+
# Automatically generated, 2014.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: Rust 0.10-pre\n"
9+
"POT-Creation-Date: 2014-01-13 12:01+0900\n"
10+
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
11+
"Last-Translator: Automatically generated\n"
12+
"Language-Team: none\n"
13+
"Language: ja\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Plural-Forms: nplurals=1; plural=0;\n"
18+
19+
#. type: Bullet: '* '
20+
#: doc/complement-project-faq.md:36
21+
#, fuzzy
22+
#| msgid "## The standard library"
23+
msgid "An evolving standard library."
24+
msgstr "## 標準ライブラリ"

doc/po/ja/guide-conditions.md.po

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Japanese translations for Rust package
2+
# Copyright (C) 2014 The Rust Project Developers
3+
# This file is distributed under the same license as the Rust package.
4+
# Automatically generated, 2014.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: Rust 0.10-pre\n"
9+
"POT-Creation-Date: 2014-01-13 12:01+0900\n"
10+
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
11+
"Last-Translator: Automatically generated\n"
12+
"Language-Team: none\n"
13+
"Language: ja\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Plural-Forms: nplurals=1; plural=0;\n"
18+
19+
#. type: Plain text
20+
#: doc/guide-conditions.md:2
21+
#, fuzzy
22+
#| msgid "% The Rust Language Tutorial"
23+
msgid "% The Rust Condition and Error-handling Guide"
24+
msgstr "% Rust 言語チュートリアル"
25+
26+
#. type: Plain text
27+
#: doc/guide-conditions.md:4 doc/guide-ffi.md:4 doc/guide-lifetimes.md:4
28+
#: doc/guide-macros.md:4 doc/guide-rustpkg.md:4 doc/guide-tasks.md:4
29+
#: doc/rust.md:4 doc/rustpkg.md:4 doc/tutorial.md:4
30+
msgid "# Introduction"
31+
msgstr "# イントロダクション"
32+
33+
#. type: Bullet: ' - '
34+
#: doc/guide-conditions.md:14
35+
#, fuzzy
36+
#| msgid "# Functions"
37+
msgid "Options"
38+
msgstr "# 関数"
39+
40+
#. type: Bullet: ' - '
41+
#: doc/guide-conditions.md:14
42+
#, fuzzy
43+
#| msgid "## Conditionals"
44+
msgid "Conditions"
45+
msgstr "## 条件式"
46+
47+
#. type: Plain text
48+
#: doc/guide-conditions.md:19
49+
#, fuzzy
50+
#| msgid "## Tuples"
51+
msgid "# Example program"
52+
msgstr "## タプル"
53+
54+
#. type: Plain text
55+
#: doc/guide-conditions.md:112
56+
#, fuzzy
57+
#| msgid "# Functions"
58+
msgid "# Options"
59+
msgstr "# 関数"
60+
61+
#. type: Plain text
62+
#: doc/guide-conditions.md:318
63+
#, fuzzy
64+
#| msgid "## Conditionals"
65+
msgid "# Conditions"
66+
msgstr "## 条件式"
67+
68+
#. type: Plain text
69+
#: doc/guide-conditions.md:415
70+
#, fuzzy
71+
#| msgid "## Traits"
72+
msgid "# Trapping a condition"
73+
msgstr "## トレイト"

0 commit comments

Comments
 (0)