From: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> On Fri, Sep 3, 2010 at 18:22, Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> wrote: > What I'm working on, which should not be pulled at this time: > > ab/i18n-gettextize: > http://github.com/avar/git/compare/ab/i18n...ab/i18n-gettextize > > Updated version of the gettextize series rebased on master. No > longer needs its own builtin.h patches (since ab/i18n itself now > depends on it). I'm also fixing some minor issues raised on-list. > > I'm also going to add the aforementioned GETTEXT_POISON > functionality to ab/i18n to make sure this series is OK. > > ab/i18n-add-translations: > http://github.com/avar/git/compare/ab/i18n-gettextize...ab/i18n-add-translations > > Adds German and British English translations. More additions welcome. The ab/i18n-gettextize series is now ready. And since I've tested it with the new GETTEXT_POISON support I'm confident that it works. Please pull it from: git://github.com/avar/git.git ab/i18n-gettextize Web view: http://github.com/avar/git/compare/ab/i18n...ab/i18n-gettextize Changes to the series since last time are this fixup patch: diff --git a/builtin/fetch.c b/builtin/fetch.c index fd0a40d..98fb202 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -349 +349 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, - kind = _("branch"); + kind = "branch"; @@ -353 +353 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, - kind = _("tag"); + kind = "tag"; @@ -357 +357 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, - kind = _("remote branch"); + kind = "remote branch"; @@ -397 +397 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, - TRANSPORT_SUMMARY_WIDTH, *kind ? kind : _("branch"), + TRANSPORT_SUMMARY_WIDTH, *kind ? kind : "branch", This changed what was stored in commit messages, so it was *really* breaking the plumbing. This was turned up with the new GETTEXT_POISON debug support. Then there are these two commits which are new in the series: 7cd45c32 * gettextize: git-fetch split up "(non-fast-forward)" message 8b47940b * gettextize: git-fetch update_local_ref messages Reproduced here for review: commit 8b47940bc4081a760eb772cdea76f89ca0be83cf Author: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> Date: Fri Sep 3 23:58:01 2010 +0000 gettextize: git-fetch update_local_ref messages Translate a "[rejected]" message spotted by Jeff King, and other things in update_local_ref along with it. Reported-by: Jeff King <peff@xxxxxxxx> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> diff --git a/builtin/fetch.c b/builtin/fetch.c index 98fb202..3d2c45d 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -265 +265 @@ static int update_local_ref(struct ref *ref, - what = "[new tag]"; + what = _("[new tag]"); @@ -269 +269 @@ static int update_local_ref(struct ref *ref, - what = "[new branch]"; + what = _("[new branch]"); @@ -275 +275 @@ static int update_local_ref(struct ref *ref, - r ? " (unable to update local ref)" : ""); + r ? _(" (unable to update local ref)") : ""); @@ -288 +288 @@ static int update_local_ref(struct ref *ref, - pretty_ref, r ? " (unable to update local ref)" : ""); + pretty_ref, r ? _(" (unable to update local ref)") : ""); @@ -300 +300 @@ static int update_local_ref(struct ref *ref, - r ? "unable to update local ref" : "forced update"); + r ? _("unable to update local ref") : _("forced update")); And: commit 7cd45c32ef93c949330b7899821f184ccae52900 Author: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> Date: Fri Sep 3 23:59:27 2010 +0000 gettextize: git-fetch split up "(non-fast-forward)" message Split up the "(non-fast-forward)" message from printf directives and make it translatable. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> diff --git a/builtin/fetch.c b/builtin/fetch.c index 3d2c45d..792123c 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -303,3 +303,3 @@ static int update_local_ref(struct ref *ref, - sprintf(display, "! %-*s %-*s -> %s (non-fast-forward)", - TRANSPORT_SUMMARY_WIDTH, "[rejected]", REFCOL_WIDTH, remote, - pretty_ref); + sprintf(display, "! %-*s %-*s -> %s %s", + TRANSPORT_SUMMARY_WIDTH, _("[rejected]"), REFCOL_WIDTH, remote, + pretty_ref, _("(non-fast-forward)")); And finally (and attached) to make use of this all the ab/i18n-add-translations series adds German and British English Translations: git://github.com/avar/git.git ab/i18n-add-translations Web view: http://github.com/avar/git/compare/ab/i18n-gettextize...ab/i18n-add-translations 1771 lines for the British English one to translate 3 strings is a bit of an overkill. But it seems that projects that use gettext usually include the untranslated strings too. E.g. glibc.git does that for its en_GB.po file. Maybe we can prune out entries with msgstr "". That seems to work on GNU, it probably works on all other gettext implementations. Note that these patches might not appear at all on the list, since they might bump into the maximum message length on the list. Jan Krüger (1): po/de.po: add German translation Sam Reed (1): po/en_GB.po: add British English Translation po/de.po | 1888 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ po/en_GB.po | 1771 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 3659 insertions(+), 0 deletions(-) create mode 100644 po/de.po create mode 100644 po/en_GB.po -- 1.7.2.2.336.g704fc -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html