Change the "flow" of how translators interact with the l10n repository
at [1] to adjust it for a new workflow of not having a po/git.pot file
in-tree at all, and to not commit line numbers to the po/*.po files
that we do track in tree.
The current workflow was added in a combination of dce37b66fb (l10n:
initial git.pot for 1.7.10 upcoming release, 2012-02-13) and
271ce198cd (Update l10n guide, 2012-02-29).
As noted in preceding commits I think that it came about due to
technical debt I'd left behind in how the "po/git.pot" file was
created, and a mis-impression that the file:line comments were needed
as anything more than a transitory translation aid.
As the updated po/README.md shows the new workflow is substantially
the same, the difference is that translators no longer need to
initially pull from the l10n coordinator for a new po/git.pot, they
can simply use git.git's canonical source repository.
The l10n coordinator is still expected to announce a release to
translate, which presumably would always be Junio's latest release
tag. I'm not certain if this part of the process is actually
important. I.e. the delta translation-wise between that tag and
"master" is usually pretty small, so perhaps translators can just work
on "master" instead.
1. https://github.com/git-l10n/git-po/
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Ævar Arnfjörð Bjarmason3 years agocommitted byJunio C Hamano
@ -9,8 +9,14 @@ coordinates our localization effort in the l10 coordinator repository:
@@ -9,8 +9,14 @@ coordinates our localization effort in the l10 coordinator repository:
https://github.com/git-l10n/git-po/
The two character language translation codes are defined by ISO\_639-1, as
stated in the gettext(1) full manual, appendix A.1, Usual Language Codes.
We will use XX as an alias to refer to the language translation code in
the following paragraphs, for example we use "po/XX.po" to refer to the
translation file for a specific language. But this doesn't mean that
the language code has only two letters. The language code can be in one
of two forms: "ll" or "ll\_CC". Here "ll" is the ISO 639 two-letter
language code and "CC" is the ISO 3166 two-letter code for country names
and subdivisions. For example: "de" for German language code, "zh\_CN"
for Simplified Chinese language code.
## Contributing to an existing translation
@ -39,72 +45,74 @@ language, so that the l10n coordinator only needs to interact with one
@@ -39,72 +45,74 @@ language, so that the l10n coordinator only needs to interact with one
person per language.
## Core translation
## Translation Process Flow
The core translation is the smallest set of work that must be completed
for a new language translation. Because there are more than 5000 messages
in the template message file "po/git.pot" that need to be translated,
this is not a piece of cake for the contributor for a new language.
The overall data-flow looks like this:
The core template message file which contains a small set of messages
will be generated in "po-core/core.pot" automatically by running a helper
POT files are templates for l10n contributors to create or update their
translation files. We used to have the "po/git.pot" file which was
generated by the l10n coordinator, but this file had been removed from
the tree.
- Translatable strings are marked in the source file.
- L10n coordinator pulls from the source (1)
- L10n coordinator updates the message template "po/git.pot"
- Language team pulls from L10n coordinator (2)
- Language team updates the message file "po/XX.po"
- L10n coordinator pulls from Language team (3)
- L10n coordinator asks the result to be pulled (4).
The two POT files "po/git.pot" and "po/git-core.pot" can be created
dynamically when necessary.
L10n contributors use "po/git.pot" to prepare translations for their
languages, but they are not expected to modify it. The "po/git.pot" file
can be generated manually with the following command:
## Maintaining the "po/git.pot" file
```shell
make po/git.pot
```
(This is done by the l10n coordinator).
The "po/git-core.pot" file is the template for core translations. A core
translation is the minimum set of work necessary to complete a
translation of a new language. Since there are more than 5000 messages
in the full set of template message file "po/git.pot" that need to be
translated, this is not a piece of cake for new language contributors.
The "po/git.pot" file contains a message catalog extracted from Git's
sources. The l10n coordinator maintains it by adding new translations with
msginit(1), or update existing ones with msgmerge(1). In order to update
the Git sources to extract the messages from, the l10n coordinator is
expected to pull from the main git repository at strategic point in
history (e.g. when a major release and release candidates are tagged),
and then run "make pot" at the top-level directory.
The "core" template file "po/git-core.pot" can be generated manually
by running:
Language contributors use this file to prepare translations for their
language, but they are not expected to modify it.
```shell
make po/git-core.pot
```
## Initializing a "XX.po" file
@ -115,32 +123,14 @@ If your language XX does not have translated message file "po/XX.po" yet,
@@ -115,32 +123,14 @@ If your language XX does not have translated message file "po/XX.po" yet,
you add a translation for the first time by running:
```shell
msginit --locale=XX
make po-init PO_FILE=po/XX.po
```
in the "po/" directory, where XX is the locale, e.g. "de", "is", "pt\_BR",
"zh\_CN", etc.
Then edit the automatically generated copyright info in your new "XX.po"
to be correct, e.g. for Icelandic:
```diff
@@ -1,6 +1,6 @@
-# Icelandic translations for PACKAGE package.
-# Copyright (C) 2010 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
You're now ready to ask the l10n coordinator to pull from you.
## Fuzzy translation
@ -196,6 +220,14 @@ common errors, e.g. missing printf format strings, or translated
@@ -196,6 +220,14 @@ common errors, e.g. missing printf format strings, or translated
messages that deviate from the originals in whether they begin/end
with a newline or not.
L10n coordinator will check your contributions using a helper program