Update l10n guide
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Feb 29, 2012 at 00:10 UTC
271ce198cd01f1e0de77bbd04cca66b0648e59bd
2 files changed
+94
-22
po/README
+84
-22
@@ -1,33 +1,78 @@
1
Core GIT Translations
2
=====================
3
4
-This directory holds the translations for the core of Git. This
5
-document describes how to add to and maintain these translations, and
6
-how to mark source strings for translation.
7
-
4
+This directory holds the translations for the core of Git. This document
5
+describes how you can contribute to the effort of enhancing the language
6
+coverage and maintaining the translation.
7
+
8
+The localization (l10n) coordinator, Jiang Xin <worldhello.net@gmail.com>,
9
+coordinates our localization effort in his repository:
10
+
11
+ https://github.com/gotgit/git-po/
12
+
13
+As a contributor for a language XX, you would fork this repository,
14
+prepare and/or update the translated message file po/XX.po (described
15
+later), and ask the l10n coordinator to pull your work.
16
+
17
+If there are multiple contributors for the same language, please first
18
+coordinate among yourselves and nominate the team leader for your
19
+language, so that the l10n coordinator only needs to interact with one
20
+person per language.
21
+
22
+For the list of exiting translations and language teams, see TEAMS file in
23
+this directory.
24
+
25
+The overall data-flow looks like this:
26
+
27
+ +-------------------+ +------------------+
28
+ | Git source code | ---(1)---> | L10n coordinator |
29
+ | repository | <---(4)--- | repository |
30
+ +-------------------+ +------------------+
31
+ | ^
32
+ (2) (3)
33
+ V |
34
+ +------------------+
35
+ | Language Team XX |
36
+ +------------------+
37
+
38
+ * Translatable strings are marked in the source file.
39
+ * L10n coordinator pulls from the source (1)
40
+ * L10n coordinator updates the message template po/git.pot
41
+ * Language team pulls from L10n coordinator (2)
42
+ * Language team updates the message file po/XX.po
43
+ * L10n coordinator pulls from Language team (3)
44
+ * L10n coordinator asks the result to be pulled (4).
45
+
46
+
47
+Maintaining the po/git.pot file
48
+-------------------------------
49
9
-Generating a .pot file
10
-----------------------
50
+(This is done by the l10n coordinator).
51
52
The po/git.pot file contains a message catalog extracted from Git's
13
-sources. You need to generate it to add new translations with
14
-msginit(1), or update existing ones with msgmerge(1).
53
+sources. The l10n coordinator maintains it by adding new translations with
54
+msginit(1), or update existing ones with msgmerge(1). In order to update
55
+the Git sources to extract the messages from, the l10n coordinator is
56
+expected to pull from the main git repository at strategic point in
57
+history (e.g. when a major release and release candidates are tagged),
58
+and then run "make pot" at the top-level directory.
59
16
-Since the file can be automatically generated it's not checked into
17
-git.git. To generate it do, at the top-level:
60
+Language contributors use this file to prepare translations for their
61
+language, but they are not expected to modify it.
62
19
- make pot
63
64
+Initializing a XX.po file
65
+-------------------------
66
22
-Initializing a .po file
23
------------------------
67
+(This is done by the language teams).
68
25
-To add a new translation first generate git.pot (see above) and then
26
-in the po/ directory do:
69
+If your language XX does not have translated message file po/XX.po yet,
70
+you add a translation for the first time by running:
71
72
msginit --locale=XX
73
30
-Where XX is your locale, e.g. "is", "de" or "pt_BR".
74
+in the po/ directory, where XX is the locale, e.g. "de", "is", "pt_BR",
75
+"zh_CN", etc.
76
77
Then edit the automatically generated copyright info in your new XX.po
78
to be correct, e.g. for Icelandic:
@@ -46,21 +91,36 @@ just "Git":
91
92
perl -pi -e 's/(?<="Project-Id-Version: )PACKAGE VERSION/Git/' XX.po
93
94
+Once you are done testing the translation (see below), commit the result
95
+and ask the l10n coordinator to pull from you.
96
+
97
+
98
+Updating a XX.po file
99
+---------------------
100
50
-Updating a .po file
51
--------------------
101
+(This is done by the language teams).
102
53
-If there's an existing *.po file for your language but you need to
54
-update the translation you first need to generate git.pot (see above)
55
-and then in the po/ directory do:
103
+If you are replacing translation strings in an existing XX.po file to
104
+improve the translation, just edit the file.
105
+
106
+If there's an existing XX.po file for your language, but the repository
107
+of the l10n coordinator has newer po/git.pot file, you would need to first
108
+pull from the l10n coordinator (see the beginning of this document for its
109
+URL), and then update the existing translation by running:
110
111
msgmerge --add-location --backup=off -U XX.po git.pot
112
59
-Where XX.po is the file you want to update.
113
+in the po/ directory, where XX.po is the file you want to update.
114
+
115
+Once you are done testing the translation (see below), commit the result
116
+and ask the l10n coordinator to pull from you.
117
+
118
119
Testing your changes
120
--------------------
121
122
+(This is done by the language teams, after creating or updating XX.po file).
123
+
124
Before you submit your changes go back to the top-level and do:
125
126
make
@@ -75,6 +135,8 @@ with a newline or not.
135
Marking strings for translation
136
-------------------------------
137
138
+(This is done by the core developers).
139
+
140
Before strings can be translated they first have to be marked for
141
translation.
142
po/TEAMS
new
+10
@@ -0,0 +1,10 @@
1
+Core Git translation language teams
2
+(please keep the list sorted alphabetically on language field)
3
+
4
+Language: is (Icelandic)
5
+Leader: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
6
+
7
+Language: zh_CN (Simplified Chinese)
8
+Leader: Jiang Xin <worldhello.net@gmail.com>
9
+Members: Yichao Yu <yyc1992@gmail.com>
10
+ Riku <lu.riku@gmail.com>