Skip to content

Commit bfabdfe

Browse files
committed
Merge the initial l10n effort in
* l10n: Update l10n guide: change the repository URL, etc l10n: leave leading space unchanged for zh_CN.po Update l10n guide l10n: update Chinese translation to the new git.po l10n: Update git.pot (12 new messages) l10n: fast-forward here is ff-only merge, not push l10n: update zh_CN translation for "Fetching %s" l10n: po for zh_CN l10n: initial git.pot for 1.7.10 upcoming release
2 parents 797166c + 11ec817 commit bfabdfe

File tree

6 files changed

+7265
-24
lines changed

6 files changed

+7265
-24
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2635,7 +2635,6 @@ dist-doc:
26352635

26362636
distclean: clean
26372637
$(RM) configure
2638-
$(RM) po/git.pot
26392638

26402639
profile-clean:
26412640
$(RM) $(addsuffix *.gcda,$(addprefix $(PROFILE_DIR)/, $(object_dirs)))

po/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
/git.pot
21
/build

po/README

Lines changed: 85 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,79 @@
11
Core GIT Translations
22
=====================
33

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 <[email protected]>,
9+
coordinates our localization effort in the l10 coordinator repository:
10+
11+
https://github.com/git-l10n/git-po/
12+
13+
As a contributor for a language XX, you should first check TEAMS file in
14+
this directory to see whether a dedicated repository for your language XX
15+
exists. Fork the dedicated repository and start to work if it exists.
16+
17+
If you are the first contributor for the language XX, please fork this
18+
repository, prepare and/or update the translated message file po/XX.po
19+
(described later), and ask the l10n coordinator to pull your work.
20+
21+
If there are multiple contributors for the same language, please first
22+
coordinate among yourselves and nominate the team leader for your
23+
language, so that the l10n coordinator only needs to interact with one
24+
person per language.
25+
26+
The overall data-flow looks like this:
27+
28+
+-------------------+ +------------------+
29+
| Git source code | ---(1)---> | L10n coordinator |
30+
| repository | <---(4)--- | repository |
31+
+-------------------+ +------------------+
32+
| ^
33+
(2) (3)
34+
V |
35+
+------------------+
36+
| Language Team XX |
37+
+------------------+
38+
39+
* Translatable strings are marked in the source file.
40+
* L10n coordinator pulls from the source (1)
41+
* L10n coordinator updates the message template po/git.pot
42+
* Language team pulls from L10n coordinator (2)
43+
* Language team updates the message file po/XX.po
44+
* L10n coordinator pulls from Language team (3)
45+
* L10n coordinator asks the result to be pulled (4).
46+
47+
48+
Maintaining the po/git.pot file
49+
-------------------------------
850

9-
Generating a .pot file
10-
----------------------
51+
(This is done by the l10n coordinator).
1152

1253
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).
54+
sources. The l10n coordinator maintains it by adding new translations with
55+
msginit(1), or update existing ones with msgmerge(1). In order to update
56+
the Git sources to extract the messages from, the l10n coordinator is
57+
expected to pull from the main git repository at strategic point in
58+
history (e.g. when a major release and release candidates are tagged),
59+
and then run "make pot" at the top-level directory.
1560

16-
Since the file can be automatically generated it's not checked into
17-
git.git. To generate it do, at the top-level:
61+
Language contributors use this file to prepare translations for their
62+
language, but they are not expected to modify it.
1863

19-
make pot
2064

65+
Initializing a XX.po file
66+
-------------------------
2167

22-
Initializing a .po file
23-
-----------------------
68+
(This is done by the language teams).
2469

25-
To add a new translation first generate git.pot (see above) and then
26-
in the po/ directory do:
70+
If your language XX does not have translated message file po/XX.po yet,
71+
you add a translation for the first time by running:
2772

2873
msginit --locale=XX
2974

30-
Where XX is your locale, e.g. "is", "de" or "pt_BR".
75+
in the po/ directory, where XX is the locale, e.g. "de", "is", "pt_BR",
76+
"zh_CN", etc.
3177

3278
Then edit the automatically generated copyright info in your new XX.po
3379
to be correct, e.g. for Icelandic:
@@ -46,21 +92,36 @@ just "Git":
4692

4793
perl -pi -e 's/(?<="Project-Id-Version: )PACKAGE VERSION/Git/' XX.po
4894

95+
Once you are done testing the translation (see below), commit the result
96+
and ask the l10n coordinator to pull from you.
97+
98+
99+
Updating a XX.po file
100+
---------------------
49101

50-
Updating a .po file
51-
-------------------
102+
(This is done by the language teams).
52103

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:
104+
If you are replacing translation strings in an existing XX.po file to
105+
improve the translation, just edit the file.
106+
107+
If there's an existing XX.po file for your language, but the repository
108+
of the l10n coordinator has newer po/git.pot file, you would need to first
109+
pull from the l10n coordinator (see the beginning of this document for its
110+
URL), and then update the existing translation by running:
56111

57112
msgmerge --add-location --backup=off -U XX.po git.pot
58113

59-
Where XX.po is the file you want to update.
114+
in the po/ directory, where XX.po is the file you want to update.
115+
116+
Once you are done testing the translation (see below), commit the result
117+
and ask the l10n coordinator to pull from you.
118+
60119

61120
Testing your changes
62121
--------------------
63122

123+
(This is done by the language teams, after creating or updating XX.po file).
124+
64125
Before you submit your changes go back to the top-level and do:
65126

66127
make
@@ -75,6 +136,8 @@ with a newline or not.
75136
Marking strings for translation
76137
-------------------------------
77138

139+
(This is done by the core developers).
140+
78141
Before strings can be translated they first have to be marked for
79142
translation.
80143

po/TEAMS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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 <[email protected]>
6+
7+
Language: zh_CN (Simplified Chinese)
8+
Repository: https://github.com/gotgit/git-po-zh_CN/
9+
Leader: Jiang Xin <[email protected]>
10+
Members: Riku <lu.riku AT gmail.com>
11+
Zhuang Ya <zhuangya AT me.com>
12+
Lian Cheng <rhythm.mail AT gmail.com>
13+
Yichao Yu <yyc1992 AT gmail.com>
14+
ws3389 <willsmith3389 AT gmail.com>
15+
Thynson <lanxingcan AT gmail.com>

0 commit comments

Comments
 (0)