git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] [PULL] ab/i18n-gettextize & translations

From
avarab@gmail.com <avarab@gmail.com>
Date
Sep 4, 2010, 00:49 UTC
Message-ID
<4c8197a9.1707e30a.3f10.7149@mx.google.com>
In-Reply-To
<AANLkTi=6ctLp-8FeqOGMZuhwvM_7DbaEp7+LK4nXfCaE@mail.gmail.com>
From: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
On Fri, Sep 3, 2010 at 18:22, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 16 quoted lines
> 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@gmail.com>
    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@peff.net>
        Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
    
    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@gmail.com>
    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@gmail.com>
    
    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
Previous: Ævar Arnfjörð BjarmasonNext: avarab@gmail.com
Message 7 of 15 in “[GIT PULL] New ab/i18n series and builtin fixes”
  1. Ævar Arnfjörð BjarmasonSep 3, 2010
  2. 0/3 ab/i18n: README and GETTEXT_POISON supportÆvar Arnfjörð Bjarmason, Sep 3, 2010
  3. 1/3 gettext: Add po/README file documenting Git's gettextÆvar Arnfjörð Bjarmason, Sep 3, 2010
  4. 2/3 gettext: Add GETTEXT_POISON=YesPlease Makefile parameterÆvar Arnfjörð Bjarmason, Sep 3, 2010
  5. 3/3 gettext: add NO_GETTEXT_POISON prerequisite to testsÆvar Arnfjörð Bjarmason, Sep 3, 2010
  6. Ævar Arnfjörð BjarmasonSep 3, 2010
  7. 0/2 [PULL] ab/i18n-gettextize & translationsavarab@gmail.com, Sep 4, 2010
  8. 1/2 po/de.po: add German translationavarab@gmail.com, Sep 4, 2010
  9. Thomas RastSep 6, 2010
  10. Jan KrügerSep 6, 2010
  11. Ævar Arnfjörð BjarmasonSep 6, 2010
  12. Jens LehmannSep 6, 2010
  13. Tilo SchwarzSep 6, 2010
  14. Ævar Arnfjörð BjarmasonSep 6, 2010
  15. 2/2 po/en_GB.po: add British English Translationavarab@gmail.com, Sep 4, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.