From 271ce198cd01f1e0de77bbd04cca66b0648e59bd Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 29 Feb 2012 00:10:30 -0800 Subject: Update l10n guide Signed-off-by: Junio C Hamano --- po/README | 106 +++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 84 insertions(+), 22 deletions(-) (limited to 'po/README') diff --git a/po/README b/po/README index 10b0ad2ce8..6480882b10 100644 --- a/po/README +++ b/po/README @@ -1,33 +1,78 @@ Core GIT Translations ===================== -This directory holds the translations for the core of Git. This -document describes how to add to and maintain these translations, and -how to mark source strings for translation. - +This directory holds the translations for the core of Git. This document +describes how you can contribute to the effort of enhancing the language +coverage and maintaining the translation. + +The localization (l10n) coordinator, Jiang Xin , +coordinates our localization effort in his repository: + + https://github.com/gotgit/git-po/ + +As a contributor for a language XX, you would fork this repository, +prepare and/or update the translated message file po/XX.po (described +later), and ask the l10n coordinator to pull your work. + +If there are multiple contributors for the same language, please first +coordinate among yourselves and nominate the team leader for your +language, so that the l10n coordinator only needs to interact with one +person per language. + +For the list of exiting translations and language teams, see TEAMS file in +this directory. + +The overall data-flow looks like this: + + +-------------------+ +------------------+ + | Git source code | ---(1)---> | L10n coordinator | + | repository | <---(4)--- | repository | + +-------------------+ +------------------+ + | ^ + (2) (3) + V | + +------------------+ + | Language Team XX | + +------------------+ + + * 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). + + +Maintaining the po/git.pot file +------------------------------- -Generating a .pot file ----------------------- +(This is done by the l10n coordinator). The po/git.pot file contains a message catalog extracted from Git's -sources. You need to generate it to add new translations with -msginit(1), or update existing ones with msgmerge(1). +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. -Since the file can be automatically generated it's not checked into -git.git. To generate it do, at the top-level: +Language contributors use this file to prepare translations for their +language, but they are not expected to modify it. - make pot +Initializing a XX.po file +------------------------- -Initializing a .po file ------------------------ +(This is done by the language teams). -To add a new translation first generate git.pot (see above) and then -in the po/ directory do: +If your language XX does not have translated message file po/XX.po yet, +you add a translation for the first time by running: msginit --locale=XX -Where XX is your locale, e.g. "is", "de" or "pt_BR". +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: @@ -46,21 +91,36 @@ just "Git": perl -pi -e 's/(?<="Project-Id-Version: )PACKAGE VERSION/Git/' XX.po +Once you are done testing the translation (see below), commit the result +and ask the l10n coordinator to pull from you. + + +Updating a XX.po file +--------------------- -Updating a .po file -------------------- +(This is done by the language teams). -If there's an existing *.po file for your language but you need to -update the translation you first need to generate git.pot (see above) -and then in the po/ directory do: +If you are replacing translation strings in an existing XX.po file to +improve the translation, just edit the file. + +If there's an existing XX.po file for your language, but the repository +of the l10n coordinator has newer po/git.pot file, you would need to first +pull from the l10n coordinator (see the beginning of this document for its +URL), and then update the existing translation by running: msgmerge --add-location --backup=off -U XX.po git.pot -Where XX.po is the file you want to update. +in the po/ directory, where XX.po is the file you want to update. + +Once you are done testing the translation (see below), commit the result +and ask the l10n coordinator to pull from you. + Testing your changes -------------------- +(This is done by the language teams, after creating or updating XX.po file). + Before you submit your changes go back to the top-level and do: make @@ -75,6 +135,8 @@ with a newline or not. Marking strings for translation ------------------------------- +(This is done by the core developers). + Before strings can be translated they first have to be marked for translation. -- cgit v1.2.1 From 75b182aee702aa82bec81c542788eb9149a68fa0 Mon Sep 17 00:00:00 2001 From: Jiang Xin Date: Fri, 2 Mar 2012 10:29:53 +0800 Subject: Update l10n guide: change the repository URL, etc Host the l10n coordinator repository in a dedicated github organization account "git-l10n", so that the team may have a more permanent home. Also add a hint about reference of TEAMS file for l10n contributors. Update TEAMS file with new zh_CN l10n team members and a repository URL. Signed-off-by: Jiang Xin Signed-off-by: Junio C Hamano --- po/README | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'po/README') diff --git a/po/README b/po/README index 6480882b10..188ea2c254 100644 --- a/po/README +++ b/po/README @@ -6,22 +6,23 @@ describes how you can contribute to the effort of enhancing the language coverage and maintaining the translation. The localization (l10n) coordinator, Jiang Xin , -coordinates our localization effort in his repository: +coordinates our localization effort in the l10 coordinator repository: - https://github.com/gotgit/git-po/ + https://github.com/git-l10n/git-po/ -As a contributor for a language XX, you would fork this repository, -prepare and/or update the translated message file po/XX.po (described -later), and ask the l10n coordinator to pull your work. +As a contributor for a language XX, you should first check TEAMS file in +this directory to see whether a dedicated repository for your language XX +exists. Fork the dedicated repository and start to work if it exists. + +If you are the first contributor for the language XX, please fork this +repository, prepare and/or update the translated message file po/XX.po +(described later), and ask the l10n coordinator to pull your work. If there are multiple contributors for the same language, please first coordinate among yourselves and nominate the team leader for your language, so that the l10n coordinator only needs to interact with one person per language. -For the list of exiting translations and language teams, see TEAMS file in -this directory. - The overall data-flow looks like this: +-------------------+ +------------------+ -- cgit v1.2.1 From 65c2b2b509796965b9a584e4d92fec2afc4470cd Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 28 Mar 2012 10:45:36 +0200 Subject: correct a few doubled-word nits in comments and documentation Found by running this command: $ git ls-files -z|xargs -0 perl -0777 -n \ -e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims)' \ -e ' {' \ -e ' $n = ($` =~ tr/\n/\n/ + 1);' \ -e ' ($v = $&) =~ s/\n/\\n/g;' \ -e ' print "$ARGV:$n:$v\n";' \ -e ' }' Why not just git grep -E ...? That wouldn't work then the doubled words are separated by a newline. This is derived from a Makefile syntax-check rule in gnulib's maint.mk: http://git.sv.gnu.org/cgit/gnulib.git/tree/top/maint.mk Signed-off-by: Jim Meyering Signed-off-by: Junio C Hamano --- po/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'po/README') diff --git a/po/README b/po/README index 188ea2c254..c1520e8cde 100644 --- a/po/README +++ b/po/README @@ -178,7 +178,7 @@ used: C: - - Include builtin.h at the top, it'll pull in in gettext.h, which + - Include builtin.h at the top, it'll pull in gettext.h, which defines the gettext interface. Consult with the list if you need to use gettext.h directly. -- cgit v1.2.1 From e1c3bf496f494e60e781c8dd0ec3d799ea48722c Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Fri, 12 Apr 2013 00:36:10 +0200 Subject: doc: various spelling fixes Most of these were found using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- po/README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'po/README') diff --git a/po/README b/po/README index c1520e8cde..d8c9111c82 100644 --- a/po/README +++ b/po/README @@ -232,7 +232,7 @@ Shell: # To interpolate variables: details="oh noes" - eval_gettext "An error occured: \$details"; echo + eval_gettext "An error occurred: \$details"; echo In addition we have wrappers for messages that end with a trailing newline. I.e. you could write the above as: @@ -242,7 +242,7 @@ Shell: # To interpolate variables: details="oh noes" - eval_gettextln "An error occured: \$details" + eval_gettextln "An error occurred: \$details" More documentation about the interface is available in the GNU info page: `info '(gettext)sh'`. Looking at git-am.sh (the first shell @@ -257,7 +257,7 @@ Perl: use Git::I18N; print __("Welcome to Git!\n"); - printf __("The following error occured: %s\n"), $error; + printf __("The following error occurred: %s\n"), $error; Run `perldoc perl/Git/I18N.pm` for more info. -- cgit v1.2.1