All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/63] [REDO] Add gettext support to Git
@ 2010-09-04 22:10 Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 01/63] builtin: use builtin.h for all builtin commands Ævar Arnfjörð Bjarmason
                   ` (24 more replies)
  0 siblings, 25 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-04 22:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Thomas Rast, Sam Reed, Jan Krüger,
	Ævar Arnfjörð Bjarmason

The previous nested pull requests were a mess, and I needed to fix
some bugs. So here's a total re-do of the ab/i18n series. Everything
that's already in pu from ab/i18n can be ejected in favor of this.

Most of these 63 patches have been seen here before. So I'll only be
sending the stuff that's changed or interesting along with this
series. To get the full thing go to:

    git://github.com/avar/git.git ab/i18n-all
    http://github.com/avar/git/compare/master...ab/i18n-all
    http://github.com/avar/git/compare/master...ab/i18n-all.patch

The last of which is a patch file suitable for git-am(1).

Since last time I've rebased this on the new upstream master branch,
which now has my ab/test-2 series.

See comments by the patches below for other changes in this
series since last time.

Jan Krüger (1):
  po/de.po: add German translation

Marcin Cieślak (1):
  po/pl.po: add Polish translation

Sam Reed (1):
  po/en_GB.po: add British English Translation

    I minimized this so it now only contains 3 msgid/msgstr pairs,
    instead of containing *all* of them just to translate those three.

    As an aside I really need to patch the upstream gettext tools to
    make this easy. I have to manually edit the file now to do this.

Thomas Rast (1):
  tests: locate i18n lib&data correctly under --valgrind

    The 2e75a8c that's in pu right now solves the merge conflict
    between ab/i18n and ab/test incorrectly. Since ab/test has been
    merged this needs no changes to test-lib.sh at all (GIT_BUILD_DIR
    is now already defined there).

Ævar Arnfjörð Bjarmason (59):
  builtin: use builtin.h for all builtin commands

    These changes for builtin.h are now part of this series for
    convenience. But Junio might want to split them up away from the
    ab/i18n topic.

  Add infrastructure for translating Git with gettext

    Updated to solve merge conflicts with the new master. No other
    changes.

  tests: rename test to work around GNU gettext bug
  gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
  Makefile: A variable for options used by xgettext(1) calls
  Makefile: provide a --msgid-bugs-address to xgettext(1)
  Makefile: tell xgettext(1) that our source is in UTF-8
  Makefile: use variables and shorter lines for xgettext
  builtin.h: Include gettext.h
  gettext: make the simple parts of git-init localizable
  gettext: localize the main git-init message
  gettext.c: work around us not using setlocale(LC_CTYPE, "")
  gettext tests: test if $VERSION exists before using it
  gettext tests: update test/is.po to match t/t0200/test.c
  gettext tests: add detection for is_IS.ISO-8859-1 locale
  gettext tests: test message re-encoding under Shell
  gettext tests: test re-encoding with a UTF-8 msgid under Shell
  gettext tests: mark a test message as not needing translation

  po/is.po: msgmerge and add Language: header
  po/is.po: add Icelandic translation

    I've rewritten these and all other changes to po/*.po files to not
    have the autogenerated line numbers. So with this new topic these
    *never* apprear in the po/*.po history.

  gettext tests: test message re-encoding under C
  gettext tests: remove old sanity test under NO_GETTEXT
  gettext docs: add po/README file documenting Git's gettext
  gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter

  gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON

    Split up from the below. Easier to review this way.

  gettext tests: skip breaking tests under GETTEXT_POISON

    Ejected changes to t7602-merge-octopus-many.sh from this. Those
    tests tested for a plumbing message (see below)

    This is still the part of this series that needs the most
    review. I *think* I got this right, but more eyes are needed on
    it.

  gettextize: git-clone basic messages
  gettextize: git-clone "Cloning into" message
  gettextize: git-add basic messages
  gettextize: git-add refresh_index message
  gettextize: git-branch basic messages
  gettextize: git-branch "remote branch '%s' not found" message
  gettextize: git-branch "git branch -v" messages
  gettextize: git-branch "(no branch)" message
  gettextize: git-checkout: our/their version message
  gettextize: git-checkout basic messages
  gettextize: git-checkout describe_detached_head messages
  gettextize: git-checkout "Switched to a .. branch" message
  gettextize: git-commit basic messages
  gettextize: git-commit formatting messages
  gettextize: git-commit advice messages
  gettextize: git-diff basic messages
  gettextize: git-fetch basic messages
  gettextize: git-fetch formatting messages
  gettextize: git-fetch update_local_ref messages
  gettextize: git-fetch split up "(non-fast-forward)" message
  gettextize: git-grep basic messages
  gettextize: git-log basic messages
  gettextize: git-merge basic messages

    The finish() command ends up writing to the reflog, not only to
    stdout. So I needed drop all these patches:
    
        gettextize: git-merge remaining cmd_merge messages
        gettextize: git-merge "Merge made by %s." message
        gettextize: git-merge "In-index merge" message

    Now git-merge only makes the basic output/die messages
    translatable.
    
  gettextize: git-mv basic messages
  gettextize: git-mv "bad" messages
  gettextize: git-rm basic messages
  gettextize: git-reset basic messages
  gettextize: git-reset reset_type_names messages
  gettextize: git-tag basic messages
  gettextize: git-tag tag_template message
  gettextize: git-push basic messages
  gettextize: git-status basic messages
  gettextize: git-status shortstatus messages

 .gitignore                          |    2 +
 INSTALL                             |   12 +
 Makefile                            |   92 ++-
 builtin.h                           |    1 +
 builtin/add.c                       |   46 +-
 builtin/branch.c                    |   69 +-
 builtin/checkout.c                  |   93 +-
 builtin/clone.c                     |   61 +-
 builtin/commit.c                    |  156 ++--
 builtin/diff.c                      |   20 +-
 builtin/fetch-pack.c                |    2 +-
 builtin/fetch.c                     |   82 +-
 builtin/grep.c                      |   34 +-
 builtin/hash-object.c               |    2 +-
 builtin/index-pack.c                |    2 +-
 builtin/init-db.c                   |   56 +-
 builtin/log.c                       |   68 +-
 builtin/merge-index.c               |    2 +-
 builtin/merge-recursive.c           |    2 +-
 builtin/merge-tree.c                |    2 +-
 builtin/merge.c                     |  122 ++--
 builtin/mktag.c                     |    2 +-
 builtin/mv.c                        |   32 +-
 builtin/pack-redundant.c            |    2 +-
 builtin/pack-refs.c                 |    2 +-
 builtin/patch-id.c                  |    2 +-
 builtin/push.c                      |   42 +-
 builtin/receive-pack.c              |    2 +-
 builtin/remote.c                    |    3 +-
 builtin/reset.c                     |   44 +-
 builtin/rm.c                        |   22 +-
 builtin/send-pack.c                 |    2 +-
 builtin/tag.c                       |   66 +-
 builtin/unpack-file.c               |    2 +-
 builtin/var.c                       |    2 +-
 config.mak.in                       |    2 +
 configure.ac                        |   12 +
 daemon.c                            |    3 +
 fast-import.c                       |    3 +
 gettext.c                           |   27 +
 gettext.h                           |   22 +
 git-sh-i18n.sh                      |   71 ++
 git.c                               |    3 +
 http-backend.c                      |    3 +
 http-fetch.c                        |    3 +
 http-push.c                         |    3 +
 imap-send.c                         |    3 +
 perl/Git/I18N.pm                    |   91 ++
 perl/Makefile                       |    3 +-
 perl/Makefile.PL                    |   14 +-
 po/.gitignore                       |    1 +
 po/README                           |   68 ++
 po/de.po                            | 1888 +++++++++++++++++++++++++++++++++++
 po/en_GB.po                         |   22 +
 po/is.po                            |  152 +++
 po/pl.po                            |  153 +++
 shell.c                             |    3 +
 show-index.c                        |    3 +
 t/lib-gettext.sh                    |   68 ++
 t/lib-httpd.sh                      |    2 +-
 t/t0001-init.sh                     |    2 +-
 t/t0200-gettext-basic.sh            |  108 ++
 t/t0200/test.c                      |   23 +
 t/t0200/test.perl                   |   14 +
 t/t0200/test.sh                     |   14 +
 t/t0201-gettext-fallbacks.sh        |   49 +
 t/t0202-gettext-perl.sh             |   27 +
 t/t0202/test.pl                     |  109 ++
 t/t0203-gettext-setlocale-sanity.sh |   26 +
 t/t0204-gettext-reencode-sanity.sh  |   78 ++
 t/t1200-tutorial.sh                 |    4 +-
 t/t2200-add-update.sh               |    2 +-
 t/t2204-add-ignored.sh              |    8 +-
 t/t3030-merge-recursive.sh          |    2 +-
 t/t3200-branch.sh                   |    2 +-
 t/t3203-branch-output.sh            |    2 +-
 t/t3700-add.sh                      |    4 +-
 t/t4001-diff-rename.sh              |    4 +-
 t/t4014-format-patch.sh             |    2 +-
 t/t5541-http-push.sh                |    2 +-
 t/t5601-clone.sh                    |    2 +-
 t/t6040-tracking-info.sh            |    2 +-
 t/t7004-tag.sh                      |    6 +-
 t/t7060-wtstatus.sh                 |    2 +-
 t/t7102-reset.sh                    |    2 +-
 t/t7110-reset-merge.sh              |    6 +-
 t/t7201-co.sh                       |   10 +-
 t/t7500-commit.sh                   |    9 +-
 t/t7501-commit.sh                   |   14 +-
 t/t7502-commit.sh                   |   46 +-
 t/t7506-status-submodule.sh         |   28 +-
 t/t7508-status.sh                   |   98 +-
 t/t7600-merge.sh                    |    2 +-
 t/t7811-grep-open.sh                |    2 +-
 t/test-lib.sh                       |    3 +
 upload-pack.c                       |    3 +
 wt-status.c                         |  116 ++--
 97 files changed, 3901 insertions(+), 706 deletions(-)
 create mode 100644 gettext.c
 create mode 100644 gettext.h
 create mode 100644 git-sh-i18n.sh
 create mode 100644 perl/Git/I18N.pm
 create mode 100644 po/.gitignore
 create mode 100644 po/README
 create mode 100644 po/de.po
 create mode 100644 po/en_GB.po
 create mode 100644 po/is.po
 create mode 100644 po/pl.po
 create mode 100644 t/lib-gettext.sh
 create mode 100755 t/t0200-gettext-basic.sh
 create mode 100644 t/t0200/test.c
 create mode 100644 t/t0200/test.perl
 create mode 100644 t/t0200/test.sh
 create mode 100755 t/t0201-gettext-fallbacks.sh
 create mode 100755 t/t0202-gettext-perl.sh
 create mode 100644 t/t0202/test.pl
 create mode 100755 t/t0203-gettext-setlocale-sanity.sh
 create mode 100755 t/t0204-gettext-reencode-sanity.sh

-- 
1.7.2.3.313.gcd15

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [PATCH 01/63] builtin: use builtin.h for all builtin commands
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
@ 2010-09-04 22:10 ` Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 02/63] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
                   ` (23 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-04 22:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Thomas Rast, Sam Reed, Jan Krüger,
	Ævar Arnfjörð Bjarmason

Change the builtin/*.c files and wt-status.c files which weren't using
builtin.h to use it, also remove any git-compat-util.h, strbuf.h and
cache.h from those files. We can trust on builtin.h including them.

builtin.h also includes commit.h and notes.h. But I haven't removed
these includes. They're redundant now, but we may want to remove them
from builtin.h in the future.

This impeded my efforts to gettextize git, since I'd otherwise have to
add gettext.h to all of these. Using builtin.h is a good idea in any
case, since it's defining the prototypes for the cmd_* functions that
these files define.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/clone.c           |    3 +--
 builtin/fetch-pack.c      |    2 +-
 builtin/hash-object.c     |    2 +-
 builtin/index-pack.c      |    2 +-
 builtin/merge-index.c     |    2 +-
 builtin/merge-recursive.c |    2 +-
 builtin/merge-tree.c      |    2 +-
 builtin/mktag.c           |    2 +-
 builtin/pack-redundant.c  |    2 +-
 builtin/pack-refs.c       |    2 +-
 builtin/patch-id.c        |    2 +-
 builtin/receive-pack.c    |    2 +-
 builtin/remote.c          |    3 +--
 builtin/reset.c           |    2 +-
 builtin/send-pack.c       |    2 +-
 builtin/unpack-file.c     |    2 +-
 builtin/var.c             |    2 +-
 wt-status.c               |    2 +-
 18 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/builtin/clone.c b/builtin/clone.c
index 19ed640..994d527 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -8,7 +8,7 @@
  * Clone a repository into a different directory that does not yet exist.
  */
 
-#include "cache.h"
+#include "builtin.h"
 #include "parse-options.h"
 #include "fetch-pack.h"
 #include "refs.h"
@@ -16,7 +16,6 @@
 #include "tree-walk.h"
 #include "unpack-trees.h"
 #include "transport.h"
-#include "strbuf.h"
 #include "dir.h"
 #include "pack-refs.h"
 #include "sigchain.h"
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index dbd8b7b..fd70b4c 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "refs.h"
 #include "pkt-line.h"
 #include "commit.h"
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index 080af1a..8a5670f 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -4,7 +4,7 @@
  * Copyright (C) Linus Torvalds, 2005
  * Copyright (C) Junio C Hamano, 2005
  */
-#include "cache.h"
+#include "builtin.h"
 #include "blob.h"
 #include "quote.h"
 #include "parse-options.h"
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 2e680d7..9c5c9d6 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "delta.h"
 #include "pack.h"
 #include "csum-file.h"
diff --git a/builtin/merge-index.c b/builtin/merge-index.c
index 2c4cf5e..adc2a6d 100644
--- a/builtin/merge-index.c
+++ b/builtin/merge-index.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "run-command.h"
 #include "exec_cmd.h"
 
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c
index 78b9db7..ad2d77d 100644
--- a/builtin/merge-recursive.c
+++ b/builtin/merge-recursive.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "commit.h"
 #include "tag.h"
 #include "merge-recursive.h"
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index 9b25ddc..1991742 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "tree-walk.h"
 #include "xdiff-interface.h"
 #include "blob.h"
diff --git a/builtin/mktag.c b/builtin/mktag.c
index 1cb0f3f..9148cc0 100644
--- a/builtin/mktag.c
+++ b/builtin/mktag.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "tag.h"
 #include "exec_cmd.h"
 
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index 41e1615..a15e366 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -6,7 +6,7 @@
 *
 */
 
-#include "cache.h"
+#include "builtin.h"
 #include "exec_cmd.h"
 
 #define BLKSIZE 512
diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c
index 091860b..39a9d89 100644
--- a/builtin/pack-refs.c
+++ b/builtin/pack-refs.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "parse-options.h"
 #include "pack-refs.h"
 
diff --git a/builtin/patch-id.c b/builtin/patch-id.c
index 5125300..33e9725 100644
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "exec_cmd.h"
 
 static void flush_current_id(int patchlen, unsigned char *id, git_SHA_CTX *c)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 760817d..f64b79c 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "pack.h"
 #include "refs.h"
 #include "pkt-line.h"
diff --git a/builtin/remote.c b/builtin/remote.c
index 48e0a6b..3cf3c6b 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1,9 +1,8 @@
-#include "cache.h"
+#include "builtin.h"
 #include "parse-options.h"
 #include "transport.h"
 #include "remote.h"
 #include "string-list.h"
-#include "strbuf.h"
 #include "run-command.h"
 #include "refs.h"
 
diff --git a/builtin/reset.c b/builtin/reset.c
index 0037be4..c198b8e 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano
  */
-#include "cache.h"
+#include "builtin.h"
 #include "tag.h"
 #include "object.h"
 #include "commit.h"
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 481602d..a55a517 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "commit.h"
 #include "refs.h"
 #include "pkt-line.h"
diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c
index 608590a..c905d80 100644
--- a/builtin/unpack-file.c
+++ b/builtin/unpack-file.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "blob.h"
 #include "exec_cmd.h"
 
diff --git a/builtin/var.c b/builtin/var.c
index 0744bb8..1787771 100644
--- a/builtin/var.c
+++ b/builtin/var.c
@@ -3,7 +3,7 @@
  *
  * Copyright (C) Eric Biederman, 2005
  */
-#include "cache.h"
+#include "builtin.h"
 #include "exec_cmd.h"
 
 static const char var_usage[] = "git var (-l | <variable>)";
diff --git a/wt-status.c b/wt-status.c
index 54b6b03..b05c6db 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "wt-status.h"
 #include "object.h"
 #include "dir.h"
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 02/63] Add infrastructure for translating Git with gettext
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 01/63] builtin: use builtin.h for all builtin commands Ævar Arnfjörð Bjarmason
@ 2010-09-04 22:10 ` Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 05/63] tests: locate i18n lib&data correctly under --valgrind Ævar Arnfjörð Bjarmason
                   ` (22 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-04 22:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Thomas Rast, Sam Reed, Jan Krüger,
	Ævar Arnfjörð Bjarmason

All of the interface messages in Git core are currently hardcoded in
English. Change that by optionally enabling translation of the core C,
Shell and Perl programs via GNU or SunOS gettext. If you set the
appropriate LC_* variables Git will speak your language, provided that
someone has submitted a translation.

If gettext isn't available, or if Git is compiled with
NO_GETTEXT=YesPlease, then Git fall back on its previous behavior of
only speaking English. When using ./configure the autoconf script will
auto-detect if the gettext libraries are installed and act
appropriately.

With NO_GETTEXT=YesPlease gettext support will be #defined away for C
programs. For Shell and Perl programs we rely on the git message
catalog not being available. That's a reasonable assumption since then
the message catalog won't be installed on the system during make
install.

The gettext wrappers that are provided in the patch are only the bare
minimum required to begin translation work. In particular I haven't
added wrappers for the gettext functions that enable plural support,
or those that provide message context (msgctxt).

Those can be added later. The intent is to start with a small subset
and see what we need later, not to start with something that's
unnecessarily large right away.

Implementation and usage notes:

 * General:

   Gettext .mo files will be installed and looked for in the standard
   $(prefix)/share/locale path. GIT_TEXTDOMAINDIR can also be set to
   override that, but that's only intended to be used to test Git
   itself.

 * Perl:

   Perl code that wants to be localized should use the new Git::I18n
   module. It imports a __ function into the caller's package by
   default.

   Instead of using the high level Locale::TextDomain interface I've
   opted to use the low-level (equivalent to the C interface)
   Locale::Messages module, which Locale::TextDomain itself uses.

   Locale::TextDomain does a lot of redundant work we don't need, and
   some of it would potentially introduce bugs. It tries to set the
   $TEXTDOMAIN based on package of the caller, and has its own
   hardcoded paths where it'll search for messages.

   I found it easier just to completely avoid it rather than try to
   circumvent its behavior. In any case, this is an issue wholly
   internal Git::I18N. Its guts can be changed later if that's deemed
   necessary.

   See <AANLkTilYD_NyIZMyj9dHtVk-ylVBfvyxpCC7982LWnVd@mail.gmail.com>
   for a further elaboration on this topic.

 * Shell:

   Shell code that's to be localized should use the new git-sh-i18n
   library. It's just a wrapper for the system's gettext.sh.

   If gettext.sh isn't available we'll fall back gettext(1) if it's
   available. The latter is available without the former on Solaris,
   which has its own non-GNU gettext implementation. We also need to
   emulate eval_gettext() there.

   If neither are present we'll use a dumb printf(1) fall-through
   wrapper.

   I originally tried to detect if the system supported `echo -n' but
   I found this to be a waste of time. My benchmarks on Linux, Solaris
   and FreeBSD reveal that printf(1) is fast enough, especially since
   we aren't calling gettext() from within any tight loops, and
   unlikely to ever do so.

This series has been tested by me on Ubuntu 10.04, Debian testing,
FreeBSD 8.1 and SunOS 5.10, and by others on Mac OS X 10.6.3 (with
Xcode 3.2.2) and openSUSE Factory (11.3, milestone 7).

SunOS has its own non-GNU gettext implementation which this patch
supports, although that may change in the future if it turns out that
we need some GNU libintl features that SunOS doesn't provide.

This patch is based on work by Jeff Epler <jepler@unpythonic.net> who
did the initial Makefile / C work, and a lot of comments from the Git
mailing list, including Jonathan Nieder, Jakub Narebski, Johannes
Sixt, Peter Krefting, Junio C Hamano, Thomas Rast and others.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Tested-By: John Wiegley <johnw@newartisans.com>
Tested-by: Graham Anderson <graham.anderson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 .gitignore                   |    2 +
 INSTALL                      |   12 +++++
 Makefile                     |   69 +++++++++++++++++++++++++-
 config.mak.in                |    2 +
 configure.ac                 |   12 +++++
 daemon.c                     |    3 +
 fast-import.c                |    3 +
 gettext.c                    |   22 ++++++++
 gettext.h                    |   18 +++++++
 git-sh-i18n.sh               |   71 ++++++++++++++++++++++++++
 git.c                        |    3 +
 http-backend.c               |    3 +
 http-fetch.c                 |    3 +
 http-push.c                  |    3 +
 imap-send.c                  |    3 +
 perl/Git/I18N.pm             |   91 +++++++++++++++++++++++++++++++++
 perl/Makefile                |    3 +-
 perl/Makefile.PL             |   14 +++++-
 po/.gitignore                |    1 +
 po/is.po                     |   40 +++++++++++++++
 shell.c                      |    3 +
 show-index.c                 |    3 +
 t/lib-gettext.sh             |   42 ++++++++++++++++
 t/t0200-gettext.sh           |  113 ++++++++++++++++++++++++++++++++++++++++++
 t/t0200/test.c               |   13 +++++
 t/t0200/test.perl            |   14 +++++
 t/t0200/test.sh              |   14 +++++
 t/t0201-gettext-fallbacks.sh |   49 ++++++++++++++++++
 t/t0202-gettext-perl.sh      |   27 ++++++++++
 t/t0202/test.pl              |  107 +++++++++++++++++++++++++++++++++++++++
 t/test-lib.sh                |    2 +
 upload-pack.c                |    3 +
 32 files changed, 764 insertions(+), 4 deletions(-)
 create mode 100644 gettext.c
 create mode 100644 gettext.h
 create mode 100644 git-sh-i18n.sh
 create mode 100644 perl/Git/I18N.pm
 create mode 100644 po/.gitignore
 create mode 100644 po/is.po
 create mode 100644 t/lib-gettext.sh
 create mode 100755 t/t0200-gettext.sh
 create mode 100644 t/t0200/test.c
 create mode 100644 t/t0200/test.perl
 create mode 100644 t/t0200/test.sh
 create mode 100755 t/t0201-gettext-fallbacks.sh
 create mode 100755 t/t0202-gettext-perl.sh
 create mode 100644 t/t0202/test.pl

diff --git a/.gitignore b/.gitignore
index 20560b8..80ca718 100644
--- a/.gitignore
+++ b/.gitignore
@@ -125,6 +125,7 @@
 /git-rm
 /git-send-email
 /git-send-pack
+/git-sh-i18n
 /git-sh-setup
 /git-shell
 /git-shortlog
@@ -215,3 +216,4 @@
 *.pdb
 /Debug/
 /Release/
+/share/
diff --git a/INSTALL b/INSTALL
index 59200b7..e4e7506 100644
--- a/INSTALL
+++ b/INSTALL
@@ -93,6 +93,18 @@ Issues of note:
 	  history graphically, and in git-gui.  If you don't want gitk or
 	  git-gui, you can use NO_TCLTK.
 
+	- A gettext library is used by default for localizing Git. The
+	  primary target is GNU libintl, but the Solaris gettext
+	  implementation also works.
+
+	  We need a gettext.h on the system for C code, gettext.sh (or
+	  Solaris gettext(1)) for shell scripts, and libintl-perl for Perl
+	  programs.
+
+	  Set NO_GETTEXT to disable localization support and make Git only
+	  use English. Under autoconf the configure script will do this
+	  automatically if it can't find libintl on the system.
+
  - Some platform specific issues are dealt with Makefile rules,
    but depending on your specific installation, you may not
    have all the libraries/tools needed, or you may have
diff --git a/Makefile b/Makefile
index 8b7c243..b834b50 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,15 @@ all::
 # Define NO_EXPAT if you do not have expat installed.  git-http-push is
 # not built, and you cannot push using http:// and https:// transports.
 #
+# Define NO_GETTEXT if you don't want to build with Git with gettext
+# support. Building it requires GNU libintl or another gettext
+# implementation, and additionally libintl-perl at runtime.
+#
+# Define NEEDS_LIBINTL if you haven't set NO_GETTEXT and your system
+# needs to be explicitly linked to -lintl. It's defined automatically
+# on platforms where we don't expect glibc (Linux, Hurd,
+# GNU/kFreeBSD), which includes libintl.
+#
 # Define EXPATDIR=/foo/bar if your expat header and library files are in
 # /foo/bar/include and /foo/bar/lib directories.
 #
@@ -283,6 +292,7 @@ infodir = share/info
 gitexecdir = libexec/git-core
 sharedir = $(prefix)/share
 gitwebdir = $(sharedir)/gitweb
+localedir = $(sharedir)/locale
 template_dir = share/git-core/templates
 htmldir = share/doc/git-doc
 ifeq ($(prefix),/usr)
@@ -296,7 +306,7 @@ lib = lib
 # DESTDIR=
 pathsep = :
 
-export prefix bindir sharedir sysconfdir gitwebdir
+export prefix bindir sharedir sysconfdir gitwebdir localedir
 
 CC = gcc
 AR = ar
@@ -311,6 +321,8 @@ TCLTK_PATH = wish
 PTHREAD_LIBS = -lpthread
 PTHREAD_CFLAGS =
 GCOV = gcov
+XGETTEXT = xgettext
+MSGFMT = msgfmt
 
 export TCL_PATH TCLTK_PATH
 
@@ -372,6 +384,7 @@ SCRIPT_SH += git-web--browse.sh
 SCRIPT_LIB += git-mergetool--lib
 SCRIPT_LIB += git-parse-remote
 SCRIPT_LIB += git-sh-setup
+SCRIPT_LIB += git-sh-i18n
 
 SCRIPT_PERL += git-add--interactive.perl
 SCRIPT_PERL += git-difftool.perl
@@ -543,6 +556,7 @@ LIB_H += userdiff.h
 LIB_H += utf8.h
 LIB_H += xdiff-interface.h
 LIB_H += xdiff/xdiff.h
+LIB_H += gettext.h
 
 LIB_OBJS += abspath.o
 LIB_OBJS += advice.o
@@ -584,6 +598,9 @@ LIB_OBJS += entry.o
 LIB_OBJS += environment.o
 LIB_OBJS += exec_cmd.o
 LIB_OBJS += fsck.o
+ifndef NO_GETTEXT
+LIB_OBJS += gettext.o
+endif
 LIB_OBJS += graph.o
 LIB_OBJS += grep.o
 LIB_OBJS += hash.o
@@ -756,6 +773,14 @@ EXTLIBS =
 # Platform specific tweaks
 #
 
+# Platform specific defaults. Where we'd only like some feature on the
+# minority of systems, e.g. if linking to a library isn't needed
+# because its features are included in the GNU C library.
+ifndef NO_GETTEXT
+	# Systems that use GNU gettext and glibc are the exception
+	NEEDS_LIBINTL = YesPlease
+endif
+
 # We choose to avoid "if .. else if .. else .. endif endif"
 # because maintaining the nesting to match is a pain.  If
 # we had "elif" things would have been much nicer...
@@ -771,11 +796,13 @@ ifeq ($(uname_S),Linux)
 	NO_STRLCPY = YesPlease
 	NO_MKSTEMPS = YesPlease
 	HAVE_PATHS_H = YesPlease
+	NEEDS_LIBINTL =
 endif
 ifeq ($(uname_S),GNU/kFreeBSD)
 	NO_STRLCPY = YesPlease
 	NO_MKSTEMPS = YesPlease
 	HAVE_PATHS_H = YesPlease
+	NEEDS_LIBINTL =
 endif
 ifeq ($(uname_S),UnixWare)
 	CC = cc
@@ -967,6 +994,7 @@ ifeq ($(uname_S),GNU)
 	NO_STRLCPY=YesPlease
 	NO_MKSTEMPS = YesPlease
 	HAVE_PATHS_H = YesPlease
+	NEEDS_LIBINTL =
 endif
 ifeq ($(uname_S),IRIX)
 	NO_SETENV = YesPlease
@@ -1471,6 +1499,14 @@ ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
 	export GIT_TEST_CMP_USE_COPIED_CONTEXT
 endif
 
+ifdef NO_GETTEXT
+	COMPAT_CFLAGS += -DNO_GETTEXT
+endif
+
+ifdef NEEDS_LIBINTL
+	EXTLIBS += -lintl
+endif
+
 ifeq ($(TCLTK_PATH),)
 NO_TCLTK=NoThanks
 endif
@@ -1501,6 +1537,7 @@ ifndef V
 	QUIET_GEN      = @echo '   ' GEN $@;
 	QUIET_LNCP     = @echo '   ' LN/CP $@;
 	QUIET_GCOV     = @echo '   ' GCOV $@;
+	QUIET_MSGFMT   = @echo '   ' MSGFMT $@;
 	QUIET_SUBDIR0  = +@subdir=
 	QUIET_SUBDIR1  = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \
 			 $(MAKE) $(PRINT_DIR) -C $$subdir
@@ -1529,7 +1566,9 @@ template_dir_SQ = $(subst ','\'',$(template_dir))
 htmldir_SQ = $(subst ','\'',$(htmldir))
 prefix_SQ = $(subst ','\'',$(prefix))
 gitwebdir_SQ = $(subst ','\'',$(gitwebdir))
+sharedir_SQ = $(subst ','\'',$(sharedir))
 
+LOCALEDIR_SQ = $(subst ','\'',$(localedir))
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
 PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
@@ -1579,7 +1618,7 @@ ifndef NO_TCLTK
 	$(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
 endif
 ifndef NO_PERL
-	$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
+	$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' localedir='$(localedir_SQ)' all
 endif
 ifndef NO_PYTHON
 	$(QUIET_SUBDIR0)git_remote_helpers $(QUIET_SUBDIR1) PYTHON_PATH='$(PYTHON_PATH_SQ)' prefix='$(prefix_SQ)' all
@@ -1625,6 +1664,7 @@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
     -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
     -e 's|@@DIFF@@|$(DIFF_SQ)|' \
     -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+    -e 's|@@LOCALEDIR@@|$(LOCALEDIR_SQ)|g' \
     -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
     -e $(BROKEN_PATH_FIX) \
     $@.sh >$@+
@@ -1966,6 +2006,21 @@ cscope:
 	$(RM) cscope*
 	$(FIND) . -name '*.[hcS]' -print | xargs cscope -b
 
+pot:
+	$(XGETTEXT) --add-comments --keyword=_ --keyword=N_ --output=po/git.pot --language=C $(C_OBJ:o=c) t/t0200/test.c
+	$(XGETTEXT) --add-comments --join-existing --output=po/git.pot --language=Shell $(SCRIPT_SH) t/t0200/test.sh
+	$(XGETTEXT) --add-comments --join-existing --keyword=__ --output=po/git.pot --language=Perl $(SCRIPT_PERL) t/t0200/test.perl
+
+POFILES := $(wildcard po/*.po)
+MOFILES := $(patsubst po/%.po,share/locale/%/LC_MESSAGES/git.mo,$(POFILES))
+MODIRS := $(patsubst po/%.po,share/locale/%/LC_MESSAGES/,$(POFILES))
+ifndef NO_GETTEXT
+all:: $(MOFILES)
+endif
+share/locale/%/LC_MESSAGES/git.mo: po/%.po
+	@mkdir -p $(dir $@)
+	$(QUIET_MSGFMT)$(MSGFMT) -o $@ $<
+
 ### Detect prefix changes
 TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
              $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
@@ -1995,6 +2050,7 @@ endif
 ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
 	@echo GIT_TEST_CMP_USE_COPIED_CONTEXT=YesPlease >>$@
 endif
+	@echo NO_GETTEXT=\''$(subst ','\'',$(subst ','\'',$(NO_GETTEXT)))'\' >>$@
 
 ### Detect Tck/Tk interpreter path changes
 ifndef NO_TCLTK
@@ -2092,6 +2148,11 @@ install: all
 	$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
+ifndef NO_GETTEXT
+	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sharedir_SQ)/locale'
+	(cd share && tar cf - locale) | \
+		(cd '$(DESTDIR_SQ)$(sharedir_SQ)' && umask 022 && tar xof -)
+endif
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
 ifndef NO_PERL
 	$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
@@ -2249,6 +2310,10 @@ ifndef NO_TCLTK
 	$(MAKE) -C git-gui clean
 endif
 	$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS
+ifndef NO_GETTEXT
+	$(RM) po/git.pot
+	$(RM) -r share/
+endif
 
 .PHONY: all install clean strip
 .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
diff --git a/config.mak.in b/config.mak.in
index a0c34ee..9f47aa5 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -34,9 +34,11 @@ NO_CURL=@NO_CURL@
 NO_EXPAT=@NO_EXPAT@
 NO_LIBGEN_H=@NO_LIBGEN_H@
 HAVE_PATHS_H=@HAVE_PATHS_H@
+NO_GETTEXT=@NO_GETTEXT@
 NEEDS_LIBICONV=@NEEDS_LIBICONV@
 NEEDS_SOCKET=@NEEDS_SOCKET@
 NEEDS_RESOLV=@NEEDS_RESOLV@
+NEEDS_LIBINTL=@NEEDS_LIBINTL@
 NEEDS_LIBGEN=@NEEDS_LIBGEN@
 NO_SYS_SELECT_H=@NO_SYS_SELECT_H@
 NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@
diff --git a/configure.ac b/configure.ac
index 56731c3..1821d89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -600,6 +600,12 @@ AC_CHECK_LIB([c], [basename],
 AC_SUBST(NEEDS_LIBGEN)
 test -n "$NEEDS_LIBGEN" && LIBS="$LIBS -lgen"
 
+AC_CHECK_LIB([c], [gettext],
+[NEEDS_LIBINTL=],
+[NEEDS_LIBINTL=YesPlease])
+AC_SUBST(NEEDS_LIBINTL)
+test -n "$NEEDS_LIBINTL" && LIBS="$LIBS -lintl"
+
 ## Checks for header files.
 AC_MSG_NOTICE([CHECKS for header files])
 #
@@ -798,6 +804,12 @@ AC_CHECK_HEADER([paths.h],
 [HAVE_PATHS_H=])
 AC_SUBST(HAVE_PATHS_H)
 #
+# Define NO_GETTEXT if you don't have libintl.h
+AC_CHECK_HEADER([libintl.h],
+[NO_GETTEXT=],
+[NO_GETTEXT=YesPlease])
+AC_SUBST(NO_GETTEXT)
+#
 # Define NO_STRCASESTR if you don't have strcasestr.
 GIT_CHECK_FUNC(strcasestr,
 [NO_STRCASESTR=],
diff --git a/daemon.c b/daemon.c
index e22a2b7..784f897 100644
--- a/daemon.c
+++ b/daemon.c
@@ -3,6 +3,7 @@
 #include "exec_cmd.h"
 #include "run-command.h"
 #include "strbuf.h"
+#include "gettext.h"
 
 #include <syslog.h>
 
@@ -975,6 +976,8 @@ int main(int argc, char **argv)
 	gid_t gid = 0;
 	int i;
 
+	git_setup_gettext();
+
 	git_extract_argv0_path(argv[0]);
 
 	for (i = 1; i < argc; i++) {
diff --git a/fast-import.c b/fast-import.c
index 2317b0f..7fb2a86 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -156,6 +156,7 @@ Format of STDIN stream:
 #include "csum-file.h"
 #include "quote.h"
 #include "exec_cmd.h"
+#include "gettext.h"
 
 #define PACK_ID_BITS 16
 #define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)
@@ -2918,6 +2919,8 @@ int main(int argc, const char **argv)
 
 	git_extract_argv0_path(argv[0]);
 
+	git_setup_gettext();
+
 	if (argc == 2 && !strcmp(argv[1], "-h"))
 		usage(fast_import_usage);
 
diff --git a/gettext.c b/gettext.c
new file mode 100644
index 0000000..7ae5cae
--- /dev/null
+++ b/gettext.c
@@ -0,0 +1,22 @@
+#include "exec_cmd.h"
+#include <locale.h>
+#include <libintl.h>
+#include <stdlib.h>
+
+extern void git_setup_gettext(void) {
+	char *podir;
+	char *envdir = getenv("GIT_TEXTDOMAINDIR");
+
+	if (envdir) {
+		(void)bindtextdomain("git", envdir);
+	} else {
+		podir = (char *)system_path("share/locale");
+		if (!podir) return;
+		(void)bindtextdomain("git", podir);
+		free(podir);
+	}
+
+	(void)setlocale(LC_MESSAGES, "");
+	(void)setlocale(LC_CTYPE, "");
+	(void)textdomain("git");
+}
diff --git a/gettext.h b/gettext.h
new file mode 100644
index 0000000..e02939a
--- /dev/null
+++ b/gettext.h
@@ -0,0 +1,18 @@
+#ifndef GETTEXT_H
+#define GETTEXT_H
+
+#ifdef NO_GETTEXT
+static inline void git_setup_gettext(void) {}
+#else
+extern void git_setup_gettext(void);
+#endif
+
+#define N_(s) (s)
+#ifdef NO_GETTEXT
+#define _(s) (s)
+#else
+#include <libintl.h>
+#define _(s) gettext(s)
+#endif
+
+#endif
diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh
new file mode 100644
index 0000000..698a000
--- /dev/null
+++ b/git-sh-i18n.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+# This is Git's interface to gettext.sh. Use it right after
+# git-sh-setup as:
+#
+#   . git-sh-setup
+#   . git-sh-i18n
+#
+#   # For constant interface messages:
+#   gettext "A message for the user"; echo
+#
+#   # To interpolate variables:
+#   details="oh noes"
+#   eval_gettext "An error occured: \$details"; echo
+#
+# See "info '(gettext)sh'" for the full manual.
+
+# Export the TEXTDOMAIN* data that we need for Git
+TEXTDOMAIN=git
+export TEXTDOMAIN
+if [ -z "$GIT_TEXTDOMAINDIR" ]
+then
+	TEXTDOMAINDIR="@@LOCALEDIR@@"
+else
+	TEXTDOMAINDIR="$GIT_TEXTDOMAINDIR"
+fi
+export TEXTDOMAINDIR
+
+if test -z "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" && type gettext.sh >/dev/null 2>&1
+then
+	# This is GNU libintl's gettext.sh, we don't need to do anything
+	# else than setting up the environment and loading gettext.sh
+	GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu
+	export GIT_INTERNAL_GETTEXT_SH_SCHEME
+
+	# Try to use libintl's gettext.sh, or fall back to English if we
+	# can't.
+	. gettext.sh
+elif test -z "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" && test "$(gettext -h 2>&1)" = "-h"
+then
+	# We don't have gettext.sh, but there's a gettext binary in our
+	# path. This is probably Solaris or something like it which has a
+	# gettext implementation that isn't GNU libintl.
+	GIT_INTERNAL_GETTEXT_SH_SCHEME=solaris
+	export GIT_INTERNAL_GETTEXT_SH_SCHEME
+
+	# Solaris has a gettext(1) but no eval_gettext(1)
+	eval_gettext () {
+		gettext_out=$(gettext "$1")
+		gettext_eval="printf '%s' \"$gettext_out\""
+		printf "%s" "`eval \"$gettext_eval\"`"
+	}
+else
+	# Since gettext.sh isn't available we'll have to define our own
+	# dummy pass-through functions.
+
+	# Tell our tests that we don't have the real gettext.sh
+	GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough
+	export GIT_INTERNAL_GETTEXT_SH_SCHEME
+
+	gettext () {
+		printf "%s" "$1"
+	}
+
+	eval_gettext () {
+		gettext_eval="printf '%s' \"$1\""
+		printf "%s" "`eval \"$gettext_eval\"`"
+	}
+fi
diff --git a/git.c b/git.c
index 8de4810..f154852 100644
--- a/git.c
+++ b/git.c
@@ -3,6 +3,7 @@
 #include "cache.h"
 #include "quote.h"
 #include "run-command.h"
+#include "gettext.h"
 
 const char git_usage_string[] =
 	"git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]\n"
@@ -502,6 +503,8 @@ int main(int argc, const char **argv)
 	if (!cmd)
 		cmd = "git-help";
 
+	git_setup_gettext();
+
 	/*
 	 * "git-xxxx" is the same as "git xxxx", but we obviously:
 	 *
diff --git a/http-backend.c b/http-backend.c
index 14c90c2..502103d 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -7,6 +7,7 @@
 #include "run-command.h"
 #include "string-list.h"
 #include "url.h"
+#include "gettext.h"
 
 static const char content_type[] = "Content-Type";
 static const char content_length[] = "Content-Length";
@@ -550,6 +551,8 @@ int main(int argc, char **argv)
 	char *cmd_arg = NULL;
 	int i;
 
+	git_setup_gettext();
+
 	git_extract_argv0_path(argv[0]);
 	set_die_routine(die_webcgi);
 
diff --git a/http-fetch.c b/http-fetch.c
index 762c750..b889c36 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -2,6 +2,7 @@
 #include "exec_cmd.h"
 #include "http.h"
 #include "walker.h"
+#include "gettext.h"
 
 static const char http_fetch_usage[] = "git http-fetch "
 "[-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url";
@@ -24,6 +25,8 @@ int main(int argc, const char **argv)
 	int get_verbosely = 0;
 	int get_recover = 0;
 
+	git_setup_gettext();
+
 	git_extract_argv0_path(argv[0]);
 
 	while (arg < argc && argv[arg][0] == '-') {
diff --git a/http-push.c b/http-push.c
index c9bcd11..fc2c5f7 100644
--- a/http-push.c
+++ b/http-push.c
@@ -10,6 +10,7 @@
 #include "remote.h"
 #include "list-objects.h"
 #include "sigchain.h"
+#include "gettext.h"
 
 #include <expat.h>
 
@@ -1791,6 +1792,8 @@ int main(int argc, char **argv)
 	struct remote *remote;
 	char *rewritten_url = NULL;
 
+	git_setup_gettext();
+
 	git_extract_argv0_path(argv[0]);
 
 	repo = xcalloc(sizeof(*repo), 1);
diff --git a/imap-send.c b/imap-send.c
index 71506a8..c9dc7ec 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -25,6 +25,7 @@
 #include "cache.h"
 #include "exec_cmd.h"
 #include "run-command.h"
+#include "gettext.h"
 #ifdef NO_OPENSSL
 typedef void *SSL;
 #else
@@ -1539,6 +1540,8 @@ int main(int argc, char **argv)
 
 	git_extract_argv0_path(argv[0]);
 
+	git_setup_gettext();
+
 	if (argc != 1)
 		usage(imap_send_usage);
 
diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm
new file mode 100644
index 0000000..5918d68
--- /dev/null
+++ b/perl/Git/I18N.pm
@@ -0,0 +1,91 @@
+package Git::I18N;
+use 5.006002;
+use strict;
+use warnings;
+use Exporter;
+use base 'Exporter';
+
+our $VERSION = '0.01';
+
+our @EXPORT = qw(__);
+our @EXPORT_OK = @EXPORT;
+
+sub __bootstrap_locale_messages {
+	our $TEXTDOMAIN = 'git';
+	our $TEXTDOMAINDIR = $ENV{GIT_TEXTDOMAINDIR} || '++LOCALEDIR++';
+
+	require POSIX;
+	POSIX->import(qw(setlocale));
+	# Non-core prerequisite module
+	require Locale::Messages;
+	Locale::Messages->import(qw(:locale_h :libintl_h));
+
+	setlocale(LC_MESSAGES(), '');
+	setlocale(LC_CTYPE(), '');
+	textdomain($TEXTDOMAIN);
+	bindtextdomain($TEXTDOMAIN => $TEXTDOMAINDIR);
+
+	return;
+}
+
+BEGIN
+{
+	# Used by our test script to see if it should test fallbacks or
+	# not.
+	our $__HAS_LIBRARY = 1;
+
+	local $@;
+	eval { __bootstrap_locale_messages() };
+	if ($@) {
+		# Tell test.pl that we couldn't load the gettext library.
+		$Git::I18N::__HAS_LIBRARY = 0;
+
+		# Just a fall-through no-op
+		*__ = sub ($) { $_[0] };
+	} else {
+		*__ = \&Locale::Messages::gettext;
+	}
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Git::I18N - Perl interface to Git's Gettext localizations
+
+=head1 SYNOPSIS
+
+	use Git::I18N;
+
+	print __("Welcome to Git!\n");
+
+	printf __("The following error occured: %s\n"), $error;
+
+=head1 DESCRIPTION
+
+Git's internal Perl interface to gettext via L<Locale::Messages>. If
+L<Locale::Messages> can't be loaded (it's not a core module) we
+provide stub passthrough fallbacks.
+
+This is a distilled interface to gettext, see C<info '(gettext)Perl'>
+for the full interface. This module implements only a small part of
+it.
+
+=head1 FUNCTIONS
+
+=head2 __($)
+
+L<Locale::Messages>'s gettext function if all goes well, otherwise our
+passthrough fallback function.
+
+=head1 AUTHOR
+
+E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avarab@gmail.com>
+
+=head1 COPYRIGHT
+
+Copyright 2010 E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avarab@gmail.com>
+
+=cut
diff --git a/perl/Makefile b/perl/Makefile
index a2ffb64..b2977cd 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -5,6 +5,7 @@ makfile:=perl.mak
 
 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
 prefix_SQ = $(subst ','\'',$(prefix))
+localedir_SQ = $(subst ','\'',$(localedir))
 
 ifndef V
 	QUIET = @
@@ -38,7 +39,7 @@ $(makfile): ../GIT-CFLAGS Makefile
 	echo '	echo $(instdir_SQ)' >> $@
 else
 $(makfile): Makefile.PL ../GIT-CFLAGS
-	$(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE=''
+	$(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE='' --localedir='$(localedir_SQ)'
 endif
 
 # this is just added comfort for calling make directly in perl dir
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
index 0b9deca..456d45b 100644
--- a/perl/Makefile.PL
+++ b/perl/Makefile.PL
@@ -1,4 +1,12 @@
+use strict;
+use warnings;
 use ExtUtils::MakeMaker;
+use Getopt::Long;
+
+# Sanity: die at first unknown option
+Getopt::Long::Configure qw/ pass_through /;
+
+GetOptions("localedir=s" => \my $localedir);
 
 sub MY::postamble {
 	return <<'MAKE_FRAG';
@@ -16,7 +24,10 @@ endif
 MAKE_FRAG
 }
 
-my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm');
+my %pm = (
+	'Git.pm' => '$(INST_LIBDIR)/Git.pm',
+	'Git/I18N.pm' => '$(INST_LIBDIR)/Git/I18N.pm',
+);
 
 # We come with our own bundled Error.pm. It's not in the set of default
 # Perl modules so install it if it's not available on the system yet.
@@ -33,6 +44,7 @@ WriteMakefile(
 	NAME            => 'Git',
 	VERSION_FROM    => 'Git.pm',
 	PM		=> \%pm,
+	PM_FILTER	=> qq[\$(PERL) -pe "s<\\Q++LOCALEDIR++\\E><$localedir>"],
 	MAKEFILE	=> 'perl.mak',
 	INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'
 );
diff --git a/po/.gitignore b/po/.gitignore
new file mode 100644
index 0000000..221000e
--- /dev/null
+++ b/po/.gitignore
@@ -0,0 +1 @@
+/*.pot
diff --git a/po/is.po b/po/is.po
new file mode 100644
index 0000000..03ca199
--- /dev/null
+++ b/po/is.po
@@ -0,0 +1,40 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Git\n"
+"PO-Revision-Date: 2010-06-05 19:06 +0000\n"
+"Language-Team: Git Mailing List <git@vger.kernel.org>\n"
+"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
+"Last-Translator: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "See git help COMMAND for more information on a specific command."
+msgstr "Sjá git help SKIPUN til að sjá hjálp fyrir tiltekna skipun."
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+msgid "TEST: A C test string"
+msgstr "TILRAUN: C tilraunastrengur"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#, c-format
+msgid "TEST: A C test string %s"
+msgstr "TILRAUN: C tilraunastrengur %s"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+msgid "TEST: A Shell test string"
+msgstr "TILRAUN: Skeljartilraunastrengur"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#, sh-format
+msgid "TEST: A Shell test $variable"
+msgstr "TILRAUN: Skeljartilraunastrengur með breytunni $variable"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+msgid "TEST: A Perl test string"
+msgstr "TILRAUN: Perl tilraunastrengur"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
+#, perl-format
+msgid "TEST: A Perl test variable %s"
+msgstr "TILRAUN: Perl tilraunastrengur með breytunni %s"
diff --git a/shell.c b/shell.c
index e4864e0..ba27c6b 100644
--- a/shell.c
+++ b/shell.c
@@ -2,6 +2,7 @@
 #include "quote.h"
 #include "exec_cmd.h"
 #include "strbuf.h"
+#include "gettext.h"
 
 static int do_generic_cmd(const char *me, char *arg)
 {
@@ -51,6 +52,8 @@ int main(int argc, char **argv)
 	struct commands *cmd;
 	int devnull_fd;
 
+	git_setup_gettext();
+
 	/*
 	 * Always open file descriptors 0/1/2 to avoid clobbering files
 	 * in die().  It also avoids not messing up when the pipes are
diff --git a/show-index.c b/show-index.c
index 4c0ac13..c2f5448 100644
--- a/show-index.c
+++ b/show-index.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "pack.h"
+#include "gettext.h"
 
 static const char show_index_usage[] =
 "git show-index < <packed archive index>";
@@ -11,6 +12,8 @@ int main(int argc, char **argv)
 	unsigned int version;
 	static unsigned int top_index[256];
 
+	git_setup_gettext();
+
 	if (argc != 1)
 		usage(show_index_usage);
 	if (fread(top_index, 2 * 4, 1, stdin) != 1)
diff --git a/t/lib-gettext.sh b/t/lib-gettext.sh
new file mode 100644
index 0000000..831ee38
--- /dev/null
+++ b/t/lib-gettext.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+. ./test-lib.sh
+
+GIT_TEXTDOMAINDIR="$GIT_EXEC_PATH/share/locale"
+GIT_PO_PATH="$GIT_EXEC_PATH/po"
+export GIT_TEXTDOMAINDIR GIT_PO_PATH
+
+. "$GIT_EXEC_PATH"/git-sh-i18n
+
+if test_have_prereq GETTEXT
+then
+	# is_IS.UTF-8 on Solaris and FreeBSD, is_IS.utf8 on Debian
+	is_IS_locale=$(locale -a | sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
+		p
+		q
+	}')
+	# Export it as an environmental variable so the t0202/test.pl Perl
+	# test can use it too
+	export is_IS_locale
+
+	if test -n "$is_IS_locale" &&
+		test $GIT_INTERNAL_GETTEXT_SH_SCHEME != "fallthrough"
+	then
+		# Some of the tests need the reference Icelandic locale
+		test_set_prereq GETTEXT_LOCALE
+
+		# Exporting for t0202/test.pl
+		GETTEXT_LOCALE=1
+		export GETTEXT_LOCALE
+		say "# lib-gettext: Found '$is_IS_locale' as a is_IS UTF-8 locale"
+	else
+		say "# lib-gettext: No is_IS UTF-8 locale available"
+	fi
+else
+	# Only run some tests when we don't have gettext support
+	test_set_prereq NO_GETTEXT
+	say "# lib-gettext: No GETTEXT support available"
+fi
diff --git a/t/t0200-gettext.sh b/t/t0200-gettext.sh
new file mode 100755
index 0000000..522338d
--- /dev/null
+++ b/t/t0200-gettext.sh
@@ -0,0 +1,113 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+test_description='Gettext support for Git'
+
+. ./lib-gettext.sh
+
+test_expect_success "sanity: \$GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to $GIT_INTERNAL_GETTEXT_SH_SCHEME)" '
+    test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"
+'
+
+test_expect_success 'sanity: $TEXTDOMAIN is git' '
+    test $TEXTDOMAIN = "git"
+'
+
+test_expect_success 'xgettext sanity: Perl _() strings are not extracted' '
+    ! grep "A Perl string xgettext will not get" "$GIT_PO_PATH"/is.po
+'
+
+test_expect_success 'xgettext sanity: Comment extraction with --add-comments' '
+    grep "TRANSLATORS: This is a test" "$TEST_DIRECTORY"/t0200/* | wc -l >expect &&
+    grep "TRANSLATORS: This is a test" "$GIT_PO_PATH"/is.po  | wc -l >actual &&
+    test_cmp expect actual
+'
+
+test_expect_success 'xgettext sanity: Comment extraction with --add-comments stops at statements' '
+    ! grep "This is a phony" "$GIT_PO_PATH"/is.po &&
+    ! grep "the above comment" "$GIT_PO_PATH"/is.po
+'
+
+test_expect_success GETTEXT 'sanity: $TEXTDOMAINDIR exists without NO_GETTEXT=YesPlease' '
+    test -d "$TEXTDOMAINDIR" &&
+    test "$TEXTDOMAINDIR" = "$GIT_TEXTDOMAINDIR"
+'
+
+test_expect_success GETTEXT 'sanity: Icelandic locale was compiled' '
+    test -f "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo"
+'
+
+test_expect_success NO_GETTEXT "sanity: \$TEXTDOMAINDIR doesn't exists with NO_GETTEXT=YesPlease" '
+    ! test -d "$TEXTDOMAINDIR" &&
+    test "$TEXTDOMAINDIR" = "$GIT_TEXTDOMAINDIR"
+'
+
+# TODO: When we have more locales, generalize this to test them
+# all. Maybe we'll need a dir->locale map for that.
+test_expect_success GETTEXT_LOCALE 'sanity: gettext("") metadata is OK' '
+    # Return value may be non-zero
+    LANGUAGE=is LC_ALL="$is_IS_locale" gettext "" >zero-expect &&
+    grep "Project-Id-Version: Git" zero-expect &&
+    grep "Git Mailing List <git@vger.kernel.org>" zero-expect &&
+    grep "Content-Type: text/plain; charset=UTF-8" zero-expect &&
+    grep "Content-Transfer-Encoding: 8bit" zero-expect
+'
+
+test_expect_success GETTEXT_LOCALE 'sanity: gettext(unknown) is passed through' '
+    printf "This is not a translation string"  >expect &&
+    gettext "This is not a translation string" >actual &&
+    eval_gettext "This is not a translation string" >actual &&
+    test_cmp expect actual
+'
+
+# xgettext from C
+test_expect_success GETTEXT_LOCALE 'xgettext: C extraction of _() and N_() strings' '
+    printf "TILRAUN: C tilraunastrengur" >expect &&
+    printf "\n" >>expect &&
+    printf "Sjá git help SKIPUN til að sjá hjálp fyrir tiltekna skipun." >>expect &&
+    LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A C test string" >actual &&
+    printf "\n" >>actual &&
+    LANGUAGE=is LC_ALL="$is_IS_locale" gettext "See git help COMMAND for more information on a specific command." >>actual &&
+    test_cmp expect actual
+'
+
+test_expect_success GETTEXT_LOCALE 'xgettext: C extraction with %s' '
+    printf "TILRAUN: C tilraunastrengur %%s" >expect &&
+    LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A C test string %s" >actual &&
+    test_cmp expect actual
+'
+
+# xgettext from Shell
+test_expect_success GETTEXT_LOCALE 'xgettext: Shell extraction' '
+    printf "TILRAUN: Skeljartilraunastrengur" >expect &&
+    LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Shell test string" >actual &&
+    test_cmp expect actual
+'
+
+test_expect_success GETTEXT_LOCALE 'xgettext: Shell extraction with $variable' '
+    printf "TILRAUN: Skeljartilraunastrengur með breytunni a var i able" >x-expect &&
+    LANGUAGE=is LC_ALL="$is_IS_locale" variable="a var i able" eval_gettext "TEST: A Shell test \$variable" >x-actual &&
+    test_cmp x-expect x-actual
+'
+
+# xgettext from Perl
+test_expect_success GETTEXT_LOCALE 'xgettext: Perl extraction' '
+    printf "TILRAUN: Perl tilraunastrengur" >expect &&
+    LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Perl test string" >actual &&
+    test_cmp expect actual
+'
+
+test_expect_success GETTEXT_LOCALE 'xgettext: Perl extraction with %s' '
+    printf "TILRAUN: Perl tilraunastrengur með breytunni %%s" >expect &&
+    LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Perl test variable %s" >actual &&
+    test_cmp expect actual
+'
+
+test_expect_success GETTEXT_LOCALE 'sanity: Some gettext("") data for real locale' '
+    LANGUAGE=is LC_ALL="$is_IS_locale" gettext "" >real-locale &&
+    test -s real-locale
+'
+
+test_done
diff --git a/t/t0200/test.c b/t/t0200/test.c
new file mode 100644
index 0000000..93373b3
--- /dev/null
+++ b/t/t0200/test.c
@@ -0,0 +1,13 @@
+/* This is a phony C program that's only here to test xgettext message extraction */
+
+const char help[] =
+	N_("See 'git help COMMAND' for more information on a specific command.");
+
+int main(void)
+{
+	/* TRANSLATORS: This is a test. You don't need to translate it. */
+	puts(_("TEST: A C test string"));
+
+	/* TRANSLATORS: This is a test. You don't need to translate it. */
+	printf(_("TEST: A C test string %s"), "variable");
+}
diff --git a/t/t0200/test.perl b/t/t0200/test.perl
new file mode 100644
index 0000000..36fba34
--- /dev/null
+++ b/t/t0200/test.perl
@@ -0,0 +1,14 @@
+# This is a phony Perl program that's only here to test xgettext
+# message extraction
+
+# so the above comment won't be folded into the next one by xgettext
+1;
+
+# TRANSLATORS: This is a test. You don't need to translate it.
+print __("TEST: A Perl test string");
+
+# TRANSLATORS: This is a test. You don't need to translate it.
+printf __("TEST: A Perl test variable %s"), "moo";
+
+# TRANSLATORS: If you see this, Git has a bug
+print _"TEST: A Perl string xgettext will not get";
diff --git a/t/t0200/test.sh b/t/t0200/test.sh
new file mode 100644
index 0000000..022d607
--- /dev/null
+++ b/t/t0200/test.sh
@@ -0,0 +1,14 @@
+# This is a phony Shell program that's only here to test xgettext
+# message extraction
+
+# so the above comment won't be folded into the next one by xgettext
+echo
+
+# TRANSLATORS: This is a test. You don't need to translate it.
+gettext "TEST: A Shell test string"
+
+# TRANSLATORS: This is a test. You don't need to translate it.
+eval_gettext "TEST: A Shell test \$variable"
+
+# TRANSLATORS: If you see this, Git has a bug
+_("TEST: A Shell string xgettext won't get")
diff --git a/t/t0201-gettext-fallbacks.sh b/t/t0201-gettext-fallbacks.sh
new file mode 100755
index 0000000..47ce4f6
--- /dev/null
+++ b/t/t0201-gettext-fallbacks.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+test_description='Gettext Shell fallbacks'
+
+GIT_INTERNAL_GETTEXT_TEST_FALLBACKS=YesPlease
+export GIT_INTERNAL_GETTEXT_TEST_FALLBACKS
+
+. ./lib-gettext.sh
+
+test_expect_success "sanity: \$GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to $GIT_INTERNAL_GETTEXT_SH_SCHEME)" '
+    test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"
+'
+
+test_expect_success 'sanity: $GIT_INTERNAL_GETTEXT_TEST_FALLBACKS is set' '
+    test -n "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS"
+'
+
+test_expect_success 'sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is fallthrough' '
+    test "$GIT_INTERNAL_GETTEXT_SH_SCHEME" = "fallthrough"
+'
+
+test_expect_success 'gettext: our gettext() fallback has pass-through semantics' '
+    printf "test" >expect &&
+    gettext "test" >actual &&
+    test_cmp expect actual &&
+    printf "test more words" >expect &&
+    gettext "test more words" >actual &&
+    test_cmp expect actual
+'
+
+test_expect_success 'eval_gettext: our eval_gettext() fallback has pass-through semantics' '
+    printf "test" >expect &&
+    eval_gettext "test" >actual &&
+    test_cmp expect actual &&
+    printf "test more words" >expect &&
+    eval_gettext "test more words" >actual &&
+    test_cmp expect actual
+'
+
+test_expect_success 'eval_gettext: our eval_gettext() fallback can interpolate variables' '
+    printf "test YesPlease" >expect &&
+    eval_gettext "test \$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" >actual &&
+    test_cmp expect actual
+'
+
+test_done
diff --git a/t/t0202-gettext-perl.sh b/t/t0202-gettext-perl.sh
new file mode 100755
index 0000000..428ebb0
--- /dev/null
+++ b/t/t0202-gettext-perl.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+test_description='Perl gettext interface (Git::I18N)'
+
+. ./lib-gettext.sh
+
+if ! test_have_prereq PERL; then
+	skip_all='skipping perl interface tests, perl not available'
+	test_done
+fi
+
+"$PERL_PATH" -MTest::More -e 0 2>/dev/null || {
+	skip_all="Perl Test::More unavailable, skipping test"
+	test_done
+}
+
+# The external test will outputs its own plan
+test_external_has_tap=1
+
+test_external_without_stderr \
+    'Perl Git::I18N API' \
+    "$PERL_PATH" "$TEST_DIRECTORY"/t0202/test.pl
+
+test_done
diff --git a/t/t0202/test.pl b/t/t0202/test.pl
new file mode 100644
index 0000000..c2055fa
--- /dev/null
+++ b/t/t0202/test.pl
@@ -0,0 +1,107 @@
+#!/usr/bin/perl
+use 5.006002;
+use lib (split(/:/, $ENV{GITPERLLIB}));
+use warnings;
+use strict;
+use Test::More tests => 9;
+use Git::I18N;
+use POSIX qw(:locale_h);
+
+my $has_gettext_library = $Git::I18N::__HAS_LIBRARY;
+
+ok(1, "Testing Git::I18N version $Git::I18N::VERSION with " .
+	 ($has_gettext_library
+	  ? "Locale::Messages version $Locale::Messages::VERSION"
+	  : "NO Perl gettext library"));
+ok(1, "Git::I18N is located at $INC{'Git/I18N.pm'}");
+
+ok($Git::I18N::VERSION, 'sanity: Git::I18N defines a $VERSION');
+{
+	my $exports = @Git::I18N::EXPORT;
+	ok($exports, "sanity: Git::I18N has $exports export(s)");
+}
+is_deeply(\@Git::I18N::EXPORT, \@Git::I18N::EXPORT_OK, "sanity: Git::I18N exports everything by default");
+
+# prototypes
+{
+	# Add prototypes here when modifying the public interface to add
+	# more gettext wrapper functions.
+	my %prototypes = (qw(
+		__	$
+    ));
+	while (my ($sub, $proto) = each %prototypes) {
+		is(prototype(\&{"Git::I18N::$sub"}), $proto, "sanity: $sub has a $proto prototype");
+	}
+}
+
+# Test basic passthrough in the C locale
+{
+	local $ENV{LANGUAGE} = 'C';
+	local $ENV{LC_ALL}   = 'C';
+	local $ENV{LANG} = 'C';
+
+	my ($got, $expect) = (('TEST: A Perl test string') x 2);
+
+	is(__($got), $expect, "Passing a string through __() in the C locale works");
+}
+
+# Test a basic message on different locales
+SKIP: {
+	unless ($ENV{GETTEXT_LOCALE}) {
+		# Can't reliably test __() with a non-C locales because the
+		# required locales may not be installed on the system.
+		#
+		# We test for these anyway as part of the shell
+		# tests. Skipping these here will eliminate failures on odd
+		# platforms with incomplete locale data.
+
+		skip "GETTEXT_LOCALE must be set by lib-gettext.sh for exhaustive Git::I18N tests", 2;
+	}
+
+	# The is_IS UTF-8 locale passed from lib-gettext.sh
+	my $is_IS_locale = $ENV{is_IS_locale};
+
+	my $test = sub {
+		my ($got, $expect, $msg, $locale) = @_;
+		# Maybe this system doesn't have the locale we're trying to
+		# test.
+		my $locale_ok = setlocale(LC_ALL, $locale);
+		is(__($got), $expect, "$msg a gettext library + <$locale> locale <$got> turns into <$expect>");
+	};
+
+	my $env_C = sub {
+		$ENV{LANGUAGE} = 'C';
+		$ENV{LC_ALL}   = 'C';
+	};
+
+	my $env_is = sub {
+		$ENV{LANGUAGE} = 'is';
+		$ENV{LC_ALL}   = $is_IS_locale;
+	};
+
+	# Translation's the same as the original
+	my ($got, $expect) = (('TEST: A Perl test string') x 2);
+
+	if ($has_gettext_library) {
+		{
+			local %ENV; $env_C->();
+			$test->($got, $expect, "With", 'C');
+		}
+
+		{
+			my ($got, $expect) = ($got, 'TILRAUN: Perl tilraunastrengur');
+			local %ENV; $env_is->();
+			$test->($got, $expect, "With", $is_IS_locale);
+		}
+	} else {
+		{
+			local %ENV; $env_C->();
+			$test->($got, $expect, "Without", 'C');
+		}
+
+		{
+			local %ENV; $env_is->();
+			$test->($got, $expect, "Without", 'is');
+		}
+	}
+}
diff --git a/t/test-lib.sh b/t/test-lib.sh
index dff5e25..3fcb272 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -37,6 +37,7 @@ ORIGINAL_TERM=$TERM
 # For repeatability, reset the environment to known value.
 LANG=C
 LC_ALL=C
+LANGUAGE=C
 PAGER=cat
 TZ=UTC
 TERM=dumb
@@ -961,6 +962,7 @@ esac
 
 test -z "$NO_PERL" && test_set_prereq PERL
 test -z "$NO_PYTHON" && test_set_prereq PYTHON
+test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
 
 # test whether the filesystem supports symbolic links
 ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
diff --git a/upload-pack.c b/upload-pack.c
index 92f9530..ce27a1a 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -10,6 +10,7 @@
 #include "revision.h"
 #include "list-objects.h"
 #include "run-command.h"
+#include "gettext.h"
 
 static const char upload_pack_usage[] = "git upload-pack [--strict] [--timeout=nn] <dir>";
 
@@ -682,6 +683,8 @@ int main(int argc, char **argv)
 	int i;
 	int strict = 0;
 
+	git_setup_gettext();
+
 	git_extract_argv0_path(argv[0]);
 	read_replace_refs = 0;
 
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 05/63] tests: locate i18n lib&data correctly under --valgrind
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 01/63] builtin: use builtin.h for all builtin commands Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 02/63] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
@ 2010-09-04 22:10 ` Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 21/63] po/is.po: add Icelandic translation Ævar Arnfjörð Bjarmason
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-04 22:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Thomas Rast, Sam Reed, Jan Krüger,
	Ævar Arnfjörð Bjarmason

From: Thomas Rast <trast@student.ethz.ch>

The new t020[01] for gettext support did not find git-sh-i18n and the
translation data when run under --valgrind: lib-gettext.sh tried to
locate them under $GIT_EXEC_PATH, which normally is the git build
directory, but is changed by --valgrind to point to the wrappers.

Introduce a new variable $GIT_BUILD_DIR which can be used to locate
data that resides under the build directory, and use that instead.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/lib-gettext.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/lib-gettext.sh b/t/lib-gettext.sh
index 831ee38..f0cdd3d 100644
--- a/t/lib-gettext.sh
+++ b/t/lib-gettext.sh
@@ -5,11 +5,11 @@
 
 . ./test-lib.sh
 
-GIT_TEXTDOMAINDIR="$GIT_EXEC_PATH/share/locale"
-GIT_PO_PATH="$GIT_EXEC_PATH/po"
+GIT_TEXTDOMAINDIR="$GIT_BUILD_DIR/share/locale"
+GIT_PO_PATH="$GIT_BUILD_DIR/po"
 export GIT_TEXTDOMAINDIR GIT_PO_PATH
 
-. "$GIT_EXEC_PATH"/git-sh-i18n
+. "$GIT_BUILD_DIR"/git-sh-i18n
 
 if test_have_prereq GETTEXT
 then
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 21/63] po/is.po: add Icelandic translation
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (2 preceding siblings ...)
  2010-09-04 22:10 ` [PATCH 05/63] tests: locate i18n lib&data correctly under --valgrind Ævar Arnfjörð Bjarmason
@ 2010-09-04 22:10 ` Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 26/63] gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter Ævar Arnfjörð Bjarmason
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-04 22:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Thomas Rast, Sam Reed, Jan Krüger,
	Ævar Arnfjörð Bjarmason

Translate the non-TEST messages added in recent patches against
init-db.c. This brings Icelandic translation coverage up to 100%.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 po/is.po |   95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 95 insertions(+), 0 deletions(-)

diff --git a/po/is.po b/po/is.po
index 2c38b32..85d15b8 100644
--- a/po/is.po
+++ b/po/is.po
@@ -11,6 +11,101 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#, c-format
+msgid "Could not make %s writable by group"
+msgstr "Gat ekki gert %s skrifanlega af hóp"
+
+#, c-format
+msgid "insanely long template name %s"
+msgstr "brjálæðislega langt sniðsnafn %s"
+
+#, c-format
+msgid "cannot stat '%s'"
+msgstr "gat ekki stat-að '%s'"
+
+#, c-format
+msgid "cannot stat template '%s'"
+msgstr "gat ekki stat-að sniðið '%s'"
+
+#, c-format
+msgid "cannot opendir '%s'"
+msgstr "gat ekki opnað móppuna '%s'"
+
+#, c-format
+msgid "cannot readlink '%s'"
+msgstr "gat ekki lesið tengilinn '%s'"
+
+#, c-format
+msgid "insanely long symlink %s"
+msgstr "brjálæðislega langur tengill %s"
+
+#, c-format
+msgid "cannot symlink '%s' '%s'"
+msgstr "gat ekki búið til tengilinn '%s' '%s'"
+
+#, c-format
+msgid "cannot copy '%s' to '%s'"
+msgstr "gat ekki afritað '%s' til '%s'"
+
+#, c-format
+msgid "ignoring template %s"
+msgstr "hunsa sniðið %s"
+
+#, c-format
+msgid "insanely long template path %s"
+msgstr "brjálæðislega löng slóð á snið %s"
+
+#, c-format
+msgid "templates not found %s"
+msgstr "sniðið fannst ekki %s"
+
+#, c-format
+msgid "not copying templates of a wrong format version %d from '%s'"
+msgstr "aftira ekki sniðin vegna rangar útgáfu %d frá '%s'"
+
+#, c-format
+msgid "insane git directory %s"
+msgstr "brjálúð git mappa %s"
+
+#. TRANSLATORS: The first '%s' is either "Reinitialized
+#. existing" or "Initialized empty", the second " shared" or
+#. "", and the last '%s%s' is the verbatim directory name.
+#, c-format
+msgid "%s%s Git repository in %s%s\n"
+msgstr "%s%s Git lind í %s%s\n"
+
+msgid "Reinitialized existing"
+msgstr "Endurgerði"
+
+msgid "Initialized empty"
+msgstr "Bjó til tóma"
+
+msgid " shared"
+msgstr " sameiginlega"
+
+msgid "cannot tell cwd"
+msgstr "finn ekki núverandi möppu"
+
+#, c-format
+msgid "cannot mkdir %s"
+msgstr "gat ekki búið til möppuna %s"
+
+#, c-format
+msgid "cannot chdir to %s"
+msgstr "get ekki farið inn í möppuna %s"
+
+#, c-format
+msgid "%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-dir=<directory>)"
+msgstr "%s (eða --work-tree=<mappa>) ekki leyfilegt ásamt %s (eða --git-dir=<mappa>)"
+
+msgid "Cannot access current working directory"
+msgstr "Get ekki opnað núverandi vinnumöppu"
+
+#, c-format
+msgid "Cannot access work tree '%s'"
+msgstr "Get ekki opnað vinnutré '%s'"
+
+#. TRANSLATORS: This is a test. You don't need to translate it.
 msgid "See 'git help COMMAND' for more information on a specific command."
 msgstr "Sjá 'git help SKIPUN' til að sjá hjálp fyrir tiltekna skipun."
 
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 26/63] gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (3 preceding siblings ...)
  2010-09-04 22:10 ` [PATCH 21/63] po/is.po: add Icelandic translation Ævar Arnfjörð Bjarmason
@ 2010-09-04 22:10 ` Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 27/63] gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON Ævar Arnfjörð Bjarmason
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-04 22:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Thomas Rast, Sam Reed, Jan Krüger,
	Ævar Arnfjörð Bjarmason

Add a new GETTEXT_POISON=YesPlease Makefile debug target. With this
target every invocation of _(s) will return "# GETTEXT POISON #"
instead of `s' or the msgstr that `s` would look up.

This target is intended to sanity check the gettextization series
against the test suite.

If the test suite is relying on the US English output of Git the test
should either have a NO_GETTEXT_POISON prerequisite, or the message in
question shouldn't be translated because it's a plumbing message.

We won't catch everything with this since we don't have 100% test
coverage, but the chances of us doing so are much larger.

The reason I'm using "# GETTEXT POISON #" is that a lot of tests that
rely on the fake editor would break if it wasn't a comment, since the
comment message that's inserted on e.g. `git commit --amend' is
translatable.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 Makefile      |    9 +++++++++
 gettext.h     |    4 ++++
 t/test-lib.sh |    1 +
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 4d2d4c7..f26fca3 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,10 @@ all::
 # on platforms where we don't expect glibc (Linux, Hurd,
 # GNU/kFreeBSD), which includes libintl.
 #
+# Define GETTEXT_POISON to turn all strings that use gettext into
+# gibberish. This option should only be used by the Git developers to
+# check that the Git gettext implementation itself is sane.
+#
 # Define EXPATDIR=/foo/bar if your expat header and library files are in
 # /foo/bar/include and /foo/bar/lib directories.
 #
@@ -1507,6 +1511,10 @@ ifdef NEEDS_LIBINTL
 	EXTLIBS += -lintl
 endif
 
+ifdef GETTEXT_POISON
+	COMPAT_CFLAGS += -DGETTEXT_POISON
+endif
+
 ifeq ($(TCLTK_PATH),)
 NO_TCLTK=NoThanks
 endif
@@ -2065,6 +2073,7 @@ ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
 	@echo GIT_TEST_CMP_USE_COPIED_CONTEXT=YesPlease >>$@
 endif
 	@echo NO_GETTEXT=\''$(subst ','\'',$(subst ','\'',$(NO_GETTEXT)))'\' >>$@
+	@echo GETTEXT_POISON=\''$(subst ','\'',$(subst ','\'',$(GETTEXT_POISON)))'\' >>$@
 
 ### Detect Tck/Tk interpreter path changes
 ifndef NO_TCLTK
diff --git a/gettext.h b/gettext.h
index e02939a..94ab0f3 100644
--- a/gettext.h
+++ b/gettext.h
@@ -11,8 +11,12 @@ extern void git_setup_gettext(void);
 #ifdef NO_GETTEXT
 #define _(s) (s)
 #else
+#ifndef GETTEXT_POISON
 #include <libintl.h>
 #define _(s) gettext(s)
+#else
+#define _(s) "# GETTEXT POISON #"
+#endif
 #endif
 
 #endif
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 3fcb272..b297ef6 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -963,6 +963,7 @@ esac
 test -z "$NO_PERL" && test_set_prereq PERL
 test -z "$NO_PYTHON" && test_set_prereq PYTHON
 test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
+test -z "$GETTEXT_POISON" && test_set_prereq NO_GETTEXT_POISON
 
 # test whether the filesystem supports symbolic links
 ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 27/63] gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (4 preceding siblings ...)
  2010-09-04 22:10 ` [PATCH 26/63] gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter Ævar Arnfjörð Bjarmason
@ 2010-09-04 22:10 ` Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 28/63] gettext tests: skip breaking " Ævar Arnfjörð Bjarmason
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-04 22:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Thomas Rast, Sam Reed, Jan Krüger,
	Ævar Arnfjörð Bjarmason

Change the gettext tests (all of whom use lib-gettext.sh) to skip
under GETTEXT_POISON=YesPlease. We also print a message to this
effect.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/lib-gettext.sh |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/t/lib-gettext.sh b/t/lib-gettext.sh
index 4570ead..c9a079e 100644
--- a/t/lib-gettext.sh
+++ b/t/lib-gettext.sh
@@ -11,7 +11,7 @@ export GIT_TEXTDOMAINDIR GIT_PO_PATH
 
 . "$GIT_BUILD_DIR"/git-sh-i18n
 
-if test_have_prereq GETTEXT
+if test_have_prereq GETTEXT && test_have_prereq NO_GETTEXT_POISON
 then
 	# is_IS.UTF-8 on Solaris and FreeBSD, is_IS.utf8 on Debian
 	is_IS_locale=$(locale -a | sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
@@ -58,5 +58,11 @@ then
 else
 	# Only run some tests when we don't have gettext support
 	test_set_prereq NO_GETTEXT
-	say "# lib-gettext: No GETTEXT support available"
+
+	if test_have_prereq NO_GETTEXT_POISON
+	then
+		say "# lib-gettext: GETTEXT_POISON defined, can't test gettext"
+	else
+		say "# lib-gettext: No GETTEXT support available"
+	fi
 fi
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 28/63] gettext tests: skip breaking tests under GETTEXT_POISON
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (5 preceding siblings ...)
  2010-09-04 22:10 ` [PATCH 27/63] gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON Ævar Arnfjörð Bjarmason
@ 2010-09-04 22:10 ` Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 51/63] gettextize: git-merge basic messages Ævar Arnfjörð Bjarmason
                   ` (17 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-04 22:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Thomas Rast, Sam Reed, Jan Krüger,
	Ævar Arnfjörð Bjarmason

Change the tests that depend on the output of the porcelain to only
run if the NO_GETTEXT_POISON prerequisite is set. These will always
fail under GETTEXT_POISON=YesPlease.

I've manually inspected these and determined to the best of my ability
that they aren't plumbing output.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---

(repeated)

    This is still the part of this series that needs the most
    review. I *think* I got this right, but more eyes are needed on
    it.

 t/lib-httpd.sh              |    2 +-
 t/t0001-init.sh             |    2 +-
 t/t1200-tutorial.sh         |    4 +-
 t/t2200-add-update.sh       |    2 +-
 t/t2204-add-ignored.sh      |    8 ++--
 t/t3030-merge-recursive.sh  |    2 +-
 t/t3200-branch.sh           |    2 +-
 t/t3203-branch-output.sh    |    2 +-
 t/t3700-add.sh              |    4 +-
 t/t4001-diff-rename.sh      |    4 +-
 t/t4014-format-patch.sh     |    2 +-
 t/t5541-http-push.sh        |    2 +-
 t/t5601-clone.sh            |    2 +-
 t/t6040-tracking-info.sh    |    2 +-
 t/t7004-tag.sh              |    6 ++-
 t/t7060-wtstatus.sh         |    2 +-
 t/t7102-reset.sh            |    2 +-
 t/t7110-reset-merge.sh      |    6 +-
 t/t7201-co.sh               |   10 ++--
 t/t7500-commit.sh           |    9 +++-
 t/t7501-commit.sh           |   14 ++++--
 t/t7502-commit.sh           |   46 ++++++++++----------
 t/t7506-status-submodule.sh |   28 ++++++------
 t/t7508-status.sh           |   98 +++++++++++++++++++++---------------------
 t/t7600-merge.sh            |    2 +-
 t/t7811-grep-open.sh        |    2 +-
 26 files changed, 139 insertions(+), 126 deletions(-)

diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index e733f65..817b865 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -154,7 +154,7 @@ test_http_push_nonff() {
 		grep "^ ! \[rejected\][ ]*$BRANCH -> $BRANCH (non-fast-forward)$" output
 	'
 
-	test_expect_success 'non-fast-forward push shows help message' '
+	test_expect_success NO_GETTEXT_POISON 'non-fast-forward push shows help message' '
 		grep "To prevent you from losing history, non-fast-forward updates were rejected" \
 			output
 	'
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 7fe8883..b45df24 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -124,7 +124,7 @@ test_expect_success 'GIT_DIR & GIT_WORK_TREE (2)' '
 	fi
 '
 
-test_expect_success 'reinit' '
+test_expect_success NO_GETTEXT_POISON 'reinit' '
 
 	(
 		unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG
diff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh
index ab55eda..c568e0e 100755
--- a/t/t1200-tutorial.sh
+++ b/t/t1200-tutorial.sh
@@ -163,7 +163,9 @@ test_expect_success 'git resolve' '
 	git checkout mybranch &&
 	git merge -m "Merge upstream changes." master |
 		sed -e "1s/[0-9a-f]\{7\}/VARIABLE/g" \
-		-e "s/^Fast[- ]forward /FASTFORWARD /" >resolve.output &&
+		-e "s/^Fast[- ]forward /FASTFORWARD /" >resolve.output'
+
+test_expect_success NO_GETTEXT_POISON 'git resolve output' '
 	test_cmp resolve.expect resolve.output
 '
 
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 2ad2819..b3b90ca 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -111,7 +111,7 @@ test_expect_success 'touch and then add explicitly' '
 
 '
 
-test_expect_success 'add -n -u should not add but just report' '
+test_expect_success NO_GETTEXT_POISON 'add -n -u should not add but just report' '
 
 	(
 		echo "add '\''check'\''" &&
diff --git a/t/t2204-add-ignored.sh b/t/t2204-add-ignored.sh
index 24afdab..b7a0d71 100755
--- a/t/t2204-add-ignored.sh
+++ b/t/t2204-add-ignored.sh
@@ -27,7 +27,7 @@ done
 
 for i in ign dir/ign dir/sub dir/sub/*ign sub/file sub sub/*
 do
-	test_expect_success "complaints for ignored $i" '
+	test_expect_success NO_GETTEXT_POISON "complaints for ignored $i" '
 		rm -f .git/index &&
 		test_must_fail git add "$i" 2>err &&
 		git ls-files "$i" >out &&
@@ -36,7 +36,7 @@ do
 		cat err
 	'
 
-	test_expect_success "complaints for ignored $i with unignored file" '
+	test_expect_success NO_GETTEXT_POISON "complaints for ignored $i with unignored file" '
 		rm -f .git/index &&
 		test_must_fail git add "$i" file 2>err &&
 		git ls-files "$i" >out &&
@@ -48,7 +48,7 @@ done
 
 for i in sub sub/*
 do
-	test_expect_success "complaints for ignored $i in dir" '
+	test_expect_success NO_GETTEXT_POISON "complaints for ignored $i in dir" '
 		rm -f .git/index &&
 		(
 			cd dir &&
@@ -63,7 +63,7 @@ done
 
 for i in ign file
 do
-	test_expect_success "complaints for ignored $i in sub" '
+	test_expect_success NO_GETTEXT_POISON "complaints for ignored $i in sub" '
 		rm -f .git/index &&
 		(
 			cd sub &&
diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh
index efe2900..b8ddb94 100755
--- a/t/t3030-merge-recursive.sh
+++ b/t/t3030-merge-recursive.sh
@@ -281,7 +281,7 @@ test_expect_success 'merge-recursive result' '
 
 '
 
-test_expect_success 'fail if the index has unresolved entries' '
+test_expect_success NO_GETTEXT_POISON 'fail if the index has unresolved entries' '
 
 	rm -fr [abcd] &&
 	git checkout -f "$c1" &&
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index f54a533..d90d9fd 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -192,7 +192,7 @@ test_expect_success 'test deleting branch deletes branch config' \
      test -z "$(git config branch.my7.remote)" &&
      test -z "$(git config branch.my7.merge)"'
 
-test_expect_success 'test deleting branch without config' \
+test_expect_success NO_GETTEXT_POISON 'test deleting branch without config' \
     'git branch my7 s &&
      sha1=$(git rev-parse my7 | cut -c 1-7) &&
      test "$(git branch -d my7 2>&1)" = "Deleted branch my7 (was $sha1)."'
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index 809d1c4..dfdf5a7 100755
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
@@ -72,7 +72,7 @@ cat >expect <<'EOF'
   branch-two
   master
 EOF
-test_expect_success 'git branch shows detached HEAD properly' '
+test_expect_success NO_GETTEXT_POISON 'git branch shows detached HEAD properly' '
 	git checkout HEAD^0 &&
 	git branch >actual &&
 	test_cmp expect actual
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index ec71083..fea0c17 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -266,7 +266,7 @@ test_expect_success 'git add --dry-run of existing changed file' "
 	echo \"add 'track-this'\" | test_cmp - actual
 "
 
-test_expect_success 'git add --dry-run of non-existing file' "
+test_expect_success NO_GETTEXT_POISON 'git add --dry-run of non-existing file' "
 	echo ignored-file >>.gitignore &&
 	test_must_fail git add --dry-run track-this ignored-file >actual 2>&1 &&
 	echo \"fatal: pathspec 'ignored-file' did not match any files\" | test_cmp - actual
@@ -282,7 +282,7 @@ cat >expect.out <<\EOF
 add 'track-this'
 EOF
 
-test_expect_success 'git add --dry-run --ignore-missing of non-existing file' '
+test_expect_success NO_GETTEXT_POISON 'git add --dry-run --ignore-missing of non-existing file' '
 	test_must_fail git add --dry-run --ignore-missing track-this ignored-file >actual.out 2>actual.err &&
 	test_cmp expect.out actual.out &&
 	test_cmp expect.err actual.err
diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh
index 71bac83..d42c077 100755
--- a/t/t4001-diff-rename.sh
+++ b/t/t4001-diff-rename.sh
@@ -64,7 +64,7 @@ test_expect_success \
     'validate the output.' \
     'compare_diff_patch current expected'
 
-test_expect_success 'favour same basenames over different ones' '
+test_expect_success NO_GETTEXT_POISON 'favour same basenames over different ones' '
 	cp path1 another-path &&
 	git add another-path &&
 	git commit -m 1 &&
@@ -73,7 +73,7 @@ test_expect_success 'favour same basenames over different ones' '
 	git mv another-path subdir/path1 &&
 	git status | grep "renamed: .*path1 -> subdir/path1"'
 
-test_expect_success  'favour same basenames even with minor differences' '
+test_expect_success NO_GETTEXT_POISON  'favour same basenames even with minor differences' '
 	git show HEAD:path1 | sed "s/15/16/" > subdir/path1 &&
 	git status | grep "renamed: .*path1 -> subdir/path1"'
 
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index f87434b..ae3659e 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -592,7 +592,7 @@ echo "fatal: --name-only does not make sense" > expect.name-only
 echo "fatal: --name-status does not make sense" > expect.name-status
 echo "fatal: --check does not make sense" > expect.check
 
-test_expect_success 'options no longer allowed for format-patch' '
+test_expect_success NO_GETTEXT_POISON 'options no longer allowed for format-patch' '
 	test_must_fail git format-patch --name-only 2> output &&
 	test_cmp expect.name-only output &&
 	test_must_fail git format-patch --name-status 2> output &&
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index b0c2a2c..670d3de 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -118,7 +118,7 @@ test_expect_success 'used receive-pack service' '
 test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
 	"$ROOT_PATH"/test_repo_clone master
 
-test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper' '
+test_expect_success NO_GETTEXT_POISON 'push fails for non-fast-forward refs unmatched by remote helper' '
 	# create a dissimilarly-named remote ref so that git is unable to match the
 	# two refs (viz. local, remote) unless an explicit refspec is provided.
 	git push origin master:retsam
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 987e0c8..ecb499d 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -31,7 +31,7 @@ test_expect_success 'clone with excess parameters (2)' '
 
 '
 
-test_expect_success 'output from clone' '
+test_expect_success NO_GETTEXT_POISON 'output from clone' '
 	rm -fr dst &&
 	git clone -n "file://$(pwd)/src" dst >output &&
 	test $(grep Clon output | wc -l) = 1
diff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh
index 1785e17..c9a86f6 100755
--- a/t/t6040-tracking-info.sh
+++ b/t/t6040-tracking-info.sh
@@ -42,7 +42,7 @@ b3 behind 1
 b4 ahead 2
 EOF
 
-test_expect_success 'branch -v' '
+test_expect_success NO_GETTEXT_POISON 'branch -v' '
 	(
 		cd test &&
 		git branch -v
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index ac943f5..cf40992 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1044,12 +1044,14 @@ test_expect_success GPG \
 	'verify signed tag fails when public key is not present' \
 	'test_must_fail git tag -v signed-tag'
 
-test_expect_success \
+# "POISON" isn't a comment, so skip under GETTEXT_POISON
+test_expect_success NO_GETTEXT_POISON \
 	'git tag -a fails if tag annotation is empty' '
 	! (GIT_EDITOR=cat git tag -a initial-comment)
 '
 
-test_expect_success \
+# Likewise GETTEXT_POISON doesn't emit something that looks like a comment
+test_expect_success NO_GETTEXT_POISON \
 	'message in editor has initial comment' '
 	GIT_EDITOR=cat git tag -a initial-comment > actual
 	# check the first line --- should be empty
diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh
index fcac472..7205154 100755
--- a/t/t7060-wtstatus.sh
+++ b/t/t7060-wtstatus.sh
@@ -38,7 +38,7 @@ cat >expect <<EOF
 no changes added to commit (use "git add" and/or "git commit -a")
 EOF
 
-test_expect_success 'M/D conflict does not segfault' '
+test_expect_success NO_GETTEXT_POISON 'M/D conflict does not segfault' '
 	mkdir mdconflict &&
 	(
 		cd mdconflict &&
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index b8cf260..1370949 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -423,7 +423,7 @@ Unstaged changes after reset:
 M	file2
 EOF
 
-test_expect_success '--mixed refreshes the index' '
+test_expect_success NO_GETTEXT_POISON '--mixed refreshes the index' '
 	echo 123 >> file2 &&
 	git reset --mixed HEAD > output &&
 	test_cmp expect output
diff --git a/t/t7110-reset-merge.sh b/t/t7110-reset-merge.sh
index 70cdd8e..8e54f0c 100755
--- a/t/t7110-reset-merge.sh
+++ b/t/t7110-reset-merge.sh
@@ -233,7 +233,7 @@ test_expect_success '"reset --merge HEAD^" is ok with pending merge' '
 #           working index HEAD target         working index HEAD
 #           ----------------------------------------------------
 # file1:     X       U     B    C     --keep   (disallowed)
-test_expect_success '"reset --keep HEAD^" fails with pending merge' '
+test_expect_success NO_GETTEXT_POISON '"reset --keep HEAD^" fails with pending merge' '
     git reset --hard third &&
     test_must_fail git merge branch1 &&
     test_must_fail git reset --keep HEAD^ 2>err.log &&
@@ -259,7 +259,7 @@ test_expect_success '"reset --merge HEAD" is ok with pending merge' '
 #           working index HEAD target         working index HEAD
 #           ----------------------------------------------------
 # file1:     X       U     B    B     --keep   (disallowed)
-test_expect_success '"reset --keep HEAD" fails with pending merge' '
+test_expect_success NO_GETTEXT_POISON '"reset --keep HEAD" fails with pending merge' '
     git reset --hard third &&
     test_must_fail git merge branch1 &&
     test_must_fail git reset --keep HEAD 2>err.log &&
@@ -280,7 +280,7 @@ test_expect_success '--merge is ok with added/deleted merge' '
     git diff --exit-code --cached
 '
 
-test_expect_success '--keep fails with added/deleted merge' '
+test_expect_success NO_GETTEXT_POISON '--keep fails with added/deleted merge' '
     git reset --hard third &&
     rm -f file2 &&
     test_must_fail git merge branch3 &&
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 1337fa5..fe7536b 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -223,7 +223,7 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '
 	test_cmp two expect
 '
 
-test_expect_success 'checkout to detach HEAD (with advice declined)' '
+test_expect_success NO_GETTEXT_POISON 'checkout to detach HEAD (with advice declined)' '
 
 	git config advice.detachedHead false &&
 	git checkout -f renamer && git clean -f &&
@@ -242,7 +242,7 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '
 	fi
 '
 
-test_expect_success 'checkout to detach HEAD' '
+test_expect_success NO_GETTEXT_POISON 'checkout to detach HEAD' '
 	git config advice.detachedHead true &&
 	git checkout -f renamer && git clean -f &&
 	git checkout renamer^ 2>messages &&
@@ -260,7 +260,7 @@ test_expect_success 'checkout to detach HEAD' '
 	fi
 '
 
-test_expect_success 'checkout to detach HEAD with branchname^' '
+test_expect_success NO_GETTEXT_POISON 'checkout to detach HEAD with branchname^' '
 
 	git checkout -f master && git clean -f &&
 	git checkout renamer^ &&
@@ -276,7 +276,7 @@ test_expect_success 'checkout to detach HEAD with branchname^' '
 	fi
 '
 
-test_expect_success 'checkout to detach HEAD with :/message' '
+test_expect_success NO_GETTEXT_POISON 'checkout to detach HEAD with :/message' '
 
 	git checkout -f master && git clean -f &&
 	git checkout ":/Initial" &&
@@ -292,7 +292,7 @@ test_expect_success 'checkout to detach HEAD with :/message' '
 	fi
 '
 
-test_expect_success 'checkout to detach HEAD with HEAD^0' '
+test_expect_success NO_GETTEXT_POISON 'checkout to detach HEAD with HEAD^0' '
 
 	git checkout -f master && git clean -f &&
 	git checkout HEAD^0 &&
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index aa9c577..6b983b8 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -59,7 +59,10 @@ test_expect_success 'adding comments to a template should not commit' '
 	)
 '
 
-test_expect_success 'adding real content to a template should commit' '
+# These fail under GETTEXT_POISON because the poison editor message
+# doesn't do the right thing with comments and line breaks, this
+# message will be incorrectly broken up across lines.
+test_expect_success NO_GETTEXT_POISON 'adding real content to a template should commit' '
 	(
 		test_set_editor "$TEST_DIRECTORY"/t7500/add-content &&
 		git commit --template "$TEMPLATE"
@@ -67,7 +70,7 @@ test_expect_success 'adding real content to a template should commit' '
 	commit_msg_is "template linecommit message"
 '
 
-test_expect_success '-t option should be short for --template' '
+test_expect_success NO_GETTEXT_POISON '-t option should be short for --template' '
 	echo "short template" > "$TEMPLATE" &&
 	echo "new content" >> foo &&
 	git add foo &&
@@ -78,7 +81,7 @@ test_expect_success '-t option should be short for --template' '
 	commit_msg_is "short templatecommit message"
 '
 
-test_expect_success 'config-specified template should commit' '
+test_expect_success NO_GETTEXT_POISON 'config-specified template should commit' '
 	echo "new template" > "$TEMPLATE" &&
 	git config commit.template "$TEMPLATE" &&
 	echo "more content" >> foo &&
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 8297cb4..96601db 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -14,8 +14,11 @@ test_tick
 test_expect_success \
 	"initial status" \
 	"echo 'bongo bongo' >file &&
-	 git add file && \
-	 git status | grep 'Initial commit'"
+	 git add file"
+
+test_expect_success NO_GETTEXT_POISON \
+	"Constructing initial commit" \
+	"git status | grep 'Initial commit'"
 
 test_expect_success \
 	"fail initial amend" \
@@ -142,7 +145,8 @@ cat >msg <<EOF
 A good commit message.
 EOF
 
-test_expect_success \
+# Can't rely on editor with POISON
+test_expect_success NO_GETTEXT_POISON \
 	'editor not invoked if -F is given' '
 	 echo "moo" >file &&
 	 EDITOR=./editor git commit -a -F msg &&
@@ -163,7 +167,9 @@ d381ac431806e53f3dd7ac2f1ae0534f36d738b9
 402702b49136e7587daa9280e91e4bb7cb2179f7
 EOF
 
-test_expect_success \
+# rev-list won't be OK under GETTEXT_POISON since the above test won't
+# run.
+test_expect_success NO_GETTEXT_POISON \
     'validate git rev-list output.' \
     'test_cmp expected current'
 
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index ac2e187..9e293f3 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -25,7 +25,7 @@ check_summary_oneline() {
 	test_cmp exp act
 }
 
-test_expect_success 'output summary format' '
+test_expect_success NO_GETTEXT_POISON 'output summary format' '
 
 	echo new >file1 &&
 	git add file1 &&
@@ -36,12 +36,12 @@ test_expect_success 'output summary format' '
 	check_summary_oneline "" "a change"
 '
 
-test_expect_success 'output summary format for commit with an empty diff' '
+test_expect_success NO_GETTEXT_POISON 'output summary format for commit with an empty diff' '
 
 	check_summary_oneline "" "empty" "--allow-empty"
 '
 
-test_expect_success 'output summary format for merges' '
+test_expect_success NO_GETTEXT_POISON 'output summary format for merges' '
 
 	git checkout -b recursive-base &&
 	test_commit base file1 &&
@@ -70,7 +70,7 @@ output_tests_cleanup() {
 	git commit -m "cleanup"
 }
 
-test_expect_success 'the basics' '
+test_expect_success NO_GETTEXT_POISON 'the basics' '
 
 	output_tests_cleanup &&
 
@@ -91,7 +91,7 @@ test_expect_success 'the basics' '
 
 '
 
-test_expect_success 'partial' '
+test_expect_success NO_GETTEXT_POISON 'partial' '
 
 	echo another >"commit is" &&
 	echo another >not/forbid &&
@@ -103,7 +103,7 @@ test_expect_success 'partial' '
 
 '
 
-test_expect_success 'partial modification in a subdirectory' '
+test_expect_success NO_GETTEXT_POISON 'partial modification in a subdirectory' '
 
 	test_tick &&
 	git commit -m "partial commit to subdirectory" not &&
@@ -113,7 +113,7 @@ test_expect_success 'partial modification in a subdirectory' '
 
 '
 
-test_expect_success 'partial removal' '
+test_expect_success NO_GETTEXT_POISON 'partial removal' '
 
 	git rm not/forbid &&
 	git commit -m "partial commit to remove not/forbid" not &&
@@ -165,7 +165,7 @@ test_expect_success 'verbose respects diff config' '
 	git config --unset color.diff
 '
 
-test_expect_success 'cleanup commit messages (verbatim,-t)' '
+test_expect_success NO_GETTEXT_POISON 'cleanup commit messages (verbatim,-t)' '
 
 	echo >>negative &&
 	{ echo;echo "# text";echo; } >expect &&
@@ -175,7 +175,7 @@ test_expect_success 'cleanup commit messages (verbatim,-t)' '
 
 '
 
-test_expect_success 'cleanup commit messages (verbatim,-F)' '
+test_expect_success NO_GETTEXT_POISON 'cleanup commit messages (verbatim,-F)' '
 
 	echo >>negative &&
 	git commit --cleanup=verbatim -F expect -a &&
@@ -184,7 +184,7 @@ test_expect_success 'cleanup commit messages (verbatim,-F)' '
 
 '
 
-test_expect_success 'cleanup commit messages (verbatim,-m)' '
+test_expect_success NO_GETTEXT_POISON 'cleanup commit messages (verbatim,-m)' '
 
 	echo >>negative &&
 	git commit --cleanup=verbatim -m "$(cat expect)" -a &&
@@ -220,7 +220,7 @@ echo "sample
 # Please enter the commit message for your changes. Lines starting
 # with '#' will be ignored, and an empty message aborts the commit." >expect
 
-test_expect_success 'cleanup commit messages (strip,-F,-e)' '
+test_expect_success NO_GETTEXT_POISON 'cleanup commit messages (strip,-F,-e)' '
 
 	echo >>negative &&
 	{ echo;echo sample;echo; } >text &&
@@ -234,7 +234,7 @@ echo "#
 # Author:    $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>
 #" >> expect
 
-test_expect_success 'author different from committer' '
+test_expect_success NO_GETTEXT_POISON 'author different from committer' '
 
 	echo >>negative &&
 	git commit -e -m "sample"
@@ -248,7 +248,7 @@ rm -f expect.tmp
 echo "# Committer:
 #" >> expect
 
-test_expect_success 'committer is automatic' '
+test_expect_success NO_GETTEXT_POISON 'committer is automatic' '
 
 	echo >>negative &&
 	(
@@ -370,66 +370,66 @@ try_commit () {
 
 try_commit_status_combo () {
 
-	test_expect_success 'commit' '
+	test_expect_success NO_GETTEXT_POISON 'commit' '
 		clear_config commit.status &&
 		try_commit "" &&
 		grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
 	'
 
-	test_expect_success 'commit' '
+	test_expect_success NO_GETTEXT_POISON 'commit' '
 		clear_config commit.status &&
 		try_commit "" &&
 		grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
 	'
 
-	test_expect_success 'commit --status' '
+	test_expect_success NO_GETTEXT_POISON 'commit --status' '
 		clear_config commit.status &&
 		try_commit --status &&
 		grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
 	'
 
-	test_expect_success 'commit --no-status' '
+	test_expect_success NO_GETTEXT_POISON 'commit --no-status' '
 		clear_config commit.status &&
 		try_commit --no-status
 		! grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
 	'
 
-	test_expect_success 'commit with commit.status = yes' '
+	test_expect_success NO_GETTEXT_POISON 'commit with commit.status = yes' '
 		clear_config commit.status &&
 		git config commit.status yes &&
 		try_commit "" &&
 		grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
 	'
 
-	test_expect_success 'commit with commit.status = no' '
+	test_expect_success NO_GETTEXT_POISON 'commit with commit.status = no' '
 		clear_config commit.status &&
 		git config commit.status no &&
 		try_commit "" &&
 		! grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
 	'
 
-	test_expect_success 'commit --status with commit.status = yes' '
+	test_expect_success NO_GETTEXT_POISON 'commit --status with commit.status = yes' '
 		clear_config commit.status &&
 		git config commit.status yes &&
 		try_commit --status &&
 		grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
 	'
 
-	test_expect_success 'commit --no-status with commit.status = yes' '
+	test_expect_success NO_GETTEXT_POISON 'commit --no-status with commit.status = yes' '
 		clear_config commit.status &&
 		git config commit.status yes &&
 		try_commit --no-status &&
 		! grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
 	'
 
-	test_expect_success 'commit --status with commit.status = no' '
+	test_expect_success NO_GETTEXT_POISON 'commit --status with commit.status = no' '
 		clear_config commit.status &&
 		git config commit.status no &&
 		try_commit --status &&
 		grep "^# Changes to be committed:" .git/COMMIT_EDITMSG
 	'
 
-	test_expect_success 'commit --no-status with commit.status = no' '
+	test_expect_success NO_GETTEXT_POISON 'commit --no-status with commit.status = no' '
 		clear_config commit.status &&
 		git config commit.status no &&
 		try_commit --no-status &&
diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh
index 3d4f85d..2347451 100755
--- a/t/t7506-status-submodule.sh
+++ b/t/t7506-status-submodule.sh
@@ -20,17 +20,17 @@ test_expect_success 'setup' '
 	git commit -m "Add submodule sub"
 '
 
-test_expect_success 'status clean' '
+test_expect_success NO_GETTEXT_POISON 'status clean' '
 	git status >output &&
 	grep "nothing to commit" output
 '
 
-test_expect_success 'commit --dry-run -a clean' '
+test_expect_success NO_GETTEXT_POISON 'commit --dry-run -a clean' '
 	test_must_fail git commit --dry-run -a >output &&
 	grep "nothing to commit" output
 '
 
-test_expect_success 'status with modified file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with modified file in submodule' '
 	(cd sub && git reset --hard) &&
 	echo "changed" >sub/foo &&
 	git status >output &&
@@ -46,7 +46,7 @@ test_expect_success 'status with modified file in submodule (porcelain)' '
 	EOF
 '
 
-test_expect_success 'status with added file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with added file in submodule' '
 	(cd sub && git reset --hard && echo >foo && git add foo) &&
 	git status >output &&
 	grep "modified:   sub (modified content)" output
@@ -60,14 +60,14 @@ test_expect_success 'status with added file in submodule (porcelain)' '
 	EOF
 '
 
-test_expect_success 'status with untracked file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with untracked file in submodule' '
 	(cd sub && git reset --hard) &&
 	echo "content" >sub/new-file &&
 	git status >output &&
 	grep "modified:   sub (untracked content)" output
 '
 
-test_expect_success 'status -uno with untracked file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status -uno with untracked file in submodule' '
 	git status -uno >output &&
 	grep "^nothing to commit" output
 '
@@ -79,7 +79,7 @@ test_expect_success 'status with untracked file in submodule (porcelain)' '
 	EOF
 '
 
-test_expect_success 'status with added and untracked file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with added and untracked file in submodule' '
 	(cd sub && git reset --hard && echo >foo && git add foo) &&
 	echo "content" >sub/new-file &&
 	git status >output &&
@@ -95,7 +95,7 @@ test_expect_success 'status with added and untracked file in submodule (porcelai
 	EOF
 '
 
-test_expect_success 'status with modified file in modified submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with modified file in modified submodule' '
 	(cd sub && git reset --hard) &&
 	rm sub/new-file &&
 	(cd sub && echo "next change" >foo && git commit -m "next change" foo) &&
@@ -113,7 +113,7 @@ test_expect_success 'status with modified file in modified submodule (porcelain)
 	EOF
 '
 
-test_expect_success 'status with added file in modified submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with added file in modified submodule' '
 	(cd sub && git reset --hard && echo >foo && git add foo) &&
 	git status >output &&
 	grep "modified:   sub (new commits, modified content)" output
@@ -127,7 +127,7 @@ test_expect_success 'status with added file in modified submodule (porcelain)' '
 	EOF
 '
 
-test_expect_success 'status with untracked file in modified submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with untracked file in modified submodule' '
 	(cd sub && git reset --hard) &&
 	echo "content" >sub/new-file &&
 	git status >output &&
@@ -141,7 +141,7 @@ test_expect_success 'status with untracked file in modified submodule (porcelain
 	EOF
 '
 
-test_expect_success 'status with added and untracked file in modified submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with added and untracked file in modified submodule' '
 	(cd sub && git reset --hard && echo >foo && git add foo) &&
 	echo "content" >sub/new-file &&
 	git status >output &&
@@ -167,7 +167,7 @@ test_expect_success 'setup .git file for sub' '
 	 git commit -m "added .real to .gitignore" .gitignore
 '
 
-test_expect_success 'status with added file in modified submodule with .git file' '
+test_expect_success NO_GETTEXT_POISON 'status with added file in modified submodule with .git file' '
 	(cd sub && git reset --hard && echo >foo && git add foo) &&
 	git status >output &&
 	grep "modified:   sub (new commits, modified content)" output
@@ -177,12 +177,12 @@ test_expect_success 'rm submodule contents' '
 	rm -rf sub/* sub/.git
 '
 
-test_expect_success 'status clean (empty submodule dir)' '
+test_expect_success NO_GETTEXT_POISON 'status clean (empty submodule dir)' '
 	git status >output &&
 	grep "nothing to commit" output
 '
 
-test_expect_success 'status -a clean (empty submodule dir)' '
+test_expect_success NO_GETTEXT_POISON 'status -a clean (empty submodule dir)' '
 	test_must_fail git commit --dry-run -a >output &&
 	grep "nothing to commit" output
 '
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index 18b07d9..97e0d7a 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -31,7 +31,7 @@ test_expect_success 'setup' '
 	git add dir2/added
 '
 
-test_expect_success 'status (1)' '
+test_expect_success NO_GETTEXT_POISON 'status (1)' '
 
 	grep "use \"git rm --cached <file>\.\.\.\" to unstage" output
 
@@ -61,7 +61,7 @@ cat >expect <<\EOF
 #	untracked
 EOF
 
-test_expect_success 'status (2)' '
+test_expect_success NO_GETTEXT_POISON 'status (2)' '
 
 	git status >output &&
 	test_cmp expect output
@@ -87,7 +87,7 @@ EOF
 
 git config advice.statusHints false
 
-test_expect_success 'status (advice.statusHints false)' '
+test_expect_success NO_GETTEXT_POISON 'status (advice.statusHints false)' '
 
 	git status >output &&
 	test_cmp expect output
@@ -148,7 +148,7 @@ cat >expect <<EOF
 #
 # Untracked files not listed (use -u option to show untracked files)
 EOF
-test_expect_success 'status -uno' '
+test_expect_success NO_GETTEXT_POISON 'status -uno' '
 	mkdir dir3 &&
 	: >dir3/untracked1 &&
 	: >dir3/untracked2 &&
@@ -156,7 +156,7 @@ test_expect_success 'status -uno' '
 	test_cmp expect output
 '
 
-test_expect_success 'status (status.showUntrackedFiles no)' '
+test_expect_success NO_GETTEXT_POISON 'status (status.showUntrackedFiles no)' '
 	git config status.showuntrackedfiles no
 	git status >output &&
 	test_cmp expect output
@@ -173,7 +173,7 @@ cat >expect <<EOF
 # Untracked files not listed
 EOF
 git config advice.statusHints false
-test_expect_success 'status -uno (advice.statusHints false)' '
+test_expect_success NO_GETTEXT_POISON 'status -uno (advice.statusHints false)' '
 	git status -uno >output &&
 	test_cmp expect output
 '
@@ -219,12 +219,12 @@ cat >expect <<EOF
 #	output
 #	untracked
 EOF
-test_expect_success 'status -unormal' '
+test_expect_success NO_GETTEXT_POISON 'status -unormal' '
 	git status -unormal >output &&
 	test_cmp expect output
 '
 
-test_expect_success 'status (status.showUntrackedFiles normal)' '
+test_expect_success NO_GETTEXT_POISON 'status (status.showUntrackedFiles normal)' '
 	git config status.showuntrackedfiles normal
 	git status >output &&
 	test_cmp expect output
@@ -241,13 +241,13 @@ A  dir2/added
 ?? output
 ?? untracked
 EOF
-test_expect_success 'status -s -unormal' '
+test_expect_success NO_GETTEXT_POISON 'status -s -unormal' '
 	git config --unset status.showuntrackedfiles
 	git status -s -unormal >output &&
 	test_cmp expect output
 '
 
-test_expect_success 'status -s (status.showUntrackedFiles normal)' '
+test_expect_success NO_GETTEXT_POISON 'status -s (status.showUntrackedFiles normal)' '
 	git config status.showuntrackedfiles normal
 	git status -s >output &&
 	test_cmp expect output
@@ -278,11 +278,11 @@ cat >expect <<EOF
 #	output
 #	untracked
 EOF
-test_expect_success 'status -uall' '
+test_expect_success NO_GETTEXT_POISON 'status -uall' '
 	git status -uall >output &&
 	test_cmp expect output
 '
-test_expect_success 'status (status.showUntrackedFiles all)' '
+test_expect_success NO_GETTEXT_POISON 'status (status.showUntrackedFiles all)' '
 	git config status.showuntrackedfiles all
 	git status >output &&
 	rm -rf dir3 &&
@@ -337,7 +337,7 @@ cat >expect <<\EOF
 #	../untracked
 EOF
 
-test_expect_success 'status with relative paths' '
+test_expect_success NO_GETTEXT_POISON 'status with relative paths' '
 
 	(cd dir1 && git status) >output &&
 	test_cmp expect output
@@ -409,7 +409,7 @@ cat >expect <<\EOF
 #	<BLUE>untracked<RESET>
 EOF
 
-test_expect_success 'status with color.ui' '
+test_expect_success NO_GETTEXT_POISON 'status with color.ui' '
 
 	git config color.ui always &&
 	git status | test_decode_color >output &&
@@ -417,7 +417,7 @@ test_expect_success 'status with color.ui' '
 
 '
 
-test_expect_success 'status with color.status' '
+test_expect_success NO_GETTEXT_POISON 'status with color.status' '
 
 	git config --unset color.ui &&
 	git config color.status always &&
@@ -437,7 +437,7 @@ cat >expect <<\EOF
 <BLUE>??<RESET> untracked
 EOF
 
-test_expect_success 'status -s with color.ui' '
+test_expect_success NO_GETTEXT_POISON 'status -s with color.ui' '
 
 	git config --unset color.status &&
 	git config color.ui always &&
@@ -446,7 +446,7 @@ test_expect_success 'status -s with color.ui' '
 
 '
 
-test_expect_success 'status -s with color.status' '
+test_expect_success NO_GETTEXT_POISON 'status -s with color.status' '
 
 	git config --unset color.ui &&
 	git config color.status always &&
@@ -467,7 +467,7 @@ cat >expect <<\EOF
 <BLUE>??<RESET> untracked
 EOF
 
-test_expect_success 'status -s -b with color.status' '
+test_expect_success NO_GETTEXT_POISON 'status -s -b with color.status' '
 
 	git status -s -b | test_decode_color >output &&
 	test_cmp expect output
@@ -485,7 +485,7 @@ A  dir2/added
 ?? untracked
 EOF
 
-test_expect_success 'status --porcelain ignores color.ui' '
+test_expect_success NO_GETTEXT_POISON 'status --porcelain ignores color.ui' '
 
 	git config --unset color.status &&
 	git config color.ui always &&
@@ -494,7 +494,7 @@ test_expect_success 'status --porcelain ignores color.ui' '
 
 '
 
-test_expect_success 'status --porcelain ignores color.status' '
+test_expect_success NO_GETTEXT_POISON 'status --porcelain ignores color.status' '
 
 	git config --unset color.ui &&
 	git config color.status always &&
@@ -539,7 +539,7 @@ cat >expect <<\EOF
 EOF
 
 
-test_expect_success 'status without relative paths' '
+test_expect_success NO_GETTEXT_POISON 'status without relative paths' '
 
 	git config status.relativePaths false
 	(cd dir1 && git status) >output &&
@@ -558,7 +558,7 @@ A  dir2/added
 ?? untracked
 EOF
 
-test_expect_success 'status -s without relative paths' '
+test_expect_success NO_GETTEXT_POISON 'status -s without relative paths' '
 
 	(cd dir1 && git status -s) >output &&
 	test_cmp expect output
@@ -581,7 +581,7 @@ cat <<EOF >expect
 #	output
 #	untracked
 EOF
-test_expect_success 'dry-run of partial commit excluding new file in index' '
+test_expect_success NO_GETTEXT_POISON 'dry-run of partial commit excluding new file in index' '
 	git commit --dry-run dir1/modified >output &&
 	test_cmp expect output
 '
@@ -630,13 +630,13 @@ cat >expect <<EOF
 #	output
 #	untracked
 EOF
-test_expect_success 'status submodule summary is disabled by default' '
+test_expect_success NO_GETTEXT_POISON 'status submodule summary is disabled by default' '
 	git status >output &&
 	test_cmp expect output
 '
 
 # we expect the same as the previous test
-test_expect_success 'status --untracked-files=all does not show submodule' '
+test_expect_success NO_GETTEXT_POISON 'status --untracked-files=all does not show submodule' '
 	git status --untracked-files=all >output &&
 	test_cmp expect output
 '
@@ -694,7 +694,7 @@ cat >expect <<EOF
 #	output
 #	untracked
 EOF
-test_expect_success 'status submodule summary' '
+test_expect_success NO_GETTEXT_POISON 'status submodule summary' '
 	git config status.submodulesummary 10 &&
 	git status >output &&
 	test_cmp expect output
@@ -711,7 +711,7 @@ A  sm
 ?? output
 ?? untracked
 EOF
-test_expect_success 'status -s submodule summary' '
+test_expect_success NO_GETTEXT_POISON 'status -s submodule summary' '
 	git status -s >output &&
 	test_cmp expect output
 '
@@ -735,7 +735,7 @@ cat >expect <<EOF
 #	untracked
 no changes added to commit (use "git add" and/or "git commit -a")
 EOF
-test_expect_success 'status submodule summary (clean submodule)' '
+test_expect_success NO_GETTEXT_POISON 'status submodule summary (clean submodule)' '
 	git commit -m "commit submodule" &&
 	git config status.submodulesummary 10 &&
 	test_must_fail git commit --dry-run >output &&
@@ -753,7 +753,7 @@ cat >expect <<EOF
 ?? output
 ?? untracked
 EOF
-test_expect_success 'status -s submodule summary (clean submodule)' '
+test_expect_success NO_GETTEXT_POISON 'status -s submodule summary (clean submodule)' '
 	git status -s >output &&
 	test_cmp expect output
 '
@@ -787,7 +787,7 @@ cat >expect <<EOF
 #	output
 #	untracked
 EOF
-test_expect_success 'commit --dry-run submodule summary (--amend)' '
+test_expect_success NO_GETTEXT_POISON 'commit --dry-run submodule summary (--amend)' '
 	git config status.submodulesummary 10 &&
 	git commit --dry-run --amend >output &&
 	test_cmp expect output
@@ -842,13 +842,13 @@ cat > expect << EOF
 #	untracked
 EOF
 
-test_expect_success '--ignore-submodules=untracked suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '--ignore-submodules=untracked suppresses submodules with untracked content' '
 	echo modified > sm/untracked &&
 	git status --ignore-submodules=untracked > output &&
 	test_cmp expect output
 '
 
-test_expect_success '.gitmodules ignore=untracked suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.gitmodules ignore=untracked suppresses submodules with untracked content' '
 	git config diff.ignoreSubmodules dirty &&
 	git status >output &&
 	test_cmp expect output &&
@@ -860,7 +860,7 @@ test_expect_success '.gitmodules ignore=untracked suppresses submodules with unt
 	git config --unset diff.ignoreSubmodules
 '
 
-test_expect_success '.git/config ignore=untracked suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.git/config ignore=untracked suppresses submodules with untracked content' '
 	git config --add -f .gitmodules submodule.subname.ignore none &&
 	git config --add -f .gitmodules submodule.subname.path sm &&
 	git config --add submodule.subname.ignore untracked &&
@@ -871,12 +871,12 @@ test_expect_success '.git/config ignore=untracked suppresses submodules with unt
 	git config --remove-section -f .gitmodules submodule.subname
 '
 
-test_expect_success '--ignore-submodules=dirty suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '--ignore-submodules=dirty suppresses submodules with untracked content' '
 	git status --ignore-submodules=dirty > output &&
 	test_cmp expect output
 '
 
-test_expect_success '.gitmodules ignore=dirty suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.gitmodules ignore=dirty suppresses submodules with untracked content' '
 	git config diff.ignoreSubmodules dirty &&
 	git status >output &&
 	! test -s actual &&
@@ -888,7 +888,7 @@ test_expect_success '.gitmodules ignore=dirty suppresses submodules with untrack
 	git config --unset diff.ignoreSubmodules
 '
 
-test_expect_success '.git/config ignore=dirty suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.git/config ignore=dirty suppresses submodules with untracked content' '
 	git config --add -f .gitmodules submodule.subname.ignore none &&
 	git config --add -f .gitmodules submodule.subname.path sm &&
 	git config --add submodule.subname.ignore dirty &&
@@ -899,13 +899,13 @@ test_expect_success '.git/config ignore=dirty suppresses submodules with untrack
 	git config -f .gitmodules  --remove-section submodule.subname
 '
 
-test_expect_success '--ignore-submodules=dirty suppresses submodules with modified content' '
+test_expect_success NO_GETTEXT_POISON '--ignore-submodules=dirty suppresses submodules with modified content' '
 	echo modified > sm/foo &&
 	git status --ignore-submodules=dirty > output &&
 	test_cmp expect output
 '
 
-test_expect_success '.gitmodules ignore=dirty suppresses submodules with modified content' '
+test_expect_success NO_GETTEXT_POISON '.gitmodules ignore=dirty suppresses submodules with modified content' '
 	git config --add -f .gitmodules submodule.subname.ignore dirty &&
 	git config --add -f .gitmodules submodule.subname.path sm &&
 	git status > output &&
@@ -913,7 +913,7 @@ test_expect_success '.gitmodules ignore=dirty suppresses submodules with modifie
 	git config -f .gitmodules  --remove-section submodule.subname
 '
 
-test_expect_success '.git/config ignore=dirty suppresses submodules with modified content' '
+test_expect_success NO_GETTEXT_POISON '.git/config ignore=dirty suppresses submodules with modified content' '
 	git config --add -f .gitmodules submodule.subname.ignore none &&
 	git config --add -f .gitmodules submodule.subname.path sm &&
 	git config --add submodule.subname.ignore dirty &&
@@ -956,12 +956,12 @@ cat > expect << EOF
 #	untracked
 EOF
 
-test_expect_success "--ignore-submodules=untracked doesn't suppress submodules with modified content" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=untracked doesn't suppress submodules with modified content" '
 	git status --ignore-submodules=untracked > output &&
 	test_cmp expect output
 '
 
-test_expect_success ".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
+test_expect_success NO_GETTEXT_POISON ".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
 	git config --add -f .gitmodules submodule.subname.ignore untracked &&
 	git config --add -f .gitmodules submodule.subname.path sm &&
 	git status > output &&
@@ -969,7 +969,7 @@ test_expect_success ".gitmodules ignore=untracked doesn't suppress submodules wi
 	git config -f .gitmodules  --remove-section submodule.subname
 '
 
-test_expect_success ".git/config ignore=untracked doesn't suppress submodules with modified content" '
+test_expect_success NO_GETTEXT_POISON ".git/config ignore=untracked doesn't suppress submodules with modified content" '
 	git config --add -f .gitmodules submodule.subname.ignore none &&
 	git config --add -f .gitmodules submodule.subname.path sm &&
 	git config --add submodule.subname.ignore untracked &&
@@ -1018,12 +1018,12 @@ cat > expect << EOF
 #	untracked
 EOF
 
-test_expect_success "--ignore-submodules=untracked doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=untracked doesn't suppress submodule summary" '
 	git status --ignore-submodules=untracked > output &&
 	test_cmp expect output
 '
 
-test_expect_success ".gitmodules ignore=untracked doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".gitmodules ignore=untracked doesn't suppress submodule summary" '
 	git config --add -f .gitmodules submodule.subname.ignore untracked &&
 	git config --add -f .gitmodules submodule.subname.path sm &&
 	git status > output &&
@@ -1031,7 +1031,7 @@ test_expect_success ".gitmodules ignore=untracked doesn't suppress submodule sum
 	git config -f .gitmodules  --remove-section submodule.subname
 '
 
-test_expect_success ".git/config ignore=untracked doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".git/config ignore=untracked doesn't suppress submodule summary" '
 	git config --add -f .gitmodules submodule.subname.ignore none &&
 	git config --add -f .gitmodules submodule.subname.path sm &&
 	git config --add submodule.subname.ignore untracked &&
@@ -1042,11 +1042,11 @@ test_expect_success ".git/config ignore=untracked doesn't suppress submodule sum
 	git config -f .gitmodules  --remove-section submodule.subname
 '
 
-test_expect_success "--ignore-submodules=dirty doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=dirty doesn't suppress submodule summary" '
 	git status --ignore-submodules=dirty > output &&
 	test_cmp expect output
 '
-test_expect_success ".gitmodules ignore=dirty doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".gitmodules ignore=dirty doesn't suppress submodule summary" '
 	git config --add -f .gitmodules submodule.subname.ignore dirty &&
 	git config --add -f .gitmodules submodule.subname.path sm &&
 	git status > output &&
@@ -1054,7 +1054,7 @@ test_expect_success ".gitmodules ignore=dirty doesn't suppress submodule summary
 	git config -f .gitmodules  --remove-section submodule.subname
 '
 
-test_expect_success ".git/config ignore=dirty doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".git/config ignore=dirty doesn't suppress submodule summary" '
 	git config --add -f .gitmodules submodule.subname.ignore none &&
 	git config --add -f .gitmodules submodule.subname.path sm &&
 	git config --add submodule.subname.ignore dirty &&
@@ -1086,7 +1086,7 @@ cat > expect << EOF
 no changes added to commit (use "git add" and/or "git commit -a")
 EOF
 
-test_expect_success "--ignore-submodules=all suppresses submodule summary" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=all suppresses submodule summary" '
 	git status --ignore-submodules=all > output &&
 	test_cmp expect output
 '
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index b4f40e4..cc6c4e9 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -484,7 +484,7 @@ test_expect_success 'merge fast-forward in a dirty tree' '
 
 test_debug 'git log --graph --decorate --oneline --all'
 
-test_expect_success 'in-index merge' '
+test_expect_success NO_GETTEXT_POISON 'in-index merge' '
 	git reset --hard c0 &&
 	git merge --no-ff -s resolve c1 >out &&
 	grep "Wonderful." out &&
diff --git a/t/t7811-grep-open.sh b/t/t7811-grep-open.sh
index 568a6f2..3aa544c 100755
--- a/t/t7811-grep-open.sh
+++ b/t/t7811-grep-open.sh
@@ -61,7 +61,7 @@ test_expect_success SIMPLEPAGER 'git grep -O' '
 	test_cmp empty out
 '
 
-test_expect_success 'git grep -O --cached' '
+test_expect_success NO_GETTEXT_POISON 'git grep -O --cached' '
 	test_must_fail git grep --cached -O GREP_PATTERN >out 2>msg &&
 	grep open-files-in-pager msg
 '
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 51/63] gettextize: git-merge basic messages
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (6 preceding siblings ...)
  2010-09-04 22:10 ` [PATCH 28/63] gettext tests: skip breaking " Ævar Arnfjörð Bjarmason
@ 2010-09-04 22:10 ` Ævar Arnfjörð Bjarmason
  2010-09-04 22:10 ` [PATCH 63/63] po/en_GB.po: add British English Translation Ævar Arnfjörð Bjarmason
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-04 22:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Thomas Rast, Sam Reed, Jan Krüger,
	Ævar Arnfjörð Bjarmason

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/merge.c |  122 +++++++++++++++++++++++++++---------------------------
 1 files changed, 61 insertions(+), 61 deletions(-)

diff --git a/builtin/merge.c b/builtin/merge.c
index 5f65c0c..0ae2b51 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -79,7 +79,7 @@ static int option_parse_message(const struct option *opt,
 		strbuf_addf(buf, "%s%s", buf->len ? "\n\n" : "", arg);
 		have_message = 1;
 	} else
-		return error("switch `m' requires a value");
+		return error(_("switch `m' requires a value"));
 	return 0;
 }
 
@@ -116,13 +116,13 @@ static struct strategy *get_strategy(const char *name)
 		exclude_cmds(&main_cmds, &not_strategies);
 	}
 	if (!is_in_cmdlist(&main_cmds, name) && !is_in_cmdlist(&other_cmds, name)) {
-		fprintf(stderr, "Could not find merge strategy '%s'.\n", name);
-		fprintf(stderr, "Available strategies are:");
+		fprintf(stderr, _("Could not find merge strategy '%s'.\n"), name);
+		fprintf(stderr, _("Available strategies are:"));
 		for (i = 0; i < main_cmds.cnt; i++)
 			fprintf(stderr, " %s", main_cmds.names[i]->name);
 		fprintf(stderr, ".\n");
 		if (other_cmds.cnt) {
-			fprintf(stderr, "Available custom strategies are:");
+			fprintf(stderr, _("Available custom strategies are:"));
 			for (i = 0; i < other_cmds.cnt; i++)
 				fprintf(stderr, " %s", other_cmds.names[i]->name);
 			fprintf(stderr, ".\n");
@@ -220,17 +220,17 @@ static void save_state(void)
 	cp.git_cmd = 1;
 
 	if (start_command(&cp))
-		die("could not run stash.");
+		die(_("could not run stash."));
 	len = strbuf_read(&buffer, cp.out, 1024);
 	close(cp.out);
 
 	if (finish_command(&cp) || len < 0)
-		die("stash failed");
+		die(_("stash failed"));
 	else if (!len)
 		return;
 	strbuf_setlen(&buffer, buffer.len-1);
 	if (get_sha1(buffer.buf, stash))
-		die("not a valid object: %s", buffer.buf);
+		die(_("not a valid object: %s"), buffer.buf);
 }
 
 static void reset_hard(unsigned const char *sha1, int verbose)
@@ -247,7 +247,7 @@ static void reset_hard(unsigned const char *sha1, int verbose)
 	args[i] = NULL;
 
 	if (run_command_v_opt(args, RUN_GIT_CMD))
-		die("read-tree failed");
+		die(_("read-tree failed"));
 }
 
 static void restore_state(void)
@@ -276,7 +276,7 @@ static void restore_state(void)
 static void finish_up_to_date(const char *msg)
 {
 	if (verbosity >= 0)
-		printf("%s%s\n", squash ? " (nothing to squash)" : "", msg);
+		printf("%s%s\n", squash ? _(" (nothing to squash)") : "", msg);
 	drop_save();
 }
 
@@ -289,10 +289,10 @@ static void squash_message(void)
 	int fd;
 	struct pretty_print_context ctx = {0};
 
-	printf("Squash commit -- not updating HEAD\n");
+	printf(_("Squash commit -- not updating HEAD\n"));
 	fd = open(git_path("SQUASH_MSG"), O_WRONLY | O_CREAT, 0666);
 	if (fd < 0)
-		die_errno("Could not write to '%s'", git_path("SQUASH_MSG"));
+		die_errno(_("Could not write to '%s'"), git_path("SQUASH_MSG"));
 
 	init_revisions(&rev, NULL);
 	rev.ignore_merges = 1;
@@ -307,7 +307,7 @@ static void squash_message(void)
 
 	setup_revisions(0, NULL, &rev, NULL);
 	if (prepare_revision_walk(&rev))
-		die("revision walk setup failed");
+		die(_("revision walk setup failed"));
 
 	ctx.abbrev = rev.abbrev;
 	ctx.date_mode = rev.date_mode;
@@ -320,9 +320,9 @@ static void squash_message(void)
 		pretty_print_commit(rev.commit_format, commit, &out, &ctx);
 	}
 	if (write(fd, out.buf, out.len) < 0)
-		die_errno("Writing SQUASH_MSG");
+		die_errno(_("Writing SQUASH_MSG"));
 	if (close(fd))
-		die_errno("Finishing SQUASH_MSG");
+		die_errno(_("Finishing SQUASH_MSG"));
 	strbuf_release(&out);
 }
 
@@ -342,7 +342,7 @@ static void finish(const unsigned char *new_head, const char *msg)
 		squash_message();
 	} else {
 		if (verbosity >= 0 && !merge_msg.len)
-			printf("No merge message -- not updating HEAD\n");
+			printf(_("No merge message -- not updating HEAD\n"));
 		else {
 			const char *argv_gc_auto[] = { "gc", "--auto", NULL };
 			update_ref(reflog_message.buf, "HEAD",
@@ -364,7 +364,7 @@ static void finish(const unsigned char *new_head, const char *msg)
 		if (diff_use_color_default > 0)
 			DIFF_OPT_SET(&opts, COLOR_DIFF);
 		if (diff_setup_done(&opts) < 0)
-			die("diff_setup_done failed");
+			die(_("diff_setup_done failed"));
 		diff_tree_sha1(head, new_head, "", &opts);
 		diffcore_std(&opts);
 		diff_flush(&opts);
@@ -393,7 +393,7 @@ static void merge_name(const char *remote, struct strbuf *msg)
 	memset(branch_head, 0, sizeof(branch_head));
 	remote_head = peel_to_type(remote, 0, NULL, OBJ_COMMIT);
 	if (!remote_head)
-		die("'%s' does not point to a commit", remote);
+		die(_("'%s' does not point to a commit"), remote);
 
 	if (dwim_ref(remote, strlen(remote), branch_head, &found_ref) > 0) {
 		if (!prefixcmp(found_ref, "refs/heads/")) {
@@ -458,7 +458,7 @@ static void merge_name(const char *remote, struct strbuf *msg)
 
 		fp = fopen(git_path("FETCH_HEAD"), "r");
 		if (!fp)
-			die_errno("could not open '%s' for reading",
+			die_errno(_("could not open '%s' for reading"),
 				  git_path("FETCH_HEAD"));
 		strbuf_getline(&line, fp, '\n');
 		fclose(fp);
@@ -488,7 +488,7 @@ static int git_merge_config(const char *k, const char *v, void *cb)
 		buf = xstrdup(v);
 		argc = split_cmdline(buf, &argv);
 		if (argc < 0)
-			die("Bad branch.%s.mergeoptions string: %s", branch,
+			die(_("Bad branch.%s.mergeoptions string: %s"), branch,
 			    split_cmdline_strerror(argc));
 		argv = xrealloc(argv, sizeof(*argv) * (argc + 2));
 		memmove(argv + 1, argv, sizeof(*argv) * (argc + 1));
@@ -550,7 +550,7 @@ static int read_tree_trivial(unsigned char *common, unsigned char *head,
 static void write_tree_trivial(unsigned char *sha1)
 {
 	if (write_cache_as_tree(sha1, 0, NULL))
-		die("git write-tree failed to write a tree");
+		die(_("git write-tree failed to write a tree"));
 }
 
 int try_merge_command(const char *strategy, struct commit_list *common,
@@ -591,7 +591,7 @@ int try_merge_command(const char *strategy, struct commit_list *common,
 	free(args);
 	discard_cache();
 	if (read_cache() < 0)
-		die("failed to read the cache");
+		die(_("failed to read the cache"));
 	resolve_undo_clear();
 
 	return ret;
@@ -608,7 +608,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
 	if (active_cache_changed &&
 			(write_cache(index_fd, active_cache, active_nr) ||
 			 commit_locked_index(lock)))
-		return error("Unable to write index.");
+		return error(_("Unable to write index."));
 	rollback_lock_file(lock);
 
 	if (!strcmp(strategy, "recursive") || !strcmp(strategy, "subtree")) {
@@ -621,7 +621,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
 		struct commit_list *j;
 
 		if (remoteheads->next) {
-			error("Not handling anything other than two heads merge.");
+			error(_("Not handling anything other than two heads merge."));
 			return 2;
 		}
 
@@ -648,7 +648,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
 			else if (!strcmp(xopts[x], "no-renormalize"))
 				o.renormalize = 0;
 			else
-				die("Unknown option for merge-recursive: -X%s", xopts[x]);
+				die(_("Unknown option for merge-recursive: -X%s"), xopts[x]);
 		}
 
 		o.branch1 = head_arg;
@@ -663,7 +663,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
 		if (active_cache_changed &&
 				(write_cache(index_fd, active_cache, active_nr) ||
 				 commit_locked_index(lock)))
-			die ("unable to write %s", get_index_file());
+			die (_("unable to write %s"), get_index_file());
 		rollback_lock_file(lock);
 		return clean ? 0 : 1;
 	} else {
@@ -734,7 +734,7 @@ int checkout_fast_forward(const unsigned char *head, const unsigned char *remote
 		return -1;
 	if (write_cache(fd, active_cache, active_nr) ||
 		commit_locked_index(lock_file))
-		die("unable to write new index file");
+		die(_("unable to write new index file"));
 	return 0;
 }
 
@@ -788,7 +788,7 @@ static int merge_trivial(void)
 	struct commit_list *parent = xmalloc(sizeof(*parent));
 
 	write_tree_trivial(result_tree);
-	printf("Wonderful.\n");
+	printf(_("Wonderful.\n"));
 	parent->item = lookup_commit(head);
 	parent->next = xmalloc(sizeof(*parent->next));
 	parent->next->item = remoteheads->item;
@@ -837,7 +837,7 @@ static int suggest_conflicts(int renormalizing)
 
 	fp = fopen(git_path("MERGE_MSG"), "a");
 	if (!fp)
-		die_errno("Could not open '%s' for writing",
+		die_errno(_("Could not open '%s' for writing"),
 			  git_path("MERGE_MSG"));
 	fprintf(fp, "\nConflicts:\n");
 	for (pos = 0; pos < active_nr; pos++) {
@@ -853,8 +853,8 @@ static int suggest_conflicts(int renormalizing)
 	}
 	fclose(fp);
 	rerere(allow_rerere_auto);
-	printf("Automatic merge failed; "
-			"fix conflicts and then commit the result.\n");
+	printf(_("Automatic merge failed; "
+			"fix conflicts and then commit the result.\n"));
 	return 1;
 }
 
@@ -868,7 +868,7 @@ static struct commit *is_old_style_invocation(int argc, const char **argv)
 			return NULL;
 		second_token = lookup_commit_reference_gently(second_sha1, 0);
 		if (!second_token)
-			die("'%s' is not a commit", argv[1]);
+			die(_("'%s' is not a commit"), argv[1]);
 		if (hashcmp(second_token->object.sha1, head))
 			return NULL;
 	}
@@ -918,10 +918,10 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 		 * add/rm <file>', just 'git commit'.
 		 */
 		if (advice_resolve_conflict)
-			die("You have not concluded your merge (MERGE_HEAD exists).\n"
-			    "Please, commit your changes before you can merge.");
+			die(_("You have not concluded your merge (MERGE_HEAD exists).\n"
+			    "Please, commit your changes before you can merge."));
 		else
-			die("You have not concluded your merge (MERGE_HEAD exists).");
+			die(_("You have not concluded your merge (MERGE_HEAD exists)."));
 	}
 
 	resolve_undo_clear();
@@ -948,12 +948,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 
 	if (squash) {
 		if (!allow_fast_forward)
-			die("You cannot combine --squash with --no-ff.");
+			die(_("You cannot combine --squash with --no-ff."));
 		option_commit = 0;
 	}
 
 	if (!allow_fast_forward && fast_forward_only)
-		die("You cannot combine --no-ff with --ff-only.");
+		die(_("You cannot combine --no-ff with --ff-only."));
 
 	if (!argc)
 		usage_with_options(builtin_merge_usage,
@@ -981,16 +981,16 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 		 * We do the same for "git pull".
 		 */
 		if (argc != 1)
-			die("Can merge only exactly one commit into "
-				"empty head");
+			die(_("Can merge only exactly one commit into "
+				"empty head"));
 		if (squash)
-			die("Squash commit into empty head not supported yet");
+			die(_("Squash commit into empty head not supported yet"));
 		if (!allow_fast_forward)
-			die("Non-fast-forward commit does not make sense into "
-			    "an empty head");
+			die(_("Non-fast-forward commit does not make sense into "
+			    "an empty head"));
 		remote_head = peel_to_type(argv[0], 0, NULL, OBJ_COMMIT);
 		if (!remote_head)
-			die("%s - not something we can merge", argv[0]);
+			die(_("%s - not something we can merge"), argv[0]);
 		update_ref("initial pull", "HEAD", remote_head->sha1, NULL, 0,
 				DIE_ON_ERR);
 		reset_hard(remote_head->sha1, 0);
@@ -1038,7 +1038,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 
 		o = peel_to_type(argv[i], 0, NULL, OBJ_COMMIT);
 		if (!o)
-			die("%s - not something we can merge", argv[i]);
+			die(_("%s - not something we can merge"), argv[i]);
 		commit = lookup_commit(o->sha1);
 		commit->util = (void *)argv[i];
 		remotes = &commit_list_insert(commit, remotes)->next;
@@ -1096,7 +1096,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 		strcpy(hex, find_unique_abbrev(head, DEFAULT_ABBREV));
 
 		if (verbosity >= 0)
-			printf("Updating %s..%s\n",
+			printf(_("Updating %s..%s\n"),
 				hex,
 				find_unique_abbrev(remoteheads->item->object.sha1,
 				DEFAULT_ABBREV));
@@ -1130,11 +1130,11 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 		if (allow_trivial && !fast_forward_only) {
 			/* See if it is really trivial. */
 			git_committer_info(IDENT_ERROR_ON_NO_NAME);
-			printf("Trying really trivial in-index merge...\n");
+			printf(_("Trying really trivial in-index merge...\n"));
 			if (!read_tree_trivial(common->item->object.sha1,
 					head, remoteheads->item->object.sha1))
 				return merge_trivial();
-			printf("Nope.\n");
+			printf(_("Nope.\n"));
 		}
 	} else {
 		/*
@@ -1167,7 +1167,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 	}
 
 	if (fast_forward_only)
-		die("Not possible to fast-forward, aborting.");
+		die(_("Not possible to fast-forward, aborting."));
 
 	/* We are going to make a new commit. */
 	git_committer_info(IDENT_ERROR_ON_NO_NAME);
@@ -1193,11 +1193,11 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 	for (i = 0; i < use_strategies_nr; i++) {
 		int ret;
 		if (i) {
-			printf("Rewinding the tree to pristine...\n");
+			printf(_("Rewinding the tree to pristine...\n"));
 			restore_state();
 		}
 		if (use_strategies_nr != 1)
-			printf("Trying merge strategy %s...\n",
+			printf(_("Trying merge strategy %s...\n"),
 				use_strategies[i]->name);
 		/*
 		 * Remember which strategy left the state in the working
@@ -1258,17 +1258,17 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 		restore_state();
 		if (use_strategies_nr > 1)
 			fprintf(stderr,
-				"No merge strategy handled the merge.\n");
+				_("No merge strategy handled the merge.\n"));
 		else
-			fprintf(stderr, "Merge with strategy %s failed.\n",
+			fprintf(stderr, _("Merge with strategy %s failed.\n"),
 				use_strategies[0]->name);
 		return 2;
 	} else if (best_strategy == wt_strategy)
 		; /* We already have its result in the working tree. */
 	else {
-		printf("Rewinding the tree to pristine...\n");
+		printf(_("Rewinding the tree to pristine...\n"));
 		restore_state();
-		printf("Using the %s to prepare resolving by hand.\n",
+		printf(_("Using the %s to prepare resolving by hand.\n"),
 			best_strategy);
 		try_merge_strategy(best_strategy, common, head_arg);
 	}
@@ -1284,35 +1284,35 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 				sha1_to_hex(j->item->object.sha1));
 		fd = open(git_path("MERGE_HEAD"), O_WRONLY | O_CREAT, 0666);
 		if (fd < 0)
-			die_errno("Could not open '%s' for writing",
+			die_errno(_("Could not open '%s' for writing"),
 				  git_path("MERGE_HEAD"));
 		if (write_in_full(fd, buf.buf, buf.len) != buf.len)
-			die_errno("Could not write to '%s'", git_path("MERGE_HEAD"));
+			die_errno(_("Could not write to '%s'"), git_path("MERGE_HEAD"));
 		close(fd);
 		strbuf_addch(&merge_msg, '\n');
 		fd = open(git_path("MERGE_MSG"), O_WRONLY | O_CREAT, 0666);
 		if (fd < 0)
-			die_errno("Could not open '%s' for writing",
+			die_errno(_("Could not open '%s' for writing"),
 				  git_path("MERGE_MSG"));
 		if (write_in_full(fd, merge_msg.buf, merge_msg.len) !=
 			merge_msg.len)
-			die_errno("Could not write to '%s'", git_path("MERGE_MSG"));
+			die_errno(_("Could not write to '%s'"), git_path("MERGE_MSG"));
 		close(fd);
 		fd = open(git_path("MERGE_MODE"), O_WRONLY | O_CREAT | O_TRUNC, 0666);
 		if (fd < 0)
-			die_errno("Could not open '%s' for writing",
+			die_errno(_("Could not open '%s' for writing"),
 				  git_path("MERGE_MODE"));
 		strbuf_reset(&buf);
 		if (!allow_fast_forward)
 			strbuf_addf(&buf, "no-ff");
 		if (write_in_full(fd, buf.buf, buf.len) != buf.len)
-			die_errno("Could not write to '%s'", git_path("MERGE_MODE"));
+			die_errno(_("Could not write to '%s'"), git_path("MERGE_MODE"));
 		close(fd);
 	}
 
 	if (merge_was_ok) {
-		fprintf(stderr, "Automatic merge went well; "
-			"stopped before committing as requested\n");
+		fprintf(stderr, _("Automatic merge went well; "
+			"stopped before committing as requested\n"));
 		return 0;
 	} else
 		return suggest_conflicts(option_renormalize);
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 63/63] po/en_GB.po: add British English Translation
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (7 preceding siblings ...)
  2010-09-04 22:10 ` [PATCH 51/63] gettextize: git-merge basic messages Ævar Arnfjörð Bjarmason
@ 2010-09-04 22:10 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 00/15] [REDO CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-04 22:10 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Thomas Rast, Sam Reed, Jan Krüger,
	Ævar Arnfjörð Bjarmason

From: Sam Reed <sam@reedyboy.net>

Translate the three Git messages from US to British English. These all
had to do with z v.s. s differences.

Signed-off-by: Sam Reed <sam@reedyboy.net>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 po/en_GB.po |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 po/en_GB.po

diff --git a/po/en_GB.po b/po/en_GB.po
new file mode 100644
index 0000000..b1f3e34
--- /dev/null
+++ b/po/en_GB.po
@@ -0,0 +1,22 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Git\n"
+"PO-Revision-Date: 2010-09-02 19:09 +0000\n"
+"Language-Team: Git Mailing List <git@vger.kernel.org>\n"
+"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
+"Last-Translator: Sam Reed <sam@reedyboy.net>\n"
+"Language-Team: Git Mailing List <git@vger.kernel.org>\n"
+"Language: en-gb\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Reinitialized existing"
+msgstr "Reinitialised existing"
+
+msgid "Initialized empty"
+msgstr "Initialised empty"
+
+#, c-format
+msgid "unrecognized argument: %s"
+msgstr "unrecognised argument: %s"
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 00/15] [REDO CONTINUE] Add gettext support to Git
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (8 preceding siblings ...)
  2010-09-04 22:10 ` [PATCH 63/63] po/en_GB.po: add British English Translation Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 01/15] gettextize: git-archive basic messages Ævar Arnfjörð Bjarmason
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

On Sat, Sep 4, 2010 at 22:10, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> The previous nested pull requests were a mess, and I needed to fix
> some bugs. So here's a total re-do of the ab/i18n series. Everything
> that's already in pu from ab/i18n can be ejected in favor of this.
>
> Most of these 63 patches have been seen here before. So I'll only be
> sending the stuff that's changed or interesting along with this
> series. To get the full thing go to:
>
>    git://github.com/avar/git.git ab/i18n-all
>    http://github.com/avar/git/compare/master...ab/i18n-all
>    http://github.com/avar/git/compare/master...ab/i18n-all.patch
>
> The last of which is a patch file suitable for git-am(1).
>
> Since last time I've rebased this on the new upstream master branch,
> which now has my ab/test-2 series.

Here's more work on top of my existing 63 patch series, bringing it to
78 patches in total.

With this all of the 'mainporcelain common' *and* 'mainporcelain' in
command-list.txt has been made translatable, aside from these
shellscripts:
    
    git-am                                  mainporcelain
    git-bisect                              mainporcelain common
    git-pull                                mainporcelain common
    git-rebase                              mainporcelain common
    git-stash                               mainporcelain
    git-submodule                           mainporcelain

Jan Krüger was doing some work on the git-add--interactive helper and
those, and I was getting comfortable with doing only C, so I've left
those for now.

This time around the changes to tests to add the NO_GETTEXT_POISON
prerequisite are part of the *.c patches themselves. This should make
it easier to review the series, since you can see what tests need to
be skipped for each patch.

This series goes on top of ab/i18n-all and can be pulled from my
GitHub branch:

    git://github.com/avar/git.git ab/i18n-all-continue
    http://github.com/avar/git/compare/ab/i18n-all...ab/i18n-all-continue
    http://github.com/avar/git/compare/ab/i18n-all...ab/i18n-all-continue.patch

And to see the whole thing from master:

    http://github.com/avar/git/compare/master...ab/i18n-all-continue
    http://github.com/avar/git/compare/master...ab/i18n-all-continue.patch

Note that this doesn't include Ramkumar Ramachandra's patch to add
Hindi. You'll have to get that from the archive separately.
    

Ævar Arnfjörð Bjarmason (15):
  gettextize: git-archive basic messages
  gettextize: git-bundle basic messages
  gettextize: git-clean basic messages
  gettextize: git-clean clean.requireForce messages
  gettextize: git-describe basic messages
  gettextize: git-gc basic messages
  gettextize: git-gc "Auto packing the repository" message
  gettextize: git-notes basic commands
  gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
  gettextize: git-notes "Refusing to %s notes in %s" message
  gettextize: git-revert basic messages
  gettextize: git-revert mark the "me" variable for translation
  gettextize: git-revert messages using the "me" variable
  gettextize: git-revert split up "could not revert/apply" message
  gettextize: git-shortlog basic messages

 builtin/archive.c                |   14 ++--
 builtin/bundle.c                 |    6 +-
 builtin/clean.c                  |   28 +++++----
 builtin/describe.c               |   36 +++++-----
 builtin/gc.c                     |   24 ++++----
 builtin/notes.c                  |  132 +++++++++++++++++++------------------
 builtin/revert.c                 |   65 ++++++++++---------
 builtin/shortlog.c               |    8 +-
 t/t3501-revert-cherry-pick.sh    |    2 +-
 t/t3507-cherry-pick-conflict.sh  |    2 +-
 t/t6120-describe.sh              |    2 +-
 t/t7012-skip-worktree-writing.sh |    4 +-
 t/t7300-clean.sh                 |    6 +-
 13 files changed, 170 insertions(+), 159 deletions(-)

-- 
1.7.2.3.313.gcd15

^ permalink raw reply	[flat|nested] 39+ messages in thread

* [PATCH 01/15] gettextize: git-archive basic messages
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (9 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 00/15] [REDO CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 02/15] gettextize: git-bundle " Ævar Arnfjörð Bjarmason
                   ` (13 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/archive.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/builtin/archive.c b/builtin/archive.c
index 6a887f5..b14eaba 100644
--- a/builtin/archive.c
+++ b/builtin/archive.c
@@ -14,10 +14,10 @@ static void create_output_file(const char *output_file)
 {
 	int output_fd = open(output_file, O_CREAT | O_WRONLY | O_TRUNC, 0666);
 	if (output_fd < 0)
-		die_errno("could not create archive file '%s'", output_file);
+		die_errno(_("could not create archive file '%s'"), output_file);
 	if (output_fd != 1) {
 		if (dup2(output_fd, 1) < 0)
-			die_errno("could not redirect output");
+			die_errno(_("could not redirect output"));
 		else
 			close(output_fd);
 	}
@@ -33,7 +33,7 @@ static int run_remote_archiver(int argc, const char **argv,
 
 	_remote = remote_get(remote);
 	if (!_remote->url[0])
-		die("git archive: Remote with no URL");
+		die(_("git archive: Remote with no URL"));
 	transport = transport_get(_remote, _remote->url[0]);
 	transport_connect(transport, "git-upload-archive", exec, fd);
 
@@ -43,18 +43,18 @@ static int run_remote_archiver(int argc, const char **argv,
 
 	len = packet_read_line(fd[0], buf, sizeof(buf));
 	if (!len)
-		die("git archive: expected ACK/NAK, got EOF");
+		die(_("git archive: expected ACK/NAK, got EOF"));
 	if (buf[len-1] == '\n')
 		buf[--len] = 0;
 	if (strcmp(buf, "ACK")) {
 		if (len > 5 && !prefixcmp(buf, "NACK "))
-			die("git archive: NACK %s", buf + 5);
-		die("git archive: protocol error");
+			die(_("git archive: NACK %s"), buf + 5);
+		die(_("git archive: protocol error"));
 	}
 
 	len = packet_read_line(fd[0], buf, sizeof(buf));
 	if (len)
-		die("git archive: expected a flush");
+		die(_("git archive: expected a flush"));
 
 	/* Now, start reading from fd[0] and spit it out to stdout */
 	rv = recv_sideband("archive", fd[0], 1);
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 02/15] gettextize: git-bundle basic messages
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (10 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 01/15] gettextize: git-archive basic messages Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 03/15] gettextize: git-clean " Ævar Arnfjörð Bjarmason
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/bundle.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin/bundle.c b/builtin/bundle.c
index 80649ba..f92970f 100644
--- a/builtin/bundle.c
+++ b/builtin/bundle.c
@@ -44,7 +44,7 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
 		close(bundle_fd);
 		if (verify_bundle(&header, 1))
 			return 1;
-		fprintf(stderr, "%s is okay\n", bundle_file);
+		fprintf(stderr, _("%s is okay\n"), bundle_file);
 		return 0;
 	}
 	if (!strcmp(cmd, "list-heads")) {
@@ -53,11 +53,11 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
 	}
 	if (!strcmp(cmd, "create")) {
 		if (!startup_info->have_repository)
-			die("Need a repository to create a bundle.");
+			die(_("Need a repository to create a bundle."));
 		return !!create_bundle(&header, bundle_file, argc, argv);
 	} else if (!strcmp(cmd, "unbundle")) {
 		if (!startup_info->have_repository)
-			die("Need a repository to unbundle.");
+			die(_("Need a repository to unbundle."));
 		return !!unbundle(&header, bundle_fd) ||
 			list_bundle_refs(&header, argc, argv);
 	} else
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 03/15] gettextize: git-clean basic messages
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (11 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 02/15] gettextize: git-bundle " Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 04/15] gettextize: git-clean clean.requireForce messages Ævar Arnfjörð Bjarmason
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/clean.c                  |   20 ++++++++++----------
 t/t7012-skip-worktree-writing.sh |    4 ++--
 t/t7300-clean.sh                 |    6 +++---
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/builtin/clean.c b/builtin/clean.c
index b508d2c..10dde87 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -75,7 +75,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 		dir.flags |= DIR_SHOW_IGNORED;
 
 	if (ignored && ignored_only)
-		die("-x and -X cannot be used together");
+		die(_("-x and -X cannot be used together"));
 
 	if (!show_only && !force)
 		die("clean.requireForce %s to true and neither -n nor -f given; "
@@ -87,7 +87,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 	dir.flags |= DIR_SHOW_OTHER_DIRECTORIES;
 
 	if (read_cache() < 0)
-		die("index file corrupt");
+		die(_("index file corrupt"));
 
 	if (!ignored)
 		setup_standard_excludes(&dir);
@@ -146,20 +146,20 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 			qname = quote_path_relative(directory.buf, directory.len, &buf, prefix);
 			if (show_only && (remove_directories ||
 			    (matches == MATCHED_EXACTLY))) {
-				printf("Would remove %s\n", qname);
+				printf(_("Would remove %s\n"), qname);
 			} else if (remove_directories ||
 				   (matches == MATCHED_EXACTLY)) {
 				if (!quiet)
-					printf("Removing %s\n", qname);
+					printf(_("Removing %s\n"), qname);
 				if (remove_dir_recursively(&directory,
 							   rm_flags) != 0) {
-					warning("failed to remove '%s'", qname);
+					warning(_("failed to remove '%s'"), qname);
 					errors++;
 				}
 			} else if (show_only) {
-				printf("Would not remove %s\n", qname);
+				printf(_("Would not remove %s\n"), qname);
 			} else {
-				printf("Not removing %s\n", qname);
+				printf(_("Not removing %s\n"), qname);
 			}
 			strbuf_reset(&directory);
 		} else {
@@ -167,13 +167,13 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 				continue;
 			qname = quote_path_relative(ent->name, -1, &buf, prefix);
 			if (show_only) {
-				printf("Would remove %s\n", qname);
+				printf(_("Would remove %s\n"), qname);
 				continue;
 			} else if (!quiet) {
-				printf("Removing %s\n", qname);
+				printf(_("Removing %s\n"), qname);
 			}
 			if (unlink(ent->name) != 0) {
-				warning("failed to remove '%s'", qname);
+				warning(_("failed to remove '%s'"), qname);
 				errors++;
 			}
 		}
diff --git a/t/t7012-skip-worktree-writing.sh b/t/t7012-skip-worktree-writing.sh
index 582d0b5..6fccd91 100755
--- a/t/t7012-skip-worktree-writing.sh
+++ b/t/t7012-skip-worktree-writing.sh
@@ -124,13 +124,13 @@ cat >expected <<EOF
 Would remove expected
 Would remove result
 EOF
-test_expect_success 'git-clean, absent case' '
+test_expect_success NO_GETTEXT_POISON 'git-clean, absent case' '
 	setup_absent &&
 	git clean -n > result &&
 	test_cmp expected result
 '
 
-test_expect_success 'git-clean, dirty case' '
+test_expect_success NO_GETTEXT_POISON 'git-clean, dirty case' '
 	setup_dirty &&
 	git clean -n > result &&
 	test_cmp expected result
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 7dbbea1..eed032d 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -110,7 +110,7 @@ test_expect_success 'git clean with prefix' '
 
 '
 
-test_expect_success 'git clean with relative prefix' '
+test_expect_success NO_GETTEXT_POISON 'git clean with relative prefix' '
 
 	mkdir -p build docs &&
 	touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@@ -125,7 +125,7 @@ test_expect_success 'git clean with relative prefix' '
 	}
 '
 
-test_expect_success 'git clean with absolute path' '
+test_expect_success NO_GETTEXT_POISON 'git clean with absolute path' '
 
 	mkdir -p build docs &&
 	touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@@ -377,7 +377,7 @@ test_expect_success 'clean.requireForce and -f' '
 
 '
 
-test_expect_success 'core.excludesfile' '
+test_expect_success NO_GETTEXT_POISON 'core.excludesfile' '
 
 	echo excludes >excludes &&
 	echo included >included &&
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 04/15] gettextize: git-clean clean.requireForce messages
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (12 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 03/15] gettextize: git-clean " Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 05/15] gettextize: git-describe basic messages Ævar Arnfjörð Bjarmason
                   ` (10 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Split up the "clean.requireForce set/defaults to true..." die()
message to make it easier to translate.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/clean.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/builtin/clean.c b/builtin/clean.c
index 10dde87..642d767 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -78,8 +78,12 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 		die(_("-x and -X cannot be used together"));
 
 	if (!show_only && !force)
-		die("clean.requireForce %s to true and neither -n nor -f given; "
-		    "refusing to clean", config_set ? "set" : "defaults");
+		if (config_set)
+			die(_("clean.requireForce set to true and neither -n nor -f given; "
+				  "refusing to clean"));
+		else
+			die(_("clean.requireForce defaults to true and neither -n nor -f given; "
+				  "refusing to clean"));
 
 	if (force > 1)
 		rm_flags = 0;
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 05/15] gettextize: git-describe basic messages
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (13 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 04/15] gettextize: git-clean clean.requireForce messages Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 06/15] gettextize: git-gc " Ævar Arnfjörð Bjarmason
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/describe.c  |   36 ++++++++++++++++++------------------
 t/t6120-describe.sh |    2 +-
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/builtin/describe.c b/builtin/describe.c
index 43caff2..616d405 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -202,13 +202,13 @@ static void display_name(struct commit_name *n)
 	if (n->prio == 2 && !n->tag) {
 		n->tag = lookup_tag(n->sha1);
 		if (!n->tag || parse_tag(n->tag))
-			die("annotated tag %s not available", n->path);
+			die(_("annotated tag %s not available"), n->path);
 	}
 	if (n->tag && !n->name_checked) {
 		if (!n->tag->tag)
-			die("annotated tag %s has no embedded name", n->path);
+			die(_("annotated tag %s has no embedded name"), n->path);
 		if (strcmp(n->tag->tag, all ? n->path + 5 : n->path))
-			warning("tag '%s' is really '%s' here", n->tag->tag, n->path);
+			warning(_("tag '%s' is really '%s' here"), n->tag->tag, n->path);
 		n->name_checked = 1;
 	}
 
@@ -235,10 +235,10 @@ static void describe(const char *arg, int last_one)
 	unsigned int unannotated_cnt = 0;
 
 	if (get_sha1(arg, sha1))
-		die("Not a valid object name %s", arg);
+		die(_("Not a valid object name %s"), arg);
 	cmit = lookup_commit_reference(sha1);
 	if (!cmit)
-		die("%s is not a valid '%s' object", arg, commit_type);
+		die(_("%s is not a valid '%s' object"), arg, commit_type);
 
 	n = cmit->util;
 	if (n && (tags || all || n->prio == 2)) {
@@ -255,9 +255,9 @@ static void describe(const char *arg, int last_one)
 	}
 
 	if (!max_candidates)
-		die("no tag exactly matches '%s'", sha1_to_hex(cmit->object.sha1));
+		die(_("no tag exactly matches '%s'"), sha1_to_hex(cmit->object.sha1));
 	if (debug)
-		fprintf(stderr, "searching to describe %s\n", arg);
+		fprintf(stderr, _("searching to describe %s\n"), arg);
 
 	list = NULL;
 	cmit->object.flags = SEEN;
@@ -292,7 +292,7 @@ static void describe(const char *arg, int last_one)
 		}
 		if (annotated_cnt && !list) {
 			if (debug)
-				fprintf(stderr, "finished search at %s\n",
+				fprintf(stderr, _("finished search at %s\n"),
 					sha1_to_hex(c->object.sha1));
 			break;
 		}
@@ -316,12 +316,12 @@ static void describe(const char *arg, int last_one)
 			return;
 		}
 		if (unannotated_cnt)
-			die("No annotated tags can describe '%s'.\n"
-			    "However, there were unannotated tags: try --tags.",
+			die(_("No annotated tags can describe '%s'.\n"
+			    "However, there were unannotated tags: try --tags."),
 			    sha1_to_hex(sha1));
 		else
-			die("No tags can describe '%s'.\n"
-			    "Try --always, or create some tags.",
+			die(_("No tags can describe '%s'.\n"
+			    "Try --always, or create some tags."),
 			    sha1_to_hex(sha1));
 	}
 
@@ -341,11 +341,11 @@ static void describe(const char *arg, int last_one)
 				prio_names[t->name->prio],
 				t->depth, t->name->path);
 		}
-		fprintf(stderr, "traversed %lu commits\n", seen_commits);
+		fprintf(stderr, _("traversed %lu commits\n"), seen_commits);
 		if (gave_up_on) {
 			fprintf(stderr,
-				"more than %i tags found; listed %i most recent\n"
-				"gave up search at %s\n",
+				_("more than %i tags found; listed %i most recent\n"
+				"gave up search at %s\n"),
 				max_candidates, max_candidates,
 				sha1_to_hex(gave_up_on->object.sha1));
 		}
@@ -395,7 +395,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
 	save_commit_buffer = 0;
 
 	if (longformat && abbrev == 0)
-		die("--long is incompatible with --abbrev=0");
+		die(_("--long is incompatible with --abbrev=0"));
 
 	if (contains) {
 		const char **args = xmalloc((7 + argc) * sizeof(char *));
@@ -420,14 +420,14 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
 
 	for_each_ref(get_name, NULL);
 	if (!found_names && !always)
-		die("No names found, cannot describe anything.");
+		die(_("No names found, cannot describe anything."));
 
 	if (argc == 0) {
 		if (dirty && !cmd_diff_index(ARRAY_SIZE(diff_index_args) - 1, diff_index_args, prefix))
 			dirty = NULL;
 		describe("HEAD", 1);
 	} else if (dirty) {
-		die("--dirty is incompatible with committishes");
+		die(_("--dirty is incompatible with committishes"));
 	} else {
 		while (argc-- > 0) {
 			describe(*argv++, argc == 0);
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 876d1ab..210b9a2 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -123,7 +123,7 @@ cat - >err.expect <<EOF
 warning: tag 'A' is really 'Q' here
 EOF
 check_describe A-* HEAD
-test_expect_success 'warning was displayed for Q' '
+test_expect_success NO_GETTEXT_POISON 'warning was displayed for Q' '
 	test_cmp err.expect err.actual
 '
 test_expect_success 'rename tag Q back to A' '
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 06/15] gettextize: git-gc basic messages
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (14 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 05/15] gettextize: git-describe basic messages Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 07/15] gettextize: git-gc "Auto packing the repository" message Ævar Arnfjörð Bjarmason
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/gc.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/builtin/gc.c b/builtin/gc.c
index c304638..05aed1f 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -60,7 +60,7 @@ static int gc_config(const char *var, const char *value, void *cb)
 		if (value && strcmp(value, "now")) {
 			unsigned long now = approxidate("now");
 			if (approxidate(value) >= now)
-				return error("Invalid %s: '%s'", var, value);
+				return error(_("Invalid %s: '%s'"), var, value);
 		}
 		return git_config_string(&prune_expire, var, value);
 	}
@@ -75,7 +75,7 @@ static void append_option(const char **cmd, const char *opt, int max_length)
 		;
 
 	if (i + 2 >= max_length)
-		die("Too many options specified");
+		die(_("Too many options specified"));
 	cmd[i++] = opt;
 	cmd[i] = NULL;
 }
@@ -100,7 +100,7 @@ static int too_many_loose_objects(void)
 		return 0;
 
 	if (sizeof(path) <= snprintf(path, sizeof(path), "%s/17", objdir)) {
-		warning("insanely long object directory %.*s", 50, objdir);
+		warning(_("insanely long object directory %.*s"), 50, objdir);
 		return 0;
 	}
 	dir = opendir(path);
@@ -248,8 +248,8 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
 		return error(FAILED_RUN, argv_rerere[0]);
 
 	if (auto_gc && too_many_loose_objects())
-		warning("There are too many unreachable loose objects; "
-			"run 'git prune' to remove them.");
+		warning(_("There are too many unreachable loose objects; "
+			"run 'git prune' to remove them."));
 
 	return 0;
 }
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 07/15] gettextize: git-gc "Auto packing the repository" message
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (15 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 06/15] gettextize: git-gc " Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 08/15] gettextize: git-notes basic commands Ævar Arnfjörð Bjarmason
                   ` (7 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Split up the "Auto packing the repository" message into quiet and
verbose variants to make translation easier.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/gc.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/builtin/gc.c b/builtin/gc.c
index 05aed1f..74e77cb 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -216,13 +216,13 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
 		 */
 		if (!need_to_gc())
 			return 0;
-		fprintf(stderr,
-			"Auto packing the repository for optimum performance.%s\n",
-			quiet
-			? ""
-			: (" You may also\n"
-			   "run \"git gc\" manually. See "
-			   "\"git help gc\" for more information."));
+		if (quiet)
+			fprintf(stderr, _("Auto packing the repository for optimum performance.\n"));
+		else
+			fprintf(stderr,
+					_("Auto packing the repository for optimum performance. You may also\n"
+					"run \"git gc\" manually. See "
+					"\"git help gc\" for more information."));
 	} else
 		append_option(argv_repack,
 			      prune_expire && !strcmp(prune_expire, "now")
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 08/15] gettextize: git-notes basic commands
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (16 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 07/15] gettextize: git-gc "Auto packing the repository" message Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 09/15] gettextize: git-notes GIT_NOTES_REWRITE_MODE error message Ævar Arnfjörð Bjarmason
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/notes.c |  108 +++++++++++++++++++++++++++---------------------------
 1 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/builtin/notes.c b/builtin/notes.c
index fbc347c..d171f6f 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -119,13 +119,13 @@ static void write_commented_object(int fd, const unsigned char *object)
 	show.err = 0;
 	show.git_cmd = 1;
 	if (start_command(&show))
-		die("unable to start 'show' for object '%s'",
+		die(_("unable to start 'show' for object '%s'"),
 		    sha1_to_hex(object));
 
 	/* Open the output as FILE* so strbuf_getline() can be used. */
 	show_out = xfdopen(show.out, "r");
 	if (show_out == NULL)
-		die_errno("can't fdopen 'show' output fd");
+		die_errno(_("can't fdopen 'show' output fd"));
 
 	/* Prepend "# " to each output line and write result to 'fd' */
 	while (strbuf_getline(&buf, show_out, '\n') != EOF) {
@@ -135,10 +135,10 @@ static void write_commented_object(int fd, const unsigned char *object)
 	}
 	strbuf_release(&buf);
 	if (fclose(show_out))
-		die_errno("failed to close pipe to 'show' for object '%s'",
+		die_errno(_("failed to close pipe to 'show' for object '%s'"),
 			  sha1_to_hex(object));
 	if (finish_command(&show))
-		die("failed to finish 'show' for object '%s'",
+		die(_("failed to finish 'show' for object '%s'"),
 		    sha1_to_hex(object));
 }
 
@@ -155,7 +155,7 @@ static void create_note(const unsigned char *object, struct msg_arg *msg,
 		path = git_pathdup("NOTES_EDITMSG");
 		fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
 		if (fd < 0)
-			die_errno("could not create file '%s'", path);
+			die_errno(_("could not create file '%s'"), path);
 
 		if (msg->given)
 			write_or_die(fd, msg->buf.buf, msg->buf.len);
@@ -169,8 +169,8 @@ static void create_note(const unsigned char *object, struct msg_arg *msg,
 		strbuf_reset(&(msg->buf));
 
 		if (launch_editor(path, &(msg->buf), NULL)) {
-			die("Please supply the note contents using either -m" \
-			    " or -F option");
+			die(_("Please supply the note contents using either -m" \
+			    " or -F option"));
 		}
 		stripspace(&(msg->buf), 1);
 	}
@@ -190,14 +190,14 @@ static void create_note(const unsigned char *object, struct msg_arg *msg,
 	}
 
 	if (!msg->buf.len) {
-		fprintf(stderr, "Removing note for object %s\n",
+		fprintf(stderr, _("Removing note for object %s\n"),
 			sha1_to_hex(object));
 		hashclr(result);
 	} else {
 		if (write_sha1_file(msg->buf.buf, msg->buf.len, blob_type, result)) {
-			error("unable to write note object");
+			error(_("unable to write note object"));
 			if (path)
-				error("The note contents has been left in %s",
+				error(_("The note contents has been left in %s"),
 				      path);
 			exit(128);
 		}
@@ -231,9 +231,9 @@ static int parse_file_arg(const struct option *opt, const char *arg, int unset)
 		strbuf_addch(&(msg->buf), '\n');
 	if (!strcmp(arg, "-")) {
 		if (strbuf_read(&(msg->buf), 0, 1024) < 0)
-			die_errno("cannot read '%s'", arg);
+			die_errno(_("cannot read '%s'"), arg);
 	} else if (strbuf_read_file(&(msg->buf), arg, 1024) < 0)
-		die_errno("could not open or read '%s'", arg);
+		die_errno(_("could not open or read '%s'"), arg);
 	stripspace(&(msg->buf), 0);
 
 	msg->given = 1;
@@ -252,10 +252,10 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
 		strbuf_addch(&(msg->buf), '\n');
 
 	if (get_sha1(arg, object))
-		die("Failed to resolve '%s' as a valid ref.", arg);
+		die(_("Failed to resolve '%s' as a valid ref."), arg);
 	if (!(buf = read_sha1_file(object, &type, &len)) || !len) {
 		free(buf);
-		die("Failed to read object '%s'.", arg);;
+		die(_("Failed to read object '%s'."), arg);;
 	}
 	strbuf_add(&(msg->buf), buf, len);
 	free(buf);
@@ -280,7 +280,7 @@ int commit_notes(struct notes_tree *t, const char *msg)
 	if (!t)
 		t = &default_notes_tree;
 	if (!t->initialized || !t->ref || !*t->ref)
-		die("Cannot commit uninitialized/unreferenced notes tree");
+		die(_("Cannot commit uninitialized/unreferenced notes tree"));
 	if (!t->dirty)
 		return 0; /* don't have to commit an unchanged tree */
 
@@ -292,7 +292,7 @@ int commit_notes(struct notes_tree *t, const char *msg)
 
 	/* Convert notes tree to tree object */
 	if (write_notes_tree(t, tree_sha1))
-		die("Failed to write current notes tree to database");
+		die(_("Failed to write current notes tree to database"));
 
 	/* Create new commit for the tree object */
 	if (!read_ref(t->ref, prev_commit)) { /* retrieve parent commit */
@@ -304,7 +304,7 @@ int commit_notes(struct notes_tree *t, const char *msg)
 		parent = NULL;
 	}
 	if (commit_tree(buf.buf + 7, tree_sha1, parent, new_commit, NULL))
-		die("Failed to commit notes tree to database");
+		die(_("Failed to commit notes tree to database"));
 
 	/* Update notes ref with new commit */
 	update_ref(buf.buf, t->ref, new_commit, prev_commit, 0, DIE_ON_ERR);
@@ -336,7 +336,7 @@ static int notes_rewrite_config(const char *k, const char *v, void *cb)
 			config_error_nonbool(k);
 		c->combine = parse_combine_notes_fn(v);
 		if (!c->combine) {
-			error("Bad notes.rewriteMode value: '%s'", v);
+			error(_("Bad notes.rewriteMode value: '%s'"), v);
 			return 1;
 		}
 		return 0;
@@ -346,8 +346,8 @@ static int notes_rewrite_config(const char *k, const char *v, void *cb)
 		if (!prefixcmp(v, "refs/notes/"))
 			string_list_add_refs_by_glob(c->refs, v);
 		else
-			warning("Refusing to rewrite notes in %s"
-				" (outside of refs/notes/)", v);
+			warning(_("Refusing to rewrite notes in %s"
+				" (outside of refs/notes/)"), v);
 		return 0;
 	}
 
@@ -435,13 +435,13 @@ int notes_copy_from_stdin(int force, const char *rewrite_cmd)
 
 		split = strbuf_split(&buf, ' ');
 		if (!split[0] || !split[1])
-			die("Malformed input line: '%s'.", buf.buf);
+			die(_("Malformed input line: '%s'."), buf.buf);
 		strbuf_rtrim(split[0]);
 		strbuf_rtrim(split[1]);
 		if (get_sha1(split[0]->buf, from_obj))
-			die("Failed to resolve '%s' as a valid ref.", split[0]->buf);
+			die(_("Failed to resolve '%s' as a valid ref."), split[0]->buf);
 		if (get_sha1(split[1]->buf, to_obj))
-			die("Failed to resolve '%s' as a valid ref.", split[1]->buf);
+			die(_("Failed to resolve '%s' as a valid ref."), split[1]->buf);
 
 		if (rewrite_cmd)
 			err = copy_note_for_rewrite(c, from_obj, to_obj);
@@ -450,7 +450,7 @@ int notes_copy_from_stdin(int force, const char *rewrite_cmd)
 					combine_notes_overwrite);
 
 		if (err) {
-			error("Failed to copy notes from '%s' to '%s'",
+			error(_("Failed to copy notes from '%s' to '%s'"),
 			      split[0]->buf, split[1]->buf);
 			ret = 1;
 		}
@@ -494,20 +494,20 @@ static int list(int argc, const char **argv, const char *prefix)
 				     git_notes_list_usage, 0);
 
 	if (1 < argc) {
-		error("too many parameters");
+		error(_("too many parameters"));
 		usage_with_options(git_notes_list_usage, options);
 	}
 
 	t = init_notes_check("list");
 	if (argc) {
 		if (get_sha1(argv[0], object))
-			die("Failed to resolve '%s' as a valid ref.", argv[0]);
+			die(_("Failed to resolve '%s' as a valid ref."), argv[0]);
 		note = get_note(t, object);
 		if (note) {
 			puts(sha1_to_hex(note));
 			retval = 0;
 		} else
-			retval = error("No note found for object %s.",
+			retval = error(_("No note found for object %s."),
 				       sha1_to_hex(object));
 	} else
 		retval = for_each_note(t, 0, list_each_note, NULL);
@@ -546,26 +546,26 @@ static int add(int argc, const char **argv, const char *prefix)
 			     0);
 
 	if (1 < argc) {
-		error("too many parameters");
+		error(_("too many parameters"));
 		usage_with_options(git_notes_add_usage, options);
 	}
 
 	object_ref = argc ? argv[0] : "HEAD";
 
 	if (get_sha1(object_ref, object))
-		die("Failed to resolve '%s' as a valid ref.", object_ref);
+		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
 	t = init_notes_check("add");
 	note = get_note(t, object);
 
 	if (note) {
 		if (!force) {
-			retval = error("Cannot add notes. Found existing notes "
+			retval = error(_("Cannot add notes. Found existing notes "
 				       "for object %s. Use '-f' to overwrite "
-				       "existing notes", sha1_to_hex(object));
+				       "existing notes"), sha1_to_hex(object));
 			goto out;
 		}
-		fprintf(stderr, "Overwriting existing notes for object %s\n",
+		fprintf(stderr, _("Overwriting existing notes for object %s\n"),
 			sha1_to_hex(object));
 	}
 
@@ -607,7 +607,7 @@ static int copy(int argc, const char **argv, const char *prefix)
 
 	if (from_stdin || rewrite_cmd) {
 		if (argc) {
-			error("too many parameters");
+			error(_("too many parameters"));
 			usage_with_options(git_notes_copy_usage, options);
 		} else {
 			return notes_copy_from_stdin(force, rewrite_cmd);
@@ -615,41 +615,41 @@ static int copy(int argc, const char **argv, const char *prefix)
 	}
 
 	if (argc < 2) {
-		error("too few parameters");
+		error(_("too few parameters"));
 		usage_with_options(git_notes_copy_usage, options);
 	}
 	if (2 < argc) {
-		error("too many parameters");
+		error(_("too many parameters"));
 		usage_with_options(git_notes_copy_usage, options);
 	}
 
 	if (get_sha1(argv[0], from_obj))
-		die("Failed to resolve '%s' as a valid ref.", argv[0]);
+		die(_("Failed to resolve '%s' as a valid ref."), argv[0]);
 
 	object_ref = 1 < argc ? argv[1] : "HEAD";
 
 	if (get_sha1(object_ref, object))
-		die("Failed to resolve '%s' as a valid ref.", object_ref);
+		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
 	t = init_notes_check("copy");
 	note = get_note(t, object);
 
 	if (note) {
 		if (!force) {
-			retval = error("Cannot copy notes. Found existing "
+			retval = error(_("Cannot copy notes. Found existing "
 				       "notes for object %s. Use '-f' to "
-				       "overwrite existing notes",
+				       "overwrite existing notes"),
 				       sha1_to_hex(object));
 			goto out;
 		}
-		fprintf(stderr, "Overwriting existing notes for object %s\n",
+		fprintf(stderr, _("Overwriting existing notes for object %s\n"),
 			sha1_to_hex(object));
 	}
 
 	from_note = get_note(t, from_obj);
 	if (!from_note) {
-		retval = error("Missing notes on source object %s. Cannot "
-			       "copy.", sha1_to_hex(from_obj));
+		retval = error(_("Missing notes on source object %s. Cannot "
+			       "copy."), sha1_to_hex(from_obj));
 		goto out;
 	}
 
@@ -691,19 +691,19 @@ static int append_edit(int argc, const char **argv, const char *prefix)
 			     PARSE_OPT_KEEP_ARGV0);
 
 	if (2 < argc) {
-		error("too many parameters");
+		error(_("too many parameters"));
 		usage_with_options(usage, options);
 	}
 
 	if (msg.given && edit)
-		fprintf(stderr, "The -m/-F/-c/-C options have been deprecated "
+		fprintf(stderr, _("The -m/-F/-c/-C options have been deprecated "
 			"for the 'edit' subcommand.\n"
-			"Please use 'git notes add -f -m/-F/-c/-C' instead.\n");
+			"Please use 'git notes add -f -m/-F/-c/-C' instead.\n"));
 
 	object_ref = 1 < argc ? argv[1] : "HEAD";
 
 	if (get_sha1(object_ref, object))
-		die("Failed to resolve '%s' as a valid ref.", object_ref);
+		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
 	t = init_notes_check(argv[0]);
 	note = get_note(t, object);
@@ -738,20 +738,20 @@ static int show(int argc, const char **argv, const char *prefix)
 			     0);
 
 	if (1 < argc) {
-		error("too many parameters");
+		error(_("too many parameters"));
 		usage_with_options(git_notes_show_usage, options);
 	}
 
 	object_ref = argc ? argv[0] : "HEAD";
 
 	if (get_sha1(object_ref, object))
-		die("Failed to resolve '%s' as a valid ref.", object_ref);
+		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
 	t = init_notes_check("show");
 	note = get_note(t, object);
 
 	if (!note)
-		retval = error("No note found for object %s.",
+		retval = error(_("No note found for object %s."),
 			       sha1_to_hex(object));
 	else {
 		const char *show_args[3] = {"show", sha1_to_hex(note), NULL};
@@ -774,18 +774,18 @@ static int remove_cmd(int argc, const char **argv, const char *prefix)
 			     git_notes_remove_usage, 0);
 
 	if (1 < argc) {
-		error("too many parameters");
+		error(_("too many parameters"));
 		usage_with_options(git_notes_remove_usage, options);
 	}
 
 	object_ref = argc ? argv[0] : "HEAD";
 
 	if (get_sha1(object_ref, object))
-		die("Failed to resolve '%s' as a valid ref.", object_ref);
+		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
 	t = init_notes_check("remove");
 
-	fprintf(stderr, "Removing note for object %s\n", sha1_to_hex(object));
+	fprintf(stderr, _("Removing note for object %s\n"), sha1_to_hex(object));
 	remove_note(t, object);
 
 	commit_notes(t, "Notes removed by 'git notes remove'");
@@ -808,7 +808,7 @@ static int prune(int argc, const char **argv, const char *prefix)
 			     0);
 
 	if (argc) {
-		error("too many parameters");
+		error(_("too many parameters"));
 		usage_with_options(git_notes_prune_usage, options);
 	}
 
@@ -864,7 +864,7 @@ int cmd_notes(int argc, const char **argv, const char *prefix)
 	else if (!strcmp(argv[0], "prune"))
 		result = prune(argc, argv, prefix);
 	else {
-		result = error("Unknown subcommand: %s", argv[0]);
+		result = error(_("Unknown subcommand: %s"), argv[0]);
 		usage_with_options(git_notes_usage, options);
 	}
 
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 09/15] gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (17 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 08/15] gettextize: git-notes basic commands Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 10/15] gettextize: git-notes "Refusing to %s notes in %s" message Ævar Arnfjörð Bjarmason
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Use sprintf format for the error message that's displayed if
GIT_NOTES_REWRITE_MODE is invalid, and leave a note in a TRANSLATORS
comment indicating what the message means.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/notes.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/builtin/notes.c b/builtin/notes.c
index d171f6f..fe58a41 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -371,8 +371,10 @@ struct notes_rewrite_cfg *init_copy_notes_for_rewrite(const char *cmd)
 		c->mode_from_env = 1;
 		c->combine = parse_combine_notes_fn(rewrite_mode_env);
 		if (!c->combine)
-			error("Bad " GIT_NOTES_REWRITE_MODE_ENVIRONMENT
-			      " value: '%s'", rewrite_mode_env);
+			/* TRANSLATORS: The first %s is the name of the
+			   environment variable, the second %s is its value */
+			error(_("Bad %s value: '%s'"), GIT_NOTES_REWRITE_MODE_ENVIRONMENT,
+					rewrite_mode_env);
 	}
 	if (rewrite_refs_env) {
 		c->refs_from_env = 1;
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 10/15] gettextize: git-notes "Refusing to %s notes in %s" message
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (18 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 09/15] gettextize: git-notes GIT_NOTES_REWRITE_MODE error message Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 11/15] gettextize: git-revert basic messages Ævar Arnfjörð Bjarmason
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

The first %s in "Refusing to %s notes in %s" is one of "git notes
ACTION". So we need to mark those actions for translation and later
use _().

Also add a TRANSLATORS comment explaining to translators what the
first %s means.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/notes.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/builtin/notes.c b/builtin/notes.c
index fe58a41..2b417d7 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -476,8 +476,10 @@ static struct notes_tree *init_notes_check(const char *subcommand)
 	t = &default_notes_tree;
 
 	if (prefixcmp(t->ref, "refs/notes/"))
-		die("Refusing to %s notes in %s (outside of refs/notes/)",
-		    subcommand, t->ref);
+		/* TRANSLATORS: The first %s is one of "git notes ACTION",
+		   e.g. "add", "copy", "append" etc. */
+		die(_("Refusing to %s notes in %s (outside of refs/notes/)"),
+		    _(subcommand), t->ref);
 	return t;
 }
 
@@ -500,7 +502,7 @@ static int list(int argc, const char **argv, const char *prefix)
 		usage_with_options(git_notes_list_usage, options);
 	}
 
-	t = init_notes_check("list");
+	t = init_notes_check(N_("list"));
 	if (argc) {
 		if (get_sha1(argv[0], object))
 			die(_("Failed to resolve '%s' as a valid ref."), argv[0]);
@@ -557,7 +559,7 @@ static int add(int argc, const char **argv, const char *prefix)
 	if (get_sha1(object_ref, object))
 		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
-	t = init_notes_check("add");
+	t = init_notes_check(N_("add"));
 	note = get_note(t, object);
 
 	if (note) {
@@ -633,7 +635,7 @@ static int copy(int argc, const char **argv, const char *prefix)
 	if (get_sha1(object_ref, object))
 		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
-	t = init_notes_check("copy");
+	t = init_notes_check(N_("copy"));
 	note = get_note(t, object);
 
 	if (note) {
@@ -749,7 +751,7 @@ static int show(int argc, const char **argv, const char *prefix)
 	if (get_sha1(object_ref, object))
 		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
-	t = init_notes_check("show");
+	t = init_notes_check(N_("show"));
 	note = get_note(t, object);
 
 	if (!note)
@@ -785,7 +787,7 @@ static int remove_cmd(int argc, const char **argv, const char *prefix)
 	if (get_sha1(object_ref, object))
 		die(_("Failed to resolve '%s' as a valid ref."), object_ref);
 
-	t = init_notes_check("remove");
+	t = init_notes_check(N_("remove"));
 
 	fprintf(stderr, _("Removing note for object %s\n"), sha1_to_hex(object));
 	remove_note(t, object);
@@ -814,7 +816,7 @@ static int prune(int argc, const char **argv, const char *prefix)
 		usage_with_options(git_notes_prune_usage, options);
 	}
 
-	t = init_notes_check("prune");
+	t = init_notes_check(N_("prune"));
 
 	prune_notes(t, (verbose ? NOTES_PRUNE_VERBOSE : 0) |
 		(show_only ? NOTES_PRUNE_VERBOSE|NOTES_PRUNE_DRYRUN : 0) );
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 11/15] gettextize: git-revert basic messages
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (19 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 10/15] gettextize: git-notes "Refusing to %s notes in %s" message Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 12/15] gettextize: git-revert mark the "me" variable for translation Ævar Arnfjörð Bjarmason
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/revert.c |   42 +++++++++++++++++++++---------------------
 1 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/builtin/revert.c b/builtin/revert.c
index 4b47ace..ece0c0f 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -79,7 +79,7 @@ static void parse_args(int argc, const char **argv)
 			OPT_END(),
 		};
 		if (parse_options_concat(options, ARRAY_SIZE(options), cp_extra))
-			die("program error");
+			die(_("program error"));
 	}
 
 	commit_argc = parse_options(argc, argv, NULL, options, usage_str,
@@ -151,7 +151,7 @@ static char *get_encoding(const char *message)
 	const char *p = message, *eol;
 
 	if (!p)
-		die ("Could not read commit message of %s",
+		die (_("Could not read commit message of %s"),
 				sha1_to_hex(commit->object.sha1));
 	while (*p && *p != '\n') {
 		for (eol = p + 1; *eol && *eol != '\n'; eol++)
@@ -185,7 +185,7 @@ static void set_author_ident_env(const char *message)
 {
 	const char *p = message;
 	if (!p)
-		die ("Could not read commit message of %s",
+		die (_("Could not read commit message of %s"),
 				sha1_to_hex(commit->object.sha1));
 	while (*p && *p != '\n') {
 		const char *eol;
@@ -199,7 +199,7 @@ static void set_author_ident_env(const char *message)
 			line = xmemdupz(p, eol - p);
 			email = strchr(line, '<');
 			if (!email)
-				die ("Could not extract author email from %s",
+				die (_("Could not extract author email from %s"),
 					sha1_to_hex(commit->object.sha1));
 			if (email == line)
 				pend = line;
@@ -211,7 +211,7 @@ static void set_author_ident_env(const char *message)
 			email++;
 			timestamp = strchr(email, '>');
 			if (!timestamp)
-				die ("Could not extract author time from %s",
+				die (_("Could not extract author time from %s"),
 					sha1_to_hex(commit->object.sha1));
 			*timestamp = '\0';
 			for (timestamp++; *timestamp && isspace(*timestamp);
@@ -227,7 +227,7 @@ static void set_author_ident_env(const char *message)
 		if (*p == '\n')
 			p++;
 	}
-	die ("No author information found in %s",
+	die (_("No author information found in %s"),
 			sha1_to_hex(commit->object.sha1));
 }
 
@@ -264,10 +264,10 @@ static void write_message(struct strbuf *msgbuf, const char *filename)
 	int msg_fd = hold_lock_file_for_update(&msg_file, filename,
 					       LOCK_DIE_ON_ERROR);
 	if (write_in_full(msg_fd, msgbuf->buf, msgbuf->len) < 0)
-		die_errno("Could not write to %s.", filename);
+		die_errno(_("Could not write to %s."), filename);
 	strbuf_release(msgbuf);
 	if (commit_lock_file(&msg_file) < 0)
-		die("Error wrapping up %s", filename);
+		die(_("Error wrapping up %s"), filename);
 }
 
 static struct tree *empty_tree(void)
@@ -405,10 +405,10 @@ static int do_pick_commit(void)
 		 * to work on.
 		 */
 		if (write_cache_as_tree(head, 0, NULL))
-			die ("Your index file is unmerged.");
+			die (_("Your index file is unmerged."));
 	} else {
 		if (get_sha1("HEAD", head))
-			die ("You do not have a valid HEAD");
+			die (_("You do not have a valid HEAD"));
 		if (index_differs_from("HEAD", 0))
 			die_dirty_index(me);
 	}
@@ -416,7 +416,7 @@ static int do_pick_commit(void)
 
 	if (!commit->parents) {
 		if (action == REVERT)
-			die ("Cannot revert a root commit");
+			die (_("Cannot revert a root commit"));
 		parent = NULL;
 	}
 	else if (commit->parents->next) {
@@ -425,7 +425,7 @@ static int do_pick_commit(void)
 		struct commit_list *p;
 
 		if (!mainline)
-			die("Commit %s is a merge but no -m option was given.",
+			die(_("Commit %s is a merge but no -m option was given."),
 			    sha1_to_hex(commit->object.sha1));
 
 		for (cnt = 1, p = commit->parents;
@@ -433,11 +433,11 @@ static int do_pick_commit(void)
 		     cnt++)
 			p = p->next;
 		if (cnt != mainline || !p)
-			die("Commit %s does not have parent %d",
+			die(_("Commit %s does not have parent %d"),
 			    sha1_to_hex(commit->object.sha1), mainline);
 		parent = p->item;
 	} else if (0 < mainline)
-		die("Mainline was specified but commit %s is not a merge.",
+		die(_("Mainline was specified but commit %s is not a merge."),
 		    sha1_to_hex(commit->object.sha1));
 	else
 		parent = commit->parents->item;
@@ -450,7 +450,7 @@ static int do_pick_commit(void)
 		    me, sha1_to_hex(parent->object.sha1));
 
 	if (get_message(commit->buffer, &msg) != 0)
-		die("Cannot get commit message for %s",
+		die(_("Cannot get commit message for %s"),
 				sha1_to_hex(commit->object.sha1));
 
 	/*
@@ -541,10 +541,10 @@ static void prepare_revs(struct rev_info *revs)
 		usage(*revert_or_cherry_pick_usage());
 
 	if (prepare_revision_walk(revs))
-		die("revision walk setup failed");
+		die(_("revision walk setup failed"));
 
 	if (!revs->commits)
-		die("empty commit set passed");
+		die(_("empty commit set passed"));
 }
 
 static int revert_or_cherry_pick(int argc, const char **argv)
@@ -558,13 +558,13 @@ static int revert_or_cherry_pick(int argc, const char **argv)
 
 	if (allow_ff) {
 		if (signoff)
-			die("cherry-pick --ff cannot be used with --signoff");
+			die(_("cherry-pick --ff cannot be used with --signoff"));
 		if (no_commit)
-			die("cherry-pick --ff cannot be used with --no-commit");
+			die(_("cherry-pick --ff cannot be used with --no-commit"));
 		if (no_replay)
-			die("cherry-pick --ff cannot be used with -x");
+			die(_("cherry-pick --ff cannot be used with -x"));
 		if (edit)
-			die("cherry-pick --ff cannot be used with --edit");
+			die(_("cherry-pick --ff cannot be used with --edit"));
 	}
 
 	if (read_cache() < 0)
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 12/15] gettextize: git-revert mark the "me" variable for translation
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (20 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 11/15] gettextize: git-revert basic messages Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 18:45   ` Jonathan Nieder
  2010-09-06 12:21 ` [PATCH 13/15] gettextize: git-revert messages using the "me" variable Ævar Arnfjörð Bjarmason
                   ` (2 subsequent siblings)
  24 siblings, 1 reply; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

The "me" variable is used in many later messages to indicate whether
we're using revert or cherry-pick. Mark it for translation for later
use. Also leave a TRANSLATORS message explaining what these are for.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/revert.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/builtin/revert.c b/builtin/revert.c
index ece0c0f..2f319f8 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -552,7 +552,9 @@ static int revert_or_cherry_pick(int argc, const char **argv)
 	struct rev_info revs;
 
 	git_config(git_default_config, NULL);
-	me = action == REVERT ? "revert" : "cherry-pick";
+	/* TRANSLATORS: This is used in several error messages indicating
+	   the name of the current program */
+	me = action == REVERT ? N_("revert") : N_("cherry-pick");
 	setenv(GIT_REFLOG_ACTION, me, 0);
 	parse_args(argc, argv);
 
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 13/15] gettextize: git-revert messages using the "me" variable
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (21 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 12/15] gettextize: git-revert mark the "me" variable for translation Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 18:50   ` Jonathan Nieder
  2010-09-06 12:21 ` [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message Ævar Arnfjörð Bjarmason
  2010-09-06 12:21 ` [PATCH 15/15] gettextize: git-shortlog basic messages Ævar Arnfjörð Bjarmason
  24 siblings, 1 reply; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Mark messages that used the "me" variable for translation. The
potential values of the variable had already been marked using N_(),
so we can use _(me) here.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/revert.c              |   14 +++++++-------
 t/t3501-revert-cherry-pick.sh |    2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/builtin/revert.c b/builtin/revert.c
index 2f319f8..8dff244 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -286,10 +286,10 @@ static NORETURN void die_dirty_index(const char *me)
 		die_resolve_conflict(me);
 	} else {
 		if (advice_commit_before_merge)
-			die("Your local changes would be overwritten by %s.\n"
-			    "Please, commit your changes or stash them to proceed.", me);
+			die(_("Your local changes would be overwritten by %s.\n"
+			    "Please, commit your changes or stash them to proceed."), _(me));
 		else
-			die("Your local changes would be overwritten by %s.\n", me);
+			die(_("Your local changes would be overwritten by %s.\n"), _(me));
 	}
 }
 
@@ -339,7 +339,7 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
 	if (active_cache_changed &&
 	    (write_cache(index_fd, active_cache, active_nr) ||
 	     commit_locked_index(&index_lock)))
-		die("%s: Unable to write new index file", me);
+		die(_("%s: Unable to write new index file"), _(me));
 	rollback_lock_file(&index_lock);
 
 	if (!clean) {
@@ -446,8 +446,8 @@ static int do_pick_commit(void)
 		return fast_forward_to(commit->object.sha1, head);
 
 	if (parent && parse_commit(parent) < 0)
-		die("%s: cannot parse parent commit %s",
-		    me, sha1_to_hex(parent->object.sha1));
+		die(_("%s: cannot parse parent commit %s"),
+		    _(me), sha1_to_hex(parent->object.sha1));
 
 	if (get_message(commit->buffer, &msg) != 0)
 		die(_("Cannot get commit message for %s"),
@@ -570,7 +570,7 @@ static int revert_or_cherry_pick(int argc, const char **argv)
 	}
 
 	if (read_cache() < 0)
-		die("git %s: failed to read the index", me);
+		die(_("git %s: failed to read the index"), _(me));
 
 	prepare_revs(&revs);
 
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index bc7aedd..b12b1b4 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -81,7 +81,7 @@ test_expect_success 'revert after renaming branch' '
 
 '
 
-test_expect_success 'revert forbidden on dirty working tree' '
+test_expect_success NO_GETTEXT_POISON 'revert forbidden on dirty working tree' '
 
 	echo content >extra_file &&
 	git add extra_file &&
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (22 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 13/15] gettextize: git-revert messages using the "me" variable Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 18:55   ` Jonathan Nieder
  2010-09-06 12:21 ` [PATCH 15/15] gettextize: git-shortlog basic messages Ævar Arnfjörð Bjarmason
  24 siblings, 1 reply; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Split up the "could not %s %s... %s" message into "could not revert
%s... %s" and "could not apply %s... %s". This makes it easier for
translators to understand the message.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/revert.c                |    5 +++--
 t/t3507-cherry-pick-conflict.sh |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/builtin/revert.c b/builtin/revert.c
index 8dff244..7157ee1 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -510,8 +510,9 @@ static int do_pick_commit(void)
 	}
 
 	if (res) {
-		error("could not %s %s... %s",
-		      action == REVERT ? "revert" : "apply",
+		error(action == REVERT
+		      ? _("could not revert %s... %s")
+		      : _("could not apply %s... %s"),
 		      find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV),
 		      msg.subject);
 		print_advice();
diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh
index 607bf25..bf664ec 100755
--- a/t/t3507-cherry-pick-conflict.sh
+++ b/t/t3507-cherry-pick-conflict.sh
@@ -38,7 +38,7 @@ test_expect_success 'failed cherry-pick does not advance HEAD' '
 	test "$head" = "$newhead"
 '
 
-test_expect_success 'advice from failed cherry-pick' "
+test_expect_success NO_GETTEXT_POISON 'advice from failed cherry-pick' "
 	git checkout -f initial^0 &&
 	git read-tree -u --reset HEAD &&
 	git clean -d -f -f -q -x &&
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* [PATCH 15/15] gettextize: git-shortlog basic messages
  2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (23 preceding siblings ...)
  2010-09-06 12:21 ` [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message Ævar Arnfjörð Bjarmason
@ 2010-09-06 12:21 ` Ævar Arnfjörð Bjarmason
  2010-09-06 18:41   ` Jonathan Nieder
  24 siblings, 1 reply; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 12:21 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Ævar Arnfjörð Bjarmason

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/shortlog.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 2135b0d..f2cfe97 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -158,7 +158,7 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
 		buffer = eol;
 	}
 	if (!author)
-		die("Missing author: %s",
+		die(_("Missing author: %s"),
 		    sha1_to_hex(commit->object.sha1));
 	if (log->user_format) {
 		struct pretty_print_context ctx = {0};
@@ -181,7 +181,7 @@ static void get_from_rev(struct rev_info *rev, struct shortlog *log)
 	struct commit *commit;
 
 	if (prepare_revision_walk(rev))
-		die("revision walk setup failed");
+		die(_("revision walk setup failed"));
 	while ((commit = get_revision(rev)) != NULL)
 		shortlog_add_commit(log, commit);
 }
@@ -284,7 +284,7 @@ parse_done:
 	argc = parse_options_end(&ctx);
 
 	if (setup_revisions(argc, argv, &rev, NULL) != 1) {
-		error("unrecognized argument: %s", argv[1]);
+		error(_("unrecognized argument: %s"), argv[1]);
 		usage_with_options(shortlog_usage, options);
 	}
 
@@ -296,7 +296,7 @@ parse_done:
 		add_head_to_pending(&rev);
 	if (rev.pending.nr == 0) {
 		if (isatty(0))
-			fprintf(stderr, "(reading log message from standard input)\n");
+			fprintf(stderr, _("(reading log message from standard input)\n"));
 		read_from_stdin(&log);
 	}
 	else
-- 
1.7.2.3.313.gcd15

^ permalink raw reply related	[flat|nested] 39+ messages in thread

* Re: [PATCH 15/15] gettextize: git-shortlog basic messages
  2010-09-06 12:21 ` [PATCH 15/15] gettextize: git-shortlog basic messages Ævar Arnfjörð Bjarmason
@ 2010-09-06 18:41   ` Jonathan Nieder
  0 siblings, 0 replies; 39+ messages in thread
From: Jonathan Nieder @ 2010-09-06 18:41 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra

Ævar Arnfjörð Bjarmason wrote:

> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>

For what it's worth:

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 12/15] gettextize: git-revert mark the "me" variable for translation
  2010-09-06 12:21 ` [PATCH 12/15] gettextize: git-revert mark the "me" variable for translation Ævar Arnfjörð Bjarmason
@ 2010-09-06 18:45   ` Jonathan Nieder
  2010-09-06 20:06     ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 39+ messages in thread
From: Jonathan Nieder @ 2010-09-06 18:45 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra

Ævar Arnfjörð Bjarmason wrote:

> The "me" variable is used in many later messages to indicate whether
> we're using revert or cherry-pick.

What good does it do to translate it?  The command name is the same
even in Hindi git.

> --- a/builtin/revert.c
> +++ b/builtin/revert.c
> @@ -552,7 +552,9 @@ static int revert_or_cherry_pick(int argc, const char **argv)
>  	struct rev_info revs;
>  
>  	git_config(git_default_config, NULL);
> -	me = action == REVERT ? "revert" : "cherry-pick";
> +	/* TRANSLATORS: This is used in several error messages indicating
> +	   the name of the current program */
> +	me = action == REVERT ? N_("revert") : N_("cherry-pick");
>  	setenv(GIT_REFLOG_ACTION, me, 0);

Unrelated question: Are reflog actions supposed to be translated?  (I
have not thought about that carefully.)

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 13/15] gettextize: git-revert messages using the "me" variable
  2010-09-06 12:21 ` [PATCH 13/15] gettextize: git-revert messages using the "me" variable Ævar Arnfjörð Bjarmason
@ 2010-09-06 18:50   ` Jonathan Nieder
  2010-09-06 20:12     ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 39+ messages in thread
From: Jonathan Nieder @ 2010-09-06 18:50 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Christian Couder

(+cc: Christian, de facto cherry-pick maintainer)

Ævar Arnfjörð Bjarmason wrote:

> Mark messages that used the "me" variable for translation. The
> potential values of the variable had already been marked using N_(),
> so we can use _(me) here.

Ah, now I understand better.  Would it be possible to squash this
patch with the previous one (for clarity)?

> --- a/builtin/revert.c
> +++ b/builtin/revert.c
> @@ -286,10 +286,10 @@ static NORETURN void die_dirty_index(const char *me)
>  		die_resolve_conflict(me);
>  	} else {
>  		if (advice_commit_before_merge)
> -			die("Your local changes would be overwritten by %s.\n"
> -			    "Please, commit your changes or stash them to proceed.", me);
> +			die(_("Your local changes would be overwritten by %s.\n"
> +			    "Please, commit your changes or stash them to proceed."), _(me));
>  		else
> -			die("Your local changes would be overwritten by %s.\n", me);
> +			die(_("Your local changes would be overwritten by %s.\n"), _(me));

Good.

> @@ -339,7 +339,7 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
>  	if (active_cache_changed &&
>  	    (write_cache(index_fd, active_cache, active_nr) ||
>  	     commit_locked_index(&index_lock)))
> -		die("%s: Unable to write new index file", me);
> +		die(_("%s: Unable to write new index file"), _(me));

Not good, in my opinion.  The dialogue ought to look like this, I think:

 $ git cherry-pick astermay
 ...
 fatal: cherry-pick: Unableway otay itewray ewnay indexway ilefay

> @@ -446,8 +446,8 @@ static int do_pick_commit(void)
>  		return fast_forward_to(commit->object.sha1, head);
>  
>  	if (parent && parse_commit(parent) < 0)
> -		die("%s: cannot parse parent commit %s",
> -		    me, sha1_to_hex(parent->object.sha1));
> +		die(_("%s: cannot parse parent commit %s"),
> +		    _(me), sha1_to_hex(parent->object.sha1));

Likewise.

> @@ -570,7 +570,7 @@ static int revert_or_cherry_pick(int argc, const char **argv)
>  	}
>  
>  	if (read_cache() < 0)
> -		die("git %s: failed to read the index", me);
> +		die(_("git %s: failed to read the index"), _(me));

Likewise.

With the exceptions mentioned above,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message
  2010-09-06 12:21 ` [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message Ævar Arnfjörð Bjarmason
@ 2010-09-06 18:55   ` Jonathan Nieder
  2010-09-06 20:25     ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 39+ messages in thread
From: Jonathan Nieder @ 2010-09-06 18:55 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra

(+cc: Christian)

Ævar Arnfjörð Bjarmason wrote:

> Split up the "could not %s %s... %s" message into "could not revert
> %s... %s" and "could not apply %s... %s". This makes it easier for
> translators to understand the message.

Right, parts of speech can be a pain.  So:
Acked-by: Jonathan Nieder <jrnieder@gmail.com>

> --- a/t/t3507-cherry-pick-conflict.sh
> +++ b/t/t3507-cherry-pick-conflict.sh
> @@ -38,7 +38,7 @@ test_expect_success 'failed cherry-pick does not advance HEAD' '
>  	test "$head" = "$newhead"
>  '
>  
> -test_expect_success 'advice from failed cherry-pick' "
> +test_expect_success NO_GETTEXT_POISON 'advice from failed cherry-pick' "

An idea (it may or may not be a good one ;-)): what if we made the gettext
poison into an automatically generated .po file?  Then testing poison
would be a special case of running tests with an arbitrary locale:

 $ TEST_LANGUAGE=poison prove t[0-9]*.sh

and this test prerequisite could be more intuitively named LOCALE_C or
similar.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 12/15] gettextize: git-revert mark the "me" variable for translation
  2010-09-06 18:45   ` Jonathan Nieder
@ 2010-09-06 20:06     ` Ævar Arnfjörð Bjarmason
  2010-09-06 20:08       ` Jonathan Nieder
  0 siblings, 1 reply; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 20:06 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra

On Mon, Sep 6, 2010 at 18:45, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Ævar Arnfjörð Bjarmason wrote:
>
>> The "me" variable is used in many later messages to indicate whether
>> we're using revert or cherry-pick.
>
> What good does it do to translate it?  The command name is the same
> even in Hindi git.

Not all uses of it are references to git-%s, e.g. in the next patch:

    die(_("Your local changes would be overwritten by %s.\n"), _(me));

But maybe it's used in enough contexts for it to be useless to
translate it like this, i.e. we'll have to fix it later, but we'll see
about that.

>> --- a/builtin/revert.c
>> +++ b/builtin/revert.c
>> @@ -552,7 +552,9 @@ static int revert_or_cherry_pick(int argc, const char **argv)
>>       struct rev_info revs;
>>
>>       git_config(git_default_config, NULL);
>> -     me = action == REVERT ? "revert" : "cherry-pick";
>> +     /* TRANSLATORS: This is used in several error messages indicating
>> +        the name of the current program */
>> +     me = action == REVERT ? N_("revert") : N_("cherry-pick");
>>       setenv(GIT_REFLOG_ACTION, me, 0);
>
> Unrelated question: Are reflog actions supposed to be translated?  (I
> have not thought about that carefully.)

In this updated series I've explicitly reverted patches that
(accidentally) translated some of the reflog.

I'm only translating things which'll be viewed by human eyes, and
human eyes alone. That doesn't apply to the reflog, which I see as
plumbing.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 12/15] gettextize: git-revert mark the "me" variable for translation
  2010-09-06 20:06     ` Ævar Arnfjörð Bjarmason
@ 2010-09-06 20:08       ` Jonathan Nieder
  0 siblings, 0 replies; 39+ messages in thread
From: Jonathan Nieder @ 2010-09-06 20:08 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra

Ævar Arnfjörð Bjarmason wrote:
> On Mon, Sep 6, 2010 at 18:45, Jonathan Nieder <jrnieder@gmail.com> wrote:

>> What good does it do to translate it?  The command name is the same
>> even in Hindi git.
>
> Not all uses of it are references to git-%s, e.g. in the next patch:

Right, forget about this comment.  Maybe this patch should be squashed
with the next one so reviewers can more easily see what is going on.

> In this updated series I've explicitly reverted patches that
> (accidentally) translated some of the reflog.
> 
> I'm only translating things which'll be viewed by human eyes, and
> human eyes alone. That doesn't apply to the reflog, which I see as
> plumbing.

Thanks for explaining.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 13/15] gettextize: git-revert messages using the "me" variable
  2010-09-06 18:50   ` Jonathan Nieder
@ 2010-09-06 20:12     ` Ævar Arnfjörð Bjarmason
  2010-09-07  5:39       ` Jonathan Nieder
  0 siblings, 1 reply; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 20:12 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Christian Couder

On Mon, Sep 6, 2010 at 18:50, Jonathan Nieder <jrnieder@gmail.com> wrote:
> (+cc: Christian, de facto cherry-pick maintainer)

Thanks. In most cases I haven't been CC-ing people,

a) because I'd probably end up CC-ing everyone who ever touched git

b) the nature of the changes probalby doesn't especially benefit from
   me bothering all these people. But maybe that's the wrong assumption.

But by all means add more people to the CC :)

> Ævar Arnfjörð Bjarmason wrote:
>
>> Mark messages that used the "me" variable for translation. The
>> potential values of the variable had already been marked using N_(),
>> so we can use _(me) here.
>
> Ah, now I understand better.  Would it be possible to squash this
> patch with the previous one (for clarity)?

And now I see the reply I just sent off was useless, oh well, that's
what I get for reading things sequentially :)

Sure, it can be squashed. I'm just trying to keep things as granular
as possible, but maybe I'm overshooting it in some cases.

>> --- a/builtin/revert.c
>> +++ b/builtin/revert.c
>> @@ -286,10 +286,10 @@ static NORETURN void die_dirty_index(const char *me)
>>               die_resolve_conflict(me);
>>       } else {
>>               if (advice_commit_before_merge)
>> -                     die("Your local changes would be overwritten by %s.\n"
>> -                         "Please, commit your changes or stash them to proceed.", me);
>> +                     die(_("Your local changes would be overwritten by %s.\n"
>> +                         "Please, commit your changes or stash them to proceed."), _(me));
>>               else
>> -                     die("Your local changes would be overwritten by %s.\n", me);
>> +                     die(_("Your local changes would be overwritten by %s.\n"), _(me));
>
> Good.
>
>> @@ -339,7 +339,7 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
>>       if (active_cache_changed &&
>>           (write_cache(index_fd, active_cache, active_nr) ||
>>            commit_locked_index(&index_lock)))
>> -             die("%s: Unable to write new index file", me);
>> +             die(_("%s: Unable to write new index file"), _(me));
>
> Not good, in my opinion.  The dialogue ought to look like this, I think:
>
>  $ git cherry-pick astermay
>  ...
>  fatal: cherry-pick: Unableway otay itewray ewnay indexway ilefay
>
>> @@ -446,8 +446,8 @@ static int do_pick_commit(void)
>>               return fast_forward_to(commit->object.sha1, head);
>>
>>       if (parent && parse_commit(parent) < 0)
>> -             die("%s: cannot parse parent commit %s",
>> -                 me, sha1_to_hex(parent->object.sha1));
>> +             die(_("%s: cannot parse parent commit %s"),
>> +                 _(me), sha1_to_hex(parent->object.sha1));
>
> Likewise.
>
>> @@ -570,7 +570,7 @@ static int revert_or_cherry_pick(int argc, const char **argv)
>>       }
>>
>>       if (read_cache() < 0)
>> -             die("git %s: failed to read the index", me);
>> +             die(_("git %s: failed to read the index"), _(me));
>
> Likewise.

I don't know if all of the above hold true, e.g. because some
languages will always transliterate things, even proper nouns.

But as mentioned before the string is probably being used in too many
different contexts for it to be useful to them.

> With the exceptions mentioned above,

So I should probably just skip translating the "me" variable for now. I.e.
this and the last patch can probably be dropped.

> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message
  2010-09-06 18:55   ` Jonathan Nieder
@ 2010-09-06 20:25     ` Ævar Arnfjörð Bjarmason
  2010-09-07  5:34       ` Jonathan Nieder
  0 siblings, 1 reply; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-06 20:25 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra

On Mon, Sep 6, 2010 at 18:55, Jonathan Nieder <jrnieder@gmail.com> wrote:
> (+cc: Christian)
>
> Ævar Arnfjörð Bjarmason wrote:
>
>> Split up the "could not %s %s... %s" message into "could not revert
>> %s... %s" and "could not apply %s... %s". This makes it easier for
>> translators to understand the message.
>
> Right, parts of speech can be a pain.  So:
> Acked-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.

>> --- a/t/t3507-cherry-pick-conflict.sh
>> +++ b/t/t3507-cherry-pick-conflict.sh
>> @@ -38,7 +38,7 @@ test_expect_success 'failed cherry-pick does not advance HEAD' '
>>       test "$head" = "$newhead"
>>  '
>>
>> -test_expect_success 'advice from failed cherry-pick' "
>> +test_expect_success NO_GETTEXT_POISON 'advice from failed cherry-pick' "
>
> An idea (it may or may not be a good one ;-)): what if we made the gettext
> poison into an automatically generated .po file?  Then testing poison
> would be a special case of running tests with an arbitrary locale:
>
>  $ TEST_LANGUAGE=poison prove t[0-9]*.sh
>
> and this test prerequisite could be more intuitively named LOCALE_C or
> similar.

The issue with that is that gettext depends on setlocale(), which
requires a *valid* locale. This is why I skip the t/lib-gettext.sh
tests unless `locale -a` says is_IS is there, because even if we
compile is.po using it won't work without the locale.

So to do this we'd have steal some locale.

Also, the set of tests we want to skip under POISON (i.e. automated
garbage) is slightly different from the tests we want to skip under
TEST_LOCALE=, because some of those tests are checking for the %s in
"file failed: %s". So they'll fail under POISON, but shouldn't fail
under any translation.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message
  2010-09-06 20:25     ` Ævar Arnfjörð Bjarmason
@ 2010-09-07  5:34       ` Jonathan Nieder
  2010-09-07  8:47         ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 39+ messages in thread
From: Jonathan Nieder @ 2010-09-07  5:34 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra

Ævar Arnfjörð Bjarmason wrote:

> to do this we'd have steal some locale.

Alas.  Thanks for explaining.

> Also, the set of tests we want to skip under POISON (i.e. automated
> garbage) is slightly different from the tests we want to skip under
> TEST_LOCALE=, because some of those tests are checking for the %s in
> "file failed: %s". So they'll fail under POISON, but shouldn't fail
> under any translation.

This could be fixable in the long term, no?  e.g., under POISON we
could have something like

 _ () {
	 perl -pe 's/(?<!%)[^%#]*/POISON/g'
 }

to preserve commit message comments and % directives.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 13/15] gettextize: git-revert messages using the "me" variable
  2010-09-06 20:12     ` Ævar Arnfjörð Bjarmason
@ 2010-09-07  5:39       ` Jonathan Nieder
  2010-09-07  8:51         ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 39+ messages in thread
From: Jonathan Nieder @ 2010-09-07  5:39 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Christian Couder

Ævar Arnfjörð Bjarmason wrote:
> On Mon, Sep 6, 2010 at 18:50, Jonathan Nieder <jrnieder@gmail.com> wrote:

>> Not good, in my opinion.  The dialogue ought to look like this, I think:
>>
>>  $ git cherry-pick astermay
>>  ...
>>  fatal: cherry-pick: Unableway otay itewray ewnay indexway ilefay
[...]
> I don't know if all of the above hold true, e.g. because some
> languages will always transliterate things, even proper nouns.
>
> But as mentioned before the string is probably being used in too many
> different contexts for it to be useful to them.

Hmm, okay.  Do you mean languages like Japanese or something else?  At
any rate, I guess you are right that this is too complicated for the
moment.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message
  2010-09-07  5:34       ` Jonathan Nieder
@ 2010-09-07  8:47         ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07  8:47 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra

On Tue, Sep 7, 2010 at 05:34, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Ævar Arnfjörð Bjarmason wrote:
>
>> to do this we'd have steal some locale.
>
> Alas.  Thanks for explaining.
>
>> Also, the set of tests we want to skip under POISON (i.e. automated
>> garbage) is slightly different from the tests we want to skip under
>> TEST_LOCALE=, because some of those tests are checking for the %s in
>> "file failed: %s". So they'll fail under POISON, but shouldn't fail
>> under any translation.
>
> This could be fixable in the long term, no?  e.g., under POISON we
> could have something like
>
>  _ () {
>         perl -pe 's/(?<!%)[^%#]*/POISON/g'
>  }
>
> to preserve commit message comments and % directives.

Yeah, but rather than do fancy stuff like that in C I just made a dumb
implementation.

It's far easier to just skip a few more tests than it is to come up
with your own parser that avoids printf directives but still poisons
the message enough that e.g. <grep "Clone" ..> won't work anymore.

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 13/15] gettextize: git-revert messages using the "me" variable
  2010-09-07  5:39       ` Jonathan Nieder
@ 2010-09-07  8:51         ` Ævar Arnfjörð Bjarmason
  2010-09-10  0:26           ` Junio C Hamano
  0 siblings, 1 reply; 39+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07  8:51 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: git, Junio C Hamano, Jan Krüger, Ramkumar Ramachandra,
	Christian Couder

On Tue, Sep 7, 2010 at 05:39, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Ævar Arnfjörð Bjarmason wrote:
>> On Mon, Sep 6, 2010 at 18:50, Jonathan Nieder <jrnieder@gmail.com> wrote:
>
>>> Not good, in my opinion.  The dialogue ought to look like this, I think:
>>>
>>>  $ git cherry-pick astermay
>>>  ...
>>>  fatal: cherry-pick: Unableway otay itewray ewnay indexway ilefay
> [...]
>> I don't know if all of the above hold true, e.g. because some
>> languages will always transliterate things, even proper nouns.
>>
>> But as mentioned before the string is probably being used in too many
>> different contexts for it to be useful to them.
>
> Hmm, okay.  Do you mean languages like Japanese or something else?  At
> any rate, I guess you are right that this is too complicated for the
> moment.

The languages here that translate "Wikipedia" differently than
"Wikipedia" are a pretty good indicator:

    http://meta.wikimedia.org/wiki/User:Waldir/Logos_and_slogans

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: [PATCH 13/15] gettextize: git-revert messages using the "me" variable
  2010-09-07  8:51         ` Ævar Arnfjörð Bjarmason
@ 2010-09-10  0:26           ` Junio C Hamano
  0 siblings, 0 replies; 39+ messages in thread
From: Junio C Hamano @ 2010-09-10  0:26 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: Jonathan Nieder, git, Jan Krüger, Ramkumar Ramachandra,
	Christian Couder

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> On Tue, Sep 7, 2010 at 05:39, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> Ævar Arnfjörð Bjarmason wrote:
>>> On Mon, Sep 6, 2010 at 18:50, Jonathan Nieder <jrnieder@gmail.com> wrote:
>>
>>>> Not good, in my opinion.  The dialogue ought to look like this, I think:
>>>>
>>>>  $ git cherry-pick astermay
>>>>  ...
>>>>  fatal: cherry-pick: Unableway otay itewray ewnay indexway ilefay
>> [...]
>>> I don't know if all of the above hold true, e.g. because some
>>> languages will always transliterate things, even proper nouns.
>>>
>>> But as mentioned before the string is probably being used in too many
>>> different contexts for it to be useful to them.
>>
>> Hmm, okay.  Do you mean languages like Japanese or something else?  At
>> any rate, I guess you are right that this is too complicated for the
>> moment.
>
> The languages here that translate "Wikipedia" differently than
> "Wikipedia" are a pretty good indicator:
>
>     http://meta.wikimedia.org/wiki/User:Waldir/Logos_and_slogans

I don't think so, unless you are translating the git subcommand names.

If your translated git lets/forces you to say

  $  git ckcherry-piay astermay

then that is a different story.  It might be very reasonable to translate
the "fatal:" message to

    alfatay: ckcherry-piay: Unableway otay itewray ewnay indexway ilefay

and it probably becomes a fair comparison with the wikipedia situation,
but otherwise no.

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2010-09-10  0:26 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 01/63] builtin: use builtin.h for all builtin commands Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 02/63] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 05/63] tests: locate i18n lib&data correctly under --valgrind Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 21/63] po/is.po: add Icelandic translation Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 26/63] gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 27/63] gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 28/63] gettext tests: skip breaking " Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 51/63] gettextize: git-merge basic messages Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 63/63] po/en_GB.po: add British English Translation Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 00/15] [REDO CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 01/15] gettextize: git-archive basic messages Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 02/15] gettextize: git-bundle " Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 03/15] gettextize: git-clean " Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 04/15] gettextize: git-clean clean.requireForce messages Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 05/15] gettextize: git-describe basic messages Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 06/15] gettextize: git-gc " Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 07/15] gettextize: git-gc "Auto packing the repository" message Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 08/15] gettextize: git-notes basic commands Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 09/15] gettextize: git-notes GIT_NOTES_REWRITE_MODE error message Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 10/15] gettextize: git-notes "Refusing to %s notes in %s" message Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 11/15] gettextize: git-revert basic messages Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 12/15] gettextize: git-revert mark the "me" variable for translation Ævar Arnfjörð Bjarmason
2010-09-06 18:45   ` Jonathan Nieder
2010-09-06 20:06     ` Ævar Arnfjörð Bjarmason
2010-09-06 20:08       ` Jonathan Nieder
2010-09-06 12:21 ` [PATCH 13/15] gettextize: git-revert messages using the "me" variable Ævar Arnfjörð Bjarmason
2010-09-06 18:50   ` Jonathan Nieder
2010-09-06 20:12     ` Ævar Arnfjörð Bjarmason
2010-09-07  5:39       ` Jonathan Nieder
2010-09-07  8:51         ` Ævar Arnfjörð Bjarmason
2010-09-10  0:26           ` Junio C Hamano
2010-09-06 12:21 ` [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message Ævar Arnfjörð Bjarmason
2010-09-06 18:55   ` Jonathan Nieder
2010-09-06 20:25     ` Ævar Arnfjörð Bjarmason
2010-09-07  5:34       ` Jonathan Nieder
2010-09-07  8:47         ` Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 15/15] gettextize: git-shortlog basic messages Ævar Arnfjörð Bjarmason
2010-09-06 18:41   ` Jonathan Nieder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.