From c02a9ec903b0f727b554e762b1f3f71093fa7c5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 3 Sep 2010 15:36:58 +0000 Subject: [PATCH] gettext docs: add po/README file documenting Git's gettext MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add a po/README file. This documentation is targated at translators and maintainers of git.git. Currently it describes how to add new PO files and how to update them. But in the future we want to add more things to it, e.g. how and what to add in TRANSLATOR comments, how to make the source more gettext friendly etc. Signed-off-by: Ævar Arnfjörð Bjarmason --- po/README | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 po/README diff --git a/po/README b/po/README new file mode 100644 index 000000000..51d6f3b5c --- /dev/null +++ b/po/README @@ -0,0 +1,58 @@ +Core GIT Translations +===================== + +This directory holds the translations for the core of Git. This +document describes how to add to and maintain these translations. + + +Generating a .pot file +---------------------- + +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). + +Since the file can be automatically generated it's not checked into +git.git. To generate it do, at the top-level: + + make pot + + +Initializing a .po file +----------------------- + +To add a new translation first generate git.pot (see above) and then +in the po/ directory do: + + msginit --locale=XX + +Where XX is your locale, e.g. "is", "de" or "pt_BR". + +Then edit the automatically generated copyright info in your new XX.po +to be correct, e.g. for Icelandic: + + @@ -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. + +# Icelandic translations for Git. + +# Copyright (C) 2010 Ævar Arnfjörð Bjarmason + +# This file is distributed under the same license as the Git package. + # Ævar Arnfjörð Bjarmason , 2010. + +And change references to PACKAGE VERSION in the PO Header Entry to +just "Git": + + perl -pi -e 's/(?<="Project-Id-Version: )PACKAGE VERSION/Git/' XX.po + + +Updating a .po file +------------------- + +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: + + msgmerge --add-location --backup=off -U XX.po git.pot + +Where XX.po is the file you want to update. -- 2.30.2