git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: avarab@gmail.com
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jan Krüger" <jk@jk.gs>,
	"Sam Reed" <sam@reedyboy.net>, "Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 0/2] [PULL] ab/i18n-gettextize & translations
Date: Sat,  4 Sep 2010 00:49:25 +0000	[thread overview]
Message-ID: <4c8197a9.1707e30a.3f10.7149@mx.google.com> (raw)
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:

> 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

  parent reply	other threads:[~2010-09-04  0:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03 18:22 [GIT PULL] New ab/i18n series and builtin fixes Ævar Arnfjörð Bjarmason
2010-09-03 23:24 ` [PATCH 0/3] ab/i18n: README and GETTEXT_POISON support Ævar Arnfjörð Bjarmason
2010-09-03 23:24 ` [PATCH 1/3] gettext: Add po/README file documenting Git's gettext Ævar Arnfjörð Bjarmason
2010-09-03 23:24 ` [PATCH 2/3] gettext: Add GETTEXT_POISON=YesPlease Makefile parameter Ævar Arnfjörð Bjarmason
2010-09-03 23:24 ` [PATCH 3/3] gettext: add NO_GETTEXT_POISON prerequisite to tests Ævar Arnfjörð Bjarmason
2010-09-03 23:41   ` Ævar Arnfjörð Bjarmason
2010-09-04  0:49 ` avarab [this message]
2010-09-04  0:49 ` [PATCH 1/2] po/de.po: add German translation avarab
2010-09-06 15:41   ` Thomas Rast
2010-09-06 16:09     ` Jan Krüger
2010-09-06 17:06       ` Ævar Arnfjörð Bjarmason
2010-09-06 16:24     ` Jens Lehmann
2010-09-06 19:58       ` Tilo Schwarz
2010-09-06 17:15     ` Ævar Arnfjörð Bjarmason
2010-09-04  0:49 ` [PATCH 2/2] po/en_GB.po: add British English Translation avarab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c8197a9.1707e30a.3f10.7149@mx.google.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jk@jk.gs \
    --cc=peff@peff.net \
    --cc=sam@reedyboy.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).