All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/20] [CONTINUE] Add gettext support to Git
@ 2010-09-07 16:45 Ævar Arnfjörð Bjarmason
  2010-09-07 16:45 ` [PATCH 01/20] gettextize: git-clean clean.requireForce braces Ævar Arnfjörð Bjarmason
                   ` (20 more replies)
  0 siblings, 21 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:45 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

This series continues work where the already pulled ab/i18n series
(now merged to pu) left off.

It can also be pulled from:

    git://github.com/avar/git.git ab/i18n-continue
    http://github.com/avar/git/compare/ab/i18n-in-git-2010-09-07...ab/i18n-continue
    http://github.com/avar/git/compare/ab/i18n-in-git-2010-09-07...ab/i18n-continue.patch

It includes the first translation of a mainporcelain command written
in shellscript (git-am). Comments on invividual patches below.

Ævar Arnfjörð Bjarmason (20):
  gettextize: git-clean clean.requireForce braces
  gettextize: git-clone "Cloning into" message braces

Under GCC this warns under -Wall and will presumably break Junio's
-Werror build. I didn't notice because I use clang which (IMO rightly)
doesn't complain about this.

  po/de.po: make the German translation msgfmt --check clean

We'll see what ze Germans come up with translation wise, but meanwhile
this un-breaks the translation already in ab/i18n.

  Makefile: add GNU_GETTEXT, set when we expect GNU gettext
  Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT

And these two patches make sure that a translation will never break
like that again. Since msgfmt --check is a GNU-ism I needed to add
support for GNU_GETTEXT=YesPlease in the Makefile.

Maybe a check for this could be added to the configure.ac script, but
I couldn't find a way to do so, and for the reasons explained in the
patches I don't think it was worth my time.

  Revert "gettextize: git-revert mark the "me" variable for
    translation"

Revert this as discussion on-list. Alternatively the "gettextize:
git-revert mark the "me" variable for translation" patch could be
ejected from the existing ab/i18n series.

  gettextize: git-revert "Your local changes" message
  gettextize: git-revert literal "me" messages

Do The Right Thing when translating the "me" messsages.

  gettext: add GETTEXT_POISON support for shell scripts
  gettext: add GETTEXT_POISON tests for shell scripts

We need poison for .sh too to ensure sanity.

  gettextize: git-am add git-sh-i18n
  gettextize: git-am one-line gettext $msg; echo
  gettextize: git-am multi-line getttext $msg; echo
  gettextize: git-am eval_gettext messages
  gettextize: git-am die messages
  gettextize: git-am cannot_fallback messages

Note: Isn't --check clean because the existing code indented with
spaces.

  gettextize: git-am clean_abort messages
  gettextize: git-am "Apply?" message
  gettextize: git-am core say messages
  gettextize: git-am printf(1) message to eval_gettext

All these git-am patches are split up like this to make it easier to
review them, and to demonstrate the different sort of messages we'll
have to translate in the shell scripts.

I won't sent commits quite so granular in the future (unless
requested).

 Makefile                     |   16 +++++++++
 builtin/clean.c              |    3 +-
 builtin/clone.c              |    3 +-
 builtin/revert.c             |   32 +++++++++++------
 git-am.sh                    |   68 +++++++++++++++++++-----------------
 git-sh-i18n.sh               |   77 +++++++++++++++++++++++++----------------
 po/de.po                     |   11 +++---
 t/t0201-gettext-fallbacks.sh |   12 +++---
 t/t0201-gettext-poison.sh    |   36 +++++++++++++++++++
 t/t4150-am.sh                |    4 ++-
 t/t4151-am-abort.sh          |    2 +-
 t/test-lib.sh                |    9 ++++-
 12 files changed, 184 insertions(+), 89 deletions(-)
 create mode 100755 t/t0201-gettext-poison.sh

-- 
1.7.2.3.313.gcd15

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

* [PATCH 01/20] gettextize: git-clean clean.requireForce braces
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:45 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:45 ` [PATCH 02/20] gettextize: git-clone "Cloning into" message braces Ævar Arnfjörð Bjarmason
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:45 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Use braces around a nested if/if/else to appease GCC, which'll whine
under -Wall and "suggest explicit braces to avoid ambiguous ‘else’".

This code was originally added in "gettextize: git-clean
clean.requireForce messages", and tested under clang (which doesn't
whine about perfectly valid uses of C).

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

diff --git a/builtin/clean.c b/builtin/clean.c
index 50ade84..52ec17a 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -77,13 +77,14 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 	if (ignored && ignored_only)
 		die(_("-x and -X cannot be used together"));
 
-	if (!show_only && !force)
+	if (!show_only && !force) {
 		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] 47+ messages in thread

* [PATCH 02/20] gettextize: git-clone "Cloning into" message braces
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
  2010-09-07 16:45 ` [PATCH 01/20] gettextize: git-clean clean.requireForce braces Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:45 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:47 ` [PATCH 04/20] Makefile: add GNU_GETTEXT, set when we expect GNU gettext Ævar Arnfjörð Bjarmason
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:45 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Use braces around a nested if/if/else to appease GCC, which'll whine
under -Wall and "suggest explicit braces to avoid ambiguous ‘else’".

This code was originally added in "gettextize: git-clone "Cloning
into" message", and tested under clang (which doesn't whine about
perfectly valid uses of C).

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

diff --git a/builtin/clone.c b/builtin/clone.c
index 7b0d104..1f10f3f 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -465,11 +465,12 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 		die(_("could not create leading directories of '%s'"), git_dir);
 	set_git_dir(make_absolute_path(git_dir));
 
-	if (0 <= option_verbosity)
+	if (0 <= option_verbosity) {
 		if (option_bare)
 			printf(_("Cloning into bare repository %s"), dir);
 		else
 			printf(_("Cloning into %s"), dir);
+	}
 	init_db(option_template, INIT_DB_QUIET);
 
 	/*
-- 
1.7.2.3.313.gcd15

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

* [PATCH 04/20] Makefile: add GNU_GETTEXT, set when we expect GNU gettext
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
  2010-09-07 16:45 ` [PATCH 01/20] gettextize: git-clean clean.requireForce braces Ævar Arnfjörð Bjarmason
  2010-09-07 16:45 ` [PATCH 02/20] gettextize: git-clone "Cloning into" message braces Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:47 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:47 ` [PATCH 05/20] Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT Ævar Arnfjörð Bjarmason
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:47 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Add a GNU_GETTEXT flag that's set to YesPlease by default everywhere
but on Solaris if the NO_GETTEXT flag isn't set.

Everyone uses GNU gettext these days except Solaris developers, so
having a dumb check for this that just depends on SunOS should be
OK.

I also don't plan to use this (for the time being) for anything that
would break if it isn't correctly set (e.g. if you're using GNU
libintl on Solaris), so I haven't added paranoid autoconf guards.

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

diff --git a/Makefile b/Makefile
index f26fca3..3fe2e47 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,11 @@ all::
 # on platforms where we don't expect glibc (Linux, Hurd,
 # GNU/kFreeBSD), which includes libintl.
 #
+# Define GNU_GETTEXT if you're using the GNU implementation of
+# libintl. We define this everywhere except on Solaris, which has its
+# own gettext implementation. If GNU_GETTEXT is set we'll use GNU
+# extensions like `msgfmt --check'.
+#
 # 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.
@@ -783,6 +788,10 @@ EXTLIBS =
 ifndef NO_GETTEXT
 	# Systems that use GNU gettext and glibc are the exception
 	NEEDS_LIBINTL = YesPlease
+
+	# Systems that don't use GNU gettext are the exception. Only
+	# Solaris has a mature non-GNU gettext implementation.
+	GNU_GETTEXT = YesPlease
 endif
 
 # We choose to avoid "if .. else if .. else .. endif endif"
@@ -872,6 +881,9 @@ ifeq ($(uname_S),SunOS)
 	NO_MKDTEMP = YesPlease
 	NO_MKSTEMPS = YesPlease
 	NO_REGEX = YesPlease
+ifndef NO_GETTEXT
+	GNU_GETTEXT =
+endif
 	ifeq ($(uname_R),5.6)
 		SOCKLEN_T = int
 		NO_HSTRERROR = YesPlease
-- 
1.7.2.3.313.gcd15

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

* [PATCH 05/20] Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (2 preceding siblings ...)
  2010-09-07 16:47 ` [PATCH 04/20] Makefile: add GNU_GETTEXT, set when we expect GNU gettext Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:47 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:47 ` [PATCH 06/20] Revert "gettextize: git-revert mark the "me" variable for translation" Ævar Arnfjörð Bjarmason
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:47 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

GNU msgfmt(1) supports the --check parameter which does various sanity
checks on the translated strings we're processing, including checks
that the printf(3) format of "c-format" translations matches the
original. I.e. that a "%s" isn't missing, or that there aren't
spurious or missing newlines in the translation.

Since Solaris msgfmt(1) doesn't support --check we have to wrap this
in `ifdef GNU_GETTEXT'.

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

diff --git a/Makefile b/Makefile
index 3fe2e47..38ae13f 100644
--- a/Makefile
+++ b/Makefile
@@ -1523,6 +1523,10 @@ ifdef NEEDS_LIBINTL
 	EXTLIBS += -lintl
 endif
 
+ifdef GNU_GETTEXT
+	MSGFMT += --check
+endif
+
 ifdef GETTEXT_POISON
 	COMPAT_CFLAGS += -DGETTEXT_POISON
 endif
-- 
1.7.2.3.313.gcd15

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

* [PATCH 06/20] Revert "gettextize: git-revert mark the "me" variable for translation"
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (3 preceding siblings ...)
  2010-09-07 16:47 ` [PATCH 05/20] Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:47 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:47 ` [PATCH 07/20] gettextize: git-revert "Your local changes" message Ævar Arnfjörð Bjarmason
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:47 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

The `me' variable can be either "revert" or "cherry-pick". Some of
these should be translated, but it's used in too many different
contexts for the approach I initially took to be useful.

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

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

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

* [PATCH 07/20] gettextize: git-revert "Your local changes" message
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (4 preceding siblings ...)
  2010-09-07 16:47 ` [PATCH 06/20] Revert "gettextize: git-revert mark the "me" variable for translation" Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:47 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:47 ` [PATCH 08/20] gettextize: git-revert literal "me" messages Ævar Arnfjörð Bjarmason
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:47 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Translate the "Your local changes [...]" message without using the
`me' variable, instead split up the two messages so translators can
translate the whole messages as-is.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/revert.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/builtin/revert.c b/builtin/revert.c
index a93a5ba..ad2c76a 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -285,11 +285,19 @@ static NORETURN void die_dirty_index(const char *me)
 	if (read_cache_unmerged()) {
 		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));
-		else
-			die(_("Your local changes would be overwritten by %s.\n"), _(me));
+		if (advice_commit_before_merge) {
+			if (action == REVERT)
+				die(_("Your local changes would be overwritten by revert.\n"
+					  "Please, commit your changes or stash them to proceed."));
+			else
+				die(_("Your local changes would be overwritten by cherry-pick.\n"
+					  "Please, commit your changes or stash them to proceed."));
+		} else {
+			if (action == REVERT)
+				die("Your local changes would be overwritten by revert.\n");
+			else
+				die("Your local changes would be overwritten by cherry-pick.\n");
+		}
 	}
 }
 
-- 
1.7.2.3.313.gcd15

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

* [PATCH 08/20] gettextize: git-revert literal "me" messages
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (5 preceding siblings ...)
  2010-09-07 16:47 ` [PATCH 07/20] gettextize: git-revert "Your local changes" message Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:47 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:47 ` [PATCH 09/20] gettext: add GETTEXT_POISON support for shell scripts Ævar Arnfjörð Bjarmason
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:47 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Redo the translation of the remaining messages that used the `me'
variable. These are all error messages referencing the command name,
so the name shouldn't be translated.

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

diff --git a/builtin/revert.c b/builtin/revert.c
index ad2c76a..a89dd12 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -347,7 +347,8 @@ 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));
+		/* TRANSLATORS: %s will be "revert" or "cherry-pick" */
+		die(_("%s: Unable to write new index file"), me);
 	rollback_lock_file(&index_lock);
 
 	if (!clean) {
@@ -454,8 +455,10 @@ static int do_pick_commit(void)
 		return fast_forward_to(commit->object.sha1, head);
 
 	if (parent && parse_commit(parent) < 0)
+		/* TRANSLATORS: The first %s will be "revert" or
+		   "cherry-pick", the second %s a SHA1 */
 		die(_("%s: cannot parse parent commit %s"),
-		    _(me), sha1_to_hex(parent->object.sha1));
+		    me, sha1_to_hex(parent->object.sha1));
 
 	if (get_message(commit->buffer, &msg) != 0)
 		die(_("Cannot get commit message for %s"),
@@ -577,7 +580,8 @@ static int revert_or_cherry_pick(int argc, const char **argv)
 	}
 
 	if (read_cache() < 0)
-		die(_("git %s: failed to read the index"), _(me));
+		/* TRANSLATORS: %s will be "revert" or "cherry-pick" */
+		die(_("git %s: failed to read the index"), me);
 
 	prepare_revs(&revs);
 
-- 
1.7.2.3.313.gcd15

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

* [PATCH 09/20] gettext: add GETTEXT_POISON support for shell scripts
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (6 preceding siblings ...)
  2010-09-07 16:47 ` [PATCH 08/20] gettextize: git-revert literal "me" messages Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:47 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:48 ` [PATCH 10/20] gettext: add GETTEXT_POISON tests " Ævar Arnfjörð Bjarmason
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:47 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Expand the existing GETTEXT_POISON=YesPlease support to support shell
scripts. Analogous the existing C support this is needed to test that
changes to the output of the shell scripts don't break the plumbing
output.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-sh-i18n.sh               |   73 ++++++++++++++++++++++++++----------------
 t/t0201-gettext-fallbacks.sh |   12 +++---
 t/test-lib.sh                |    8 ++++-
 3 files changed, 58 insertions(+), 35 deletions(-)

diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh
index 698a000..b8b645a 100644
--- a/git-sh-i18n.sh
+++ b/git-sh-i18n.sh
@@ -28,44 +28,61 @@ else
 fi
 export TEXTDOMAINDIR
 
-if test -z "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" && type gettext.sh >/dev/null 2>&1
+if test -z "$GIT_INTERNAL_GETTEXT_GETTEXT_POISON"
 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
+	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
+		# 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\"`"
-	}
+		# 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
 else
-	# Since gettext.sh isn't available we'll have to define our own
-	# dummy pass-through functions.
+	# Emit garbage under GETTEXT_POISON=YesPlease. Unlike the C tests
+	# this relies on an environment variable
 
-	# Tell our tests that we don't have the real gettext.sh
-	GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough
+	GIT_INTERNAL_GETTEXT_SH_SCHEME=poison
 	export GIT_INTERNAL_GETTEXT_SH_SCHEME
 
 	gettext () {
-		printf "%s" "$1"
+		printf "%s" "# GETTEXT POISON #"
 	}
 
 	eval_gettext () {
-		gettext_eval="printf '%s' \"$1\""
-		printf "%s" "`eval \"$gettext_eval\"`"
+		printf "%s" "# GETTEXT POISON #"
 	}
 fi
diff --git a/t/t0201-gettext-fallbacks.sh b/t/t0201-gettext-fallbacks.sh
index 47ce4f6..7a85d9b 100755
--- a/t/t0201-gettext-fallbacks.sh
+++ b/t/t0201-gettext-fallbacks.sh
@@ -10,19 +10,19 @@ 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_expect_success NO_GETTEXT_POISON "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_expect_success NO_GETTEXT_POISON '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_expect_success NO_GETTEXT_POISON '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' '
+test_expect_success NO_GETTEXT_POISON 'gettext: our gettext() fallback has pass-through semantics' '
     printf "test" >expect &&
     gettext "test" >actual &&
     test_cmp expect actual &&
@@ -31,7 +31,7 @@ test_expect_success 'gettext: our gettext() fallback has pass-through semantics'
     test_cmp expect actual
 '
 
-test_expect_success 'eval_gettext: our eval_gettext() fallback has pass-through semantics' '
+test_expect_success NO_GETTEXT_POISON 'eval_gettext: our eval_gettext() fallback has pass-through semantics' '
     printf "test" >expect &&
     eval_gettext "test" >actual &&
     test_cmp expect actual &&
@@ -40,7 +40,7 @@ test_expect_success 'eval_gettext: our eval_gettext() fallback has pass-through
     test_cmp expect actual
 '
 
-test_expect_success 'eval_gettext: our eval_gettext() fallback can interpolate variables' '
+test_expect_success NO_GETTEXT_POISON '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
diff --git a/t/test-lib.sh b/t/test-lib.sh
index b297ef6..5a9f989 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -963,7 +963,13 @@ 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
+if test -z "$GETTEXT_POISON"
+then
+	test_set_prereq NO_GETTEXT_POISON
+else
+	GIT_INTERNAL_GETTEXT_GETTEXT_POISON=YesPlease
+	export GIT_INTERNAL_GETTEXT_GETTEXT_POISON
+fi
 
 # 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] 47+ messages in thread

* [PATCH 10/20] gettext: add GETTEXT_POISON tests for shell scripts
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (7 preceding siblings ...)
  2010-09-07 16:47 ` [PATCH 09/20] gettext: add GETTEXT_POISON support for shell scripts Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:48 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:48 ` [PATCH 11/20] gettextize: git-am add git-sh-i18n Ævar Arnfjörð Bjarmason
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:48 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Test the new GETTEXT_POISON=YesPlease support for shell scripts. This
test is derived from the existing t0201-gettext-fallbacks.sh test.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t0201-gettext-poison.sh |   36 ++++++++++++++++++++++++++++++++++++
 t/test-lib.sh             |    1 +
 2 files changed, 37 insertions(+), 0 deletions(-)
 create mode 100755 t/t0201-gettext-poison.sh

diff --git a/t/t0201-gettext-poison.sh b/t/t0201-gettext-poison.sh
new file mode 100755
index 0000000..2361590
--- /dev/null
+++ b/t/t0201-gettext-poison.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
+#
+
+test_description='Gettext Shell poison'
+
+. ./lib-gettext.sh
+
+test_expect_success GETTEXT_POISON "sanity: \$GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to $GIT_INTERNAL_GETTEXT_SH_SCHEME)" '
+    test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"
+'
+
+test_expect_success GETTEXT_POISON 'sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is poison' '
+    test "$GIT_INTERNAL_GETTEXT_SH_SCHEME" = "poison"
+'
+
+test_expect_success GETTEXT_POISON 'gettext: our gettext() fallback has poison semantics' '
+    printf "# GETTEXT POISON #" >expect &&
+    gettext "test" >actual &&
+    test_cmp expect actual &&
+    printf "# GETTEXT POISON #" >expect &&
+    gettext "test more words" >actual &&
+    test_cmp expect actual
+'
+
+test_expect_success GETTEXT_POISON 'eval_gettext: our eval_gettext() fallback has poison semantics' '
+    printf "# GETTEXT POISON #" >expect &&
+    eval_gettext "test" >actual &&
+    test_cmp expect actual &&
+    printf "# GETTEXT POISON #" >expect &&
+    eval_gettext "test more words" >actual &&
+    test_cmp expect actual
+'
+
+test_done
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 5a9f989..48e1256 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -967,6 +967,7 @@ if test -z "$GETTEXT_POISON"
 then
 	test_set_prereq NO_GETTEXT_POISON
 else
+	test_set_prereq GETTEXT_POISON
 	GIT_INTERNAL_GETTEXT_GETTEXT_POISON=YesPlease
 	export GIT_INTERNAL_GETTEXT_GETTEXT_POISON
 fi
-- 
1.7.2.3.313.gcd15

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

* [PATCH 11/20] gettextize: git-am add git-sh-i18n
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (8 preceding siblings ...)
  2010-09-07 16:48 ` [PATCH 10/20] gettext: add GETTEXT_POISON tests " Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:48 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:48 ` [PATCH 12/20] gettextize: git-am one-line gettext $msg; echo Ævar Arnfjörð Bjarmason
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:48 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Source git-sh-i18n in git-am.sh, it's needed to import the Git gettext
shell functions.

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

diff --git a/git-am.sh b/git-am.sh
index e7f008c..a7185d9 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -37,6 +37,7 @@ rerere-autoupdate update the index with reused conflict resolution if possible
 rebasing*       (internal use for git-rebase)"
 
 . git-sh-setup
+. git-sh-i18n
 prefix=$(git rev-parse --show-prefix)
 set_reflog_action am
 require_work_tree
-- 
1.7.2.3.313.gcd15

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

* [PATCH 12/20] gettextize: git-am one-line gettext $msg; echo
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (9 preceding siblings ...)
  2010-09-07 16:48 ` [PATCH 11/20] gettextize: git-am add git-sh-i18n Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:48 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:48 ` [PATCH 13/20] gettextize: git-am multi-line getttext " Ævar Arnfjörð Bjarmason
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:48 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

One-line `gettext $msg; echo' messages are the simplest use case for
gettext(1).

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

diff --git a/git-am.sh b/git-am.sh
index a7185d9..bd04a15 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -93,7 +93,7 @@ go_next () {
 
 cannot_fallback () {
 	echo "$1"
-	echo "Cannot fall back to three-way merge."
+	gettext "Cannot fall back to three-way merge."; echo
 	exit 1
 }
 
@@ -629,7 +629,7 @@ do
 
 	if test -z "$GIT_AUTHOR_EMAIL"
 	then
-		echo "Patch does not have a valid e-mail address."
+		gettext "Patch does not have a valid e-mail address."; echo
 		stop_here $this
 	fi
 
@@ -680,7 +680,7 @@ do
 	    action=again
 	    while test "$action" = again
 	    do
-		echo "Commit Body is:"
+		gettext "Commit Body is:"; echo
 		echo "--------------------------"
 		cat "$dotest/final-commit"
 		echo "--------------------------"
-- 
1.7.2.3.313.gcd15

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

* [PATCH 13/20] gettextize: git-am multi-line getttext $msg; echo
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (10 preceding siblings ...)
  2010-09-07 16:48 ` [PATCH 12/20] gettextize: git-am one-line gettext $msg; echo Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:48 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:48 ` [PATCH 14/20] gettextize: git-am eval_gettext messages Ævar Arnfjörð Bjarmason
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:48 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

When we have multi-line `gettext $msg; echo' messages we can't
preserve the existing indenting because gettext(1) can't accept input
on stdin.

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

diff --git a/git-am.sh b/git-am.sh
index bd04a15..73a4046 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -741,16 +741,16 @@ do
 		# working tree.
 		resolved=
 		git diff-index --quiet --cached HEAD -- && {
-			echo "No changes - did you forget to use 'git add'?"
-			echo "If there is nothing left to stage, chances are that something else"
-			echo "already introduced the same changes; you might want to skip this patch."
+			gettext "No changes - did you forget to use 'git add'?
+If there is nothing left to stage, chances are that something else
+already introduced the same changes; you might want to skip this patch."; echo
 			stop_here_user_resolve $this
 		}
 		unmerged=$(git ls-files -u)
 		if test -n "$unmerged"
 		then
-			echo "You still have unmerged paths in your index"
-			echo "did you forget to use 'git add'?"
+			gettext "You still have unmerged paths in your index
+did you forget to use 'git add'?"; echo
 			stop_here_user_resolve $this
 		fi
 		apply_status=0
-- 
1.7.2.3.313.gcd15

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

* [PATCH 14/20] gettextize: git-am eval_gettext messages
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (11 preceding siblings ...)
  2010-09-07 16:48 ` [PATCH 13/20] gettextize: git-am multi-line getttext " Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:48 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:48 ` [PATCH 15/20] gettextize: git-am die messages Ævar Arnfjörð Bjarmason
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:48 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Messages that use variables to be interpolated need to use
eval_gettext(), this wrapper will eval the message and expand the
variable for us.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-am.sh |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 73a4046..98819e6 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -77,9 +77,9 @@ stop_here_user_resolve () {
 	    printf '%s\n' "$resolvemsg"
 	    stop_here $1
     fi
-    echo "When you have resolved this problem run \"$cmdline --resolved\"."
-    echo "If you would prefer to skip this patch, instead run \"$cmdline --skip\"."
-    echo "To restore the original branch and stop patching run \"$cmdline --abort\"."
+    eval_gettext "When you have resolved this problem run \"\$cmdline --resolved\".
+If you would prefer to skip this patch, instead run \"\$cmdline --skip\".
+To restore the original branch and stop patching run \"\$cmdline --abort\"."; echo
 
     stop_here $1
 }
@@ -592,9 +592,9 @@ do
 			go_next && continue
 
 		test -s "$dotest/patch" || {
-			echo "Patch is empty.  Was it split wrong?"
-			echo "If you would prefer to skip this patch, instead run \"$cmdline --skip\"."
-			echo "To restore the original branch and stop patching run \"$cmdline --abort\"."
+			eval_gettext "Patch is empty.  Was it split wrong?
+If you would prefer to skip this patch, instead run \"\$cmdline --skip\".
+To restore the original branch and stop patching run \"\$cmdline --abort\"."; echo
 			stop_here $this
 		}
 		rm -f "$dotest/original-commit" "$dotest/author-script"
-- 
1.7.2.3.313.gcd15

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

* [PATCH 15/20] gettextize: git-am die messages
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (12 preceding siblings ...)
  2010-09-07 16:48 ` [PATCH 14/20] gettextize: git-am eval_gettext messages Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:48 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:48 ` [PATCH 16/20] gettextize: git-am cannot_fallback messages Ævar Arnfjörð Bjarmason
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:48 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

The die messages in git-am need to use:

    die "$(gettext "string")"

Since gettext(1) emits the message instead of returning it like the C
equivalent, and our die() function in git-sh-setup needs to get a
string as an argument.

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

diff --git a/git-am.sh b/git-am.sh
index 98819e6..4bee325 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -44,7 +44,7 @@ require_work_tree
 cd_to_toplevel
 
 git var GIT_COMMITTER_IDENT >/dev/null ||
-	die "You need to set your committer info first"
+	die "$(gettext "You need to set your committer info first")"
 
 if git rev-parse --verify -q HEAD >/dev/null
 then
@@ -337,7 +337,7 @@ do
 	--rebasing)
 		rebasing=t threeway=t keep=t scissors=f no_inbody_headers=t ;;
 	-d|--dotest)
-		die "-d option is no longer supported.  Do not use."
+		die "$(gettext "-d option is no longer supported.  Do not use.")"
 		;;
 	--resolvemsg)
 		shift; resolvemsg=$1 ;;
@@ -400,12 +400,12 @@ then
 		false
 		;;
 	esac ||
-	die "previous rebase directory $dotest still exists but mbox given."
+	die "$(eval_gettext "previous rebase directory \$dotest still exists but mbox given.")"
 	resume=yes
 
 	case "$skip,$abort" in
 	t,t)
-		die "Please make up your mind. --skip or --abort?"
+		die "$(gettext "Please make up your mind. --skip or --abort?")"
 		;;
 	t,)
 		git rerere clear
@@ -431,7 +431,7 @@ then
 else
 	# Make sure we are not given --skip, --resolved, nor --abort
 	test "$skip$resolved$abort" = "" ||
-		die "Resolve operation not in progress, we are not resuming."
+		die "$(gettext "Resolve operation not in progress, we are not resuming.")"
 
 	# Start afresh.
 	mkdir -p "$dotest" || exit
@@ -496,7 +496,7 @@ case "$resolved" in
 	if test "$files"
 	then
 		test -n "$HAS_HEAD" && : >"$dotest/dirtyindex"
-		die "Dirty index: cannot apply patches (dirty: $files)"
+		die "$(eval_gettext "Dirty index: cannot apply patches (dirty: \$files)")"
 	fi
 esac
 
@@ -676,7 +676,7 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
 	if test "$interactive" = t
 	then
 	    test -t 0 ||
-	    die "cannot be interactive without stdin connected to a terminal."
+	    die "$(gettext "cannot be interactive without stdin connected to a terminal.")"
 	    action=again
 	    while test "$action" = again
 	    do
-- 
1.7.2.3.313.gcd15

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

* [PATCH 16/20] gettextize: git-am cannot_fallback messages
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (13 preceding siblings ...)
  2010-09-07 16:48 ` [PATCH 15/20] gettextize: git-am die messages Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:48 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:48 ` [PATCH 17/20] gettextize: git-am clean_abort messages Ævar Arnfjörð Bjarmason
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:48 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Translate messages with gettext(1) before they're passed to the
cannot_fallback function, just like we handle the die function.

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

diff --git a/git-am.sh b/git-am.sh
index 4bee325..8e894e5 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -108,7 +108,7 @@ fall_back_3way () {
 	"$dotest/patch" &&
     GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
     git write-tree >"$dotest/patch-merge-base+" ||
-    cannot_fallback "Repository lacks necessary blobs to fall back on 3-way merge."
+    cannot_fallback "$(gettext "Repository lacks necessary blobs to fall back on 3-way merge.")"
 
     say Using index info to reconstruct a base tree...
     if GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
@@ -117,8 +117,8 @@ fall_back_3way () {
 	mv "$dotest/patch-merge-base+" "$dotest/patch-merge-base"
 	mv "$dotest/patch-merge-tmp-index" "$dotest/patch-merge-index"
     else
-        cannot_fallback "Did you hand edit your patch?
-It does not apply to blobs recorded in its index."
+        cannot_fallback "$(gettext "Did you hand edit your patch?
+It does not apply to blobs recorded in its index.")"
     fi
 
     test -f "$dotest/patch-merge-index" &&
-- 
1.7.2.3.313.gcd15

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

* [PATCH 17/20] gettextize: git-am clean_abort messages
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (14 preceding siblings ...)
  2010-09-07 16:48 ` [PATCH 16/20] gettextize: git-am cannot_fallback messages Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:48 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:48 ` [PATCH 18/20] gettextize: git-am "Apply?" message Ævar Arnfjörð Bjarmason
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:48 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Messages that used the clean_abort function needed both gettext(1) and
eval_gettext(). These need to be interpolated in a string like the die
and cannot_fallback messages.

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

diff --git a/git-am.sh b/git-am.sh
index 8e894e5..3403267 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -233,7 +233,7 @@ split_patches () {
 	stgit-series)
 		if test $# -ne 1
 		then
-			clean_abort "Only one StGIT patch series can be applied at once"
+			clean_abort "$(gettext "Only one StGIT patch series can be applied at once")"
 		fi
 		series_dir=`dirname "$1"`
 		series_file="$1"
@@ -285,9 +285,9 @@ split_patches () {
 		;;
 	*)
 		if test -n "$parse_patch" ; then
-			clean_abort "Patch format $patch_format is not supported."
+			clean_abort "$(eval_gettext "Patch format \$patch_format is not supported.")"
 		else
-			clean_abort "Patch format detection failed."
+			clean_abort "$(gettext "Patch format detection failed.")"
 		fi
 		;;
 	esac
-- 
1.7.2.3.313.gcd15

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

* [PATCH 18/20] gettextize: git-am "Apply?" message
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (15 preceding siblings ...)
  2010-09-07 16:48 ` [PATCH 17/20] gettextize: git-am clean_abort messages Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:48 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:48 ` [PATCH 19/20] gettextize: git-am core say messages Ævar Arnfjörð Bjarmason
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:48 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Make the "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all" message
translatable, and leave a note in a TRANSLATORS comment explaining
that translators have to preserve a mention of the y/n/e/v/a
characters since the program will expect them, and not their
localized equivalents.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-am.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 3403267..90f2a9d 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -684,7 +684,10 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
 		echo "--------------------------"
 		cat "$dotest/final-commit"
 		echo "--------------------------"
-		printf "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+		# TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+		# in your translation. The program will only accept English
+		# input at this point.
+		gettext "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
 		read reply
 		case "$reply" in
 		[yY]*) action=yes ;;
-- 
1.7.2.3.313.gcd15

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

* [PATCH 19/20] gettextize: git-am core say messages
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (16 preceding siblings ...)
  2010-09-07 16:48 ` [PATCH 18/20] gettextize: git-am "Apply?" message Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:48 ` Ævar Arnfjörð Bjarmason
  2010-09-07 16:50 ` [PATCH 20/20] gettextize: git-am printf(1) message to eval_gettext Ævar Arnfjörð Bjarmason
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:48 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Make the core git-am messages that use say() translatable. These are
visible on almost every git am invocation.

There are tests that depend on the "Applying" output that need to be
skipped along with this translation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-am.sh           |    6 +++---
 t/t4150-am.sh       |    4 +++-
 t/t4151-am-abort.sh |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 90f2a9d..6992d92 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -723,7 +723,7 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
 		stop_here $this
 	fi
 
-	say "Applying: $FIRSTLINE"
+	say "$(eval_gettext "Applying: \$FIRSTLINE")"
 
 	case "$resolved" in
 	'')
@@ -768,7 +768,7 @@ did you forget to use 'git add'?"; echo
 		    # Applying the patch to an earlier tree and merging the
 		    # result may have produced the same tree as ours.
 		    git diff-index --quiet --cached HEAD -- && {
-			say No changes -- Patch already applied.
+			say "$(gettext "No changes -- Patch already applied.")"
 			go_next
 			continue
 		    }
@@ -794,7 +794,7 @@ did you forget to use 'git add'?"; echo
 			GIT_AUTHOR_DATE=
 		fi
 		parent=$(git rev-parse --verify -q HEAD) ||
-		say >&2 "applying to an empty history"
+		say >&2 "$(gettext "applying to an empty history")"
 
 		if test -n "$committer_date_is_author_date"
 		then
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 1c3d8ed..59ba994 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -464,7 +464,9 @@ test_expect_success 'am newline in subject' '
 	git checkout first &&
 	test_tick &&
 	sed -e "s/second/second \\\n foo/" patch1 >patchnl &&
-	git am <patchnl >output.out 2>&1 &&
+	git am <patchnl >output.out 2>&1'
+
+test_expect_success NO_GETTEXT_POISON 'output: am newline in subject' '
 	grep "^Applying: second \\\n foo$" output.out
 '
 
diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh
index b55c411..5bb24f8 100755
--- a/t/t4151-am-abort.sh
+++ b/t/t4151-am-abort.sh
@@ -43,7 +43,7 @@ do
 		test_cmp expect actual
 	'
 
-	test_expect_success "am$with3 --skip continue after failed am$with3" '
+	test_expect_success NO_GETTEXT_POISON "am$with3 --skip continue after failed am$with3" '
 		test_must_fail git am$with3 --skip >output &&
 		test "$(grep "^Applying" output)" = "Applying: 6" &&
 		test_cmp file-2-expect file-2 &&
-- 
1.7.2.3.313.gcd15

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

* [PATCH 20/20] gettextize: git-am printf(1) message to eval_gettext
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (17 preceding siblings ...)
  2010-09-07 16:48 ` [PATCH 19/20] gettextize: git-am core say messages Ævar Arnfjörð Bjarmason
@ 2010-09-07 16:50 ` Ævar Arnfjörð Bjarmason
  2010-09-07 20:10   ` Jonathan Nieder
  2010-09-07 20:46   ` [PATCH v2 " Ævar Arnfjörð Bjarmason
  2010-09-07 20:45 ` [PATCH v2 19/20] gettextize: git-am core say messages Ævar Arnfjörð Bjarmason
  2010-09-08 16:43 ` [PATCH 00/20] [CONTINUE] Add gettext support to Git Junio C Hamano
  20 siblings, 2 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 16:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jan Krüger, Jonathan Nieder,
	Ævar Arnfjörð Bjarmason

Convert a message that used printf(1) format to use eval_gettext. It's
easier for translators to handle the latter, since the eval format
automatically gives them context via variable names.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-am.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 6992d92..a13d488 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -778,7 +778,7 @@ did you forget to use 'git add'?"; echo
 	fi
 	if test $apply_status != 0
 	then
-		printf 'Patch failed at %s %s\n' "$msgnum" "$FIRSTLINE"
+		echo "$(eval_gettext "Patch failed at \$msgnum \$FIRSTLINE")"
 		stop_here_user_resolve $this
 	fi
 
-- 
1.7.2.3.313.gcd15

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

* Re: [PATCH 20/20] gettextize: git-am printf(1) message to eval_gettext
  2010-09-07 16:50 ` [PATCH 20/20] gettextize: git-am printf(1) message to eval_gettext Ævar Arnfjörð Bjarmason
@ 2010-09-07 20:10   ` Jonathan Nieder
  2010-09-07 20:29     ` Ævar Arnfjörð Bjarmason
  2010-09-07 20:46   ` [PATCH v2 " Ævar Arnfjörð Bjarmason
  1 sibling, 1 reply; 47+ messages in thread
From: Jonathan Nieder @ 2010-09-07 20:10 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Junio C Hamano, Jan Krüger

Hi,

Ævar Arnfjörð Bjarmason wrote:

> +++ b/git-am.sh
> @@ -778,7 +778,7 @@ did you forget to use 'git add'?"; echo
>        fi
>        if test $apply_status != 0
>        then
> -               printf 'Patch failed at %s %s\n' "$msgnum" "$FIRSTLINE"
> +               echo "$(eval_gettext "Patch failed at \$msgnum \$FIRSTLINE")"

Probably I am missing something silly, but why not just:

        eval_gettext 'Patch failed at $msgnum $FIRSTLINE\n'

? I ask because it is nice to be able to avoid "echo" with arbitrary
data: special characters (e.g. \) can make for portability hassles.

Jonathan

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

* Re: [PATCH 20/20] gettextize: git-am printf(1) message to eval_gettext
  2010-09-07 20:10   ` Jonathan Nieder
@ 2010-09-07 20:29     ` Ævar Arnfjörð Bjarmason
  2010-09-07 20:32       ` Jonathan Nieder
  0 siblings, 1 reply; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 20:29 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git, Junio C Hamano, Jan Krüger

On Tue, Sep 7, 2010 at 20:10, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Hi,
>
> Ævar Arnfjörð Bjarmason wrote:
>
>> +++ b/git-am.sh
>> @@ -778,7 +778,7 @@ did you forget to use 'git add'?"; echo
>>        fi
>>        if test $apply_status != 0
>>        then
>> -               printf 'Patch failed at %s %s\n' "$msgnum" "$FIRSTLINE"
>> +               echo "$(eval_gettext "Patch failed at \$msgnum \$FIRSTLINE")"
>
> Probably I am missing something silly, but why not just:
>
>        eval_gettext 'Patch failed at $msgnum $FIRSTLINE\n'

That looks better, or:

    eval_gettext 'Patch failed at $msgnum $FIRSTLINE'; echo

To remove the change for translators to screw up the \n, the gettext
manual uses that style.

It also uses double quotes consistently, but '' works fine too. I
don't know if '' should be avoided for some other reason, probably
not.

> ? I ask because it is nice to be able to avoid "echo" with arbitrary
> data: special characters (e.g. \) can make for portability hassles.

Aside from this example (which looks nicer as you suggest) we'd be in
some slight trouble if the code in the patch is unportable, since I
think I'm using equivalent constructions elsewhere to thinks that get
passed to echo, but maybe that's not a problem if there's a level of
indirection.

In any case we could solve those with printf "%s" $str.

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

* Re: [PATCH 20/20] gettextize: git-am printf(1) message to eval_gettext
  2010-09-07 20:29     ` Ævar Arnfjörð Bjarmason
@ 2010-09-07 20:32       ` Jonathan Nieder
  0 siblings, 0 replies; 47+ messages in thread
From: Jonathan Nieder @ 2010-09-07 20:32 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Junio C Hamano, Jan Krüger

Ævar Arnfjörð Bjarmason wrote:

> In any case we could solve those with printf "%s" $str.

In general

 printf "%s\n" "$str"

is more reliable than

 echo "$str"

, yes.  See <http://www.opengroup.org/onlinepubs/9699919799/utilities/echo.html>.

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

* [PATCH v2 19/20] gettextize: git-am core say messages
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (18 preceding siblings ...)
  2010-09-07 16:50 ` [PATCH 20/20] gettextize: git-am printf(1) message to eval_gettext Ævar Arnfjörð Bjarmason
@ 2010-09-07 20:45 ` Ævar Arnfjörð Bjarmason
  2010-09-08 16:43 ` [PATCH 00/20] [CONTINUE] Add gettext support to Git Junio C Hamano
  20 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 20:45 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Make the core git-am messages that use say() translatable. These are
visible on almost every git am invocation.

There are tests that depend on the "Applying" output that need to be
skipped along with this translation.

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

Fix for a trivial coding style issue:
    
    -+      git am <patchnl >output.out 2>&1'
    ++      git am <patchnl >output.out 2>&1
    ++'

 git-am.sh           |    6 +++---
 t/t4150-am.sh       |    5 ++++-
 t/t4151-am-abort.sh |    2 +-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 90f2a9d..6992d92 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -723,7 +723,7 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
 		stop_here $this
 	fi
 
-	say "Applying: $FIRSTLINE"
+	say "$(eval_gettext "Applying: \$FIRSTLINE")"
 
 	case "$resolved" in
 	'')
@@ -768,7 +768,7 @@ did you forget to use 'git add'?"; echo
 		    # Applying the patch to an earlier tree and merging the
 		    # result may have produced the same tree as ours.
 		    git diff-index --quiet --cached HEAD -- && {
-			say No changes -- Patch already applied.
+			say "$(gettext "No changes -- Patch already applied.")"
 			go_next
 			continue
 		    }
@@ -794,7 +794,7 @@ did you forget to use 'git add'?"; echo
 			GIT_AUTHOR_DATE=
 		fi
 		parent=$(git rev-parse --verify -q HEAD) ||
-		say >&2 "applying to an empty history"
+		say >&2 "$(gettext "applying to an empty history")"
 
 		if test -n "$committer_date_is_author_date"
 		then
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 1c3d8ed..373d79b 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -464,7 +464,10 @@ test_expect_success 'am newline in subject' '
 	git checkout first &&
 	test_tick &&
 	sed -e "s/second/second \\\n foo/" patch1 >patchnl &&
-	git am <patchnl >output.out 2>&1 &&
+	git am <patchnl >output.out 2>&1
+'
+
+test_expect_success NO_GETTEXT_POISON 'output: am newline in subject' '
 	grep "^Applying: second \\\n foo$" output.out
 '
 
diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh
index b55c411..5bb24f8 100755
--- a/t/t4151-am-abort.sh
+++ b/t/t4151-am-abort.sh
@@ -43,7 +43,7 @@ do
 		test_cmp expect actual
 	'
 
-	test_expect_success "am$with3 --skip continue after failed am$with3" '
+	test_expect_success NO_GETTEXT_POISON "am$with3 --skip continue after failed am$with3" '
 		test_must_fail git am$with3 --skip >output &&
 		test "$(grep "^Applying" output)" = "Applying: 6" &&
 		test_cmp file-2-expect file-2 &&
-- 
1.7.2.3.313.gcd15

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

* [PATCH v2 20/20] gettextize: git-am printf(1) message to eval_gettext
  2010-09-07 16:50 ` [PATCH 20/20] gettextize: git-am printf(1) message to eval_gettext Ævar Arnfjörð Bjarmason
  2010-09-07 20:10   ` Jonathan Nieder
@ 2010-09-07 20:46   ` Ævar Arnfjörð Bjarmason
  1 sibling, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-07 20:46 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jonathan Nieder, Ævar Arnfjörð Bjarmason

Convert a message that used printf(1) format to use eval_gettext. It's
easier for translators to handle the latter, since the eval format
automatically gives them context via variable names.

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

Use eval_gettext directly as suggested by Jonathan Nieder.

 git-am.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 6992d92..bf0258d 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -778,7 +778,7 @@ did you forget to use 'git add'?"; echo
 	fi
 	if test $apply_status != 0
 	then
-		printf 'Patch failed at %s %s\n' "$msgnum" "$FIRSTLINE"
+		eval_gettext 'Patch failed at $msgnum $FIRSTLINE'; echo
 		stop_here_user_resolve $this
 	fi
 
-- 
1.7.2.3.313.gcd15

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

* Re: [PATCH 00/20] [CONTINUE] Add gettext support to Git
  2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
                   ` (19 preceding siblings ...)
  2010-09-07 20:45 ` [PATCH v2 19/20] gettextize: git-am core say messages Ævar Arnfjörð Bjarmason
@ 2010-09-08 16:43 ` Junio C Hamano
  2010-09-08 23:32   ` Ævar Arnfjörð Bjarmason
  20 siblings, 1 reply; 47+ messages in thread
From: Junio C Hamano @ 2010-09-08 16:43 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

I've done

    git fetch git://github.com/avar/git +ab/i18n-all-continue:ab/i18n

and rebuilt 'pu' with it (I am not quite ready to push the results out,
though).

Please squash in the following to appropriate patches in the series.
Thanks.

-- >8 --
From: Junio C Hamano <gitster@pobox.com>
Date: Wed, 8 Sep 2010 09:33:18 -0700
Subject: [PATCH] Style fixups: explicitly disambiguate nested if/if/else correspondence

Write {} to let the compiler know that we know what we are doing, like
this, when writing a nested if/if/else:

    if (...) {
        if (...)
	    ...
	else
	    ...
    }

The programmer who writes the code like the above without the outermost {}
may know that "else" corresponds to the innermost "if", but it will keep
things easier and safer while reviewing patches that build on top of code
like this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/clean.c |    3 ++-
 builtin/clone.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/builtin/clean.c b/builtin/clean.c
index 642d767..e1694c0 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -77,13 +77,14 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 	if (ignored && ignored_only)
 		die(_("-x and -X cannot be used together"));
 
-	if (!show_only && !force)
+	if (!show_only && !force) {
 		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;
diff --git a/builtin/clone.c b/builtin/clone.c
index 7b0d104..1f10f3f 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -465,11 +465,12 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 		die(_("could not create leading directories of '%s'"), git_dir);
 	set_git_dir(make_absolute_path(git_dir));
 
-	if (0 <= option_verbosity)
+	if (0 <= option_verbosity) {
 		if (option_bare)
 			printf(_("Cloning into bare repository %s"), dir);
 		else
 			printf(_("Cloning into %s"), dir);
+	}
 	init_db(option_template, INIT_DB_QUIET);
 
 	/*
-- 
1.7.3.rc0.183.gb0497

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

* Re: [PATCH 00/20] [CONTINUE] Add gettext support to Git
  2010-09-08 16:43 ` [PATCH 00/20] [CONTINUE] Add gettext support to Git Junio C Hamano
@ 2010-09-08 23:32   ` Ævar Arnfjörð Bjarmason
  2010-09-10 12:00     ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-08 23:32 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Wed, Sep 8, 2010 at 16:43, Junio C Hamano <gitster@pobox.com> wrote:
> I've done
>
>    git fetch git://github.com/avar/git +ab/i18n-all-continue:ab/i18n
>
> and rebuilt 'pu' with it (I am not quite ready to push the results out,
> though).
>
> Please squash in the following to appropriate patches in the series.
> Thanks.

Thanks, those fixes were actually already part of the series, but I
hadn't squashed those yet.

I've gone ahead and done so:

    pick 8e9b49d gettextize: git-clone "Cloning into" message
    fixup 73f08a1 gettextize: git-clone "Cloning into" message braces

and:

    pick 8e9b49d gettextize: git-clone "Cloning into" message
    fixup 73f08a1 gettextize: git-clone "Cloning into" message braces

I've also fixed up the whole mess with the "me" messages. I.e. dropped
the revert commits and just fixed the originals so they make sense in
the first place.

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

* Re: [PATCH 00/20] [CONTINUE] Add gettext support to Git
  2010-09-08 23:32   ` Ævar Arnfjörð Bjarmason
@ 2010-09-10 12:00     ` Ævar Arnfjörð Bjarmason
  2010-09-10 16:01       ` Junio C Hamano
  0 siblings, 1 reply; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 12:00 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Ramkumar Ramachandra, Antriksh Pany

On Wed, Sep 8, 2010 at 23:32, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> On Wed, Sep 8, 2010 at 16:43, Junio C Hamano <gitster@pobox.com> wrote:
>> I've done
>>
>>    git fetch git://github.com/avar/git +ab/i18n-all-continue:ab/i18n
>>
>> and rebuilt 'pu' with it (I am not quite ready to push the results out,
>> though).
>>
>> Please squash in the following to appropriate patches in the series.
>> Thanks.
>
> Thanks, those fixes were actually already part of the series, but I
> hadn't squashed those yet.
>
> I've gone ahead and done so:
>
>    pick 8e9b49d gettextize: git-clone "Cloning into" message
>    fixup 73f08a1 gettextize: git-clone "Cloning into" message braces
>
> and:
>
>    pick 8e9b49d gettextize: git-clone "Cloning into" message
>    fixup 73f08a1 gettextize: git-clone "Cloning into" message braces
>
> I've also fixed up the whole mess with the "me" messages. I.e. dropped
> the revert commits and just fixed the originals so they make sense in
> the first place.

Hi, since you didn't pick this up in the last push I fixed it up a bit
more.

I rebased ab/i18n-all-continue on the new master:

    git fetch git://github.com/avar/git +ab/i18n-all-continue:ab/i18n

But you probably want this instead:

    git fetch git://github.com/avar/git +ab/i18n-all-continue-with-hindi:ab/i18n

I took the liberty of adding Ramkumar Ramachandra's hi.po patch to the
series.

It also doesn't have your "Style fixups: explicitly disambiguate
nested if/if/else correspondence" commit since I fixed that in my
copy, and fixes the "me" issues by rewriting some old commits.

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

* Re: [PATCH 00/20] [CONTINUE] Add gettext support to Git
  2010-09-10 12:00     ` Ævar Arnfjörð Bjarmason
@ 2010-09-10 16:01       ` Junio C Hamano
  2010-09-10 17:17         ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 47+ messages in thread
From: Junio C Hamano @ 2010-09-10 16:01 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Ramkumar Ramachandra, Antriksh Pany

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

> Hi, since you didn't pick this up in the last push I fixed it up a bit
> more.
>
> I rebased ab/i18n-all-continue on the new master:
>
>     git fetch git://github.com/avar/git +ab/i18n-all-continue:ab/i18n
>
> But you probably want this instead:
>
>     git fetch git://github.com/avar/git +ab/i18n-all-continue-with-hindi:ab/i18n
>
> I took the liberty of adding Ramkumar Ramachandra's hi.po patch to the
> series.

I think that the latter is "i18n-continue-with-hindi" (no "all"), and also
suspect that ab/i18n-all-continue either hasn't be pushed out or is stale?

The copy of "all-continue" I just fetched ends with 2b5170f (gettextize:
git-shortlog basic messages, 2010-09-05) while hindi^ is at c4adf2e
(gettextize: git-am printf(1) message to eval_gettext, 2010-09-07).

I haven't formed an opinion as to what to do with the *.po files after the
series hits 'next' (or anything more stable than 'pu'); my preference is
to delegate that part of the system to somebody who volunteers as an i18n
coordinator, and pull from him/her from time to time, just like the way
gitk and git-gui are managed.

For now, I'll queue the whole thing and merge that to 'pu', but we would
want to squash l10n commits after (but not including) 8d65a35 (gettext
tests: test re-encoding with a UTF-8 msgid under Shell, 2010-08-30) that
touch only one file in po/*.po into one commit per language, move them
near the tip after all the infrastructure enhancements (and fix-ups to the
infrastructure, if necessary) and individual command i18ns, to make the
end result a reasonably complete and clean "first cut for public testing"
of the series before it hits 'next'.

As a companion update to 6495411 (gettext docs: add po/README file
documenting Git's gettext, 2010-09-03), we would need a file in
Documentation/ directory to describe the use of _() and N_() for
programmers and point it from CodingGuidelines.  We might also want to
move po/README to Documentation/ but I don't have strong preference either
way.

Thanks.

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

* Re: [PATCH 00/20] [CONTINUE] Add gettext support to Git
  2010-09-10 16:01       ` Junio C Hamano
@ 2010-09-10 17:17         ` Ævar Arnfjörð Bjarmason
  2010-09-10 19:35           ` [PATCH 0/5] gettext docs: programmer docs in po/README Ævar Arnfjörð Bjarmason
                             ` (5 more replies)
  0 siblings, 6 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 17:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Ramkumar Ramachandra, Antriksh Pany

On Fri, Sep 10, 2010 at 16:01, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> Hi, since you didn't pick this up in the last push I fixed it up a bit
>> more.
>>
>> I rebased ab/i18n-all-continue on the new master:
>>
>>     git fetch git://github.com/avar/git +ab/i18n-all-continue:ab/i18n
>>
>> But you probably want this instead:
>>
>>     git fetch git://github.com/avar/git +ab/i18n-all-continue-with-hindi:ab/i18n
>>
>> I took the liberty of adding Ramkumar Ramachandra's hi.po patch to the
>> series.
>
> I think that the latter is "i18n-continue-with-hindi" (no "all")

Yes, sorry. It's just "ab/i18n-continue-with-hindi".

> and also suspect that ab/i18n-all-continue either hasn't be pushed
> out or is stale?

Yes sorry, I pushed to "ab/i18n-continue"
instead. "ab/i18n-all-continue" is now up-to-date (equivalent to
"ab/i18n-continue"). Sorry abuot the mixup.

> The copy of "all-continue" I just fetched ends with 2b5170f (gettextize:
> git-shortlog basic messages, 2010-09-05) while hindi^ is at c4adf2e
> (gettextize: git-am printf(1) message to eval_gettext, 2010-09-07).

The hindi^ one was the right tip.

> I haven't formed an opinion as to what to do with the *.po files after the
> series hits 'next' (or anything more stable than 'pu'); my preference is
> to delegate that part of the system to somebody who volunteers as an i18n
> coordinator, and pull from him/her from time to time, just like the way
> gitk and git-gui are managed.

We could certainly set up something like that. I going to wait and see
if we needed it before proposing such a thing.

After an initial spur of translation submissions po/ will probably
quiet down quickly. We aren't adding new strings that often, so
updating translations shouldn't represent much PATCH traffic on-list.

But it could be split up if that's preferred too.

> For now, I'll queue the whole thing and merge that to 'pu', but we would
> want to squash l10n commits after (but not including) 8d65a35 (gettext
> tests: test re-encoding with a UTF-8 msgid under Shell, 2010-08-30) that
> touch only one file in po/*.po into one commit per language, move them
> near the tip after all the infrastructure enhancements (and fix-ups to the
> infrastructure, if necessary) and individual command i18ns, to make the
> end result a reasonably complete and clean "first cut for public testing"
> of the series before it hits 'next'.

I can move those around, I didn't do so already because their position
in the series is semantically meaningful. I.e. at the time is.po is
added it's pretty much a 100% translation, but more strings are added
after that.

That's a trivial minor issue with msgmerge and msgfmt --statistics to
find out how much is translated though. So I've re-arranged them and
squashed 'em for you here:

    git://github.com/avar/git.git ab/i18n-for-junio

> As a companion update to 6495411 (gettext docs: add po/README file
> documenting Git's gettext, 2010-09-03), we would need a file in
> Documentation/ directory to describe the use of _() and N_() for
> programmers and point it from CodingGuidelines.

I can add that to ab/i18n-for-junio, but haven't already. Isn't it
better if I send that to the list for review instead of just tucking
something at the end of the series. I can do either.

> We might also want to move po/README to Documentation/ but I don't
> have strong preference either way.

I'd like to make it a manpage (as mentioned before), but i can't
figure out a good git-*.txt name for it.

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

* [PATCH 0/5] gettext docs: programmer docs in po/README
  2010-09-10 17:17         ` Ævar Arnfjörð Bjarmason
@ 2010-09-10 19:35           ` Ævar Arnfjörð Bjarmason
  2010-09-10 23:21             ` Ævar Arnfjörð Bjarmason
  2010-09-10 19:35           ` [PATCH 1/5] gettext docs: add a "Testing your changes" section to po/README Ævar Arnfjörð Bjarmason
                             ` (4 subsequent siblings)
  5 siblings, 1 reply; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 19:35 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

On Fri, Sep 10, 2010 at 17:17, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> On Fri, Sep 10, 2010 at 16:01, Junio C Hamano <gitster@pobox.com> wrote:
>> As a companion update to 6495411 (gettext docs: add po/README file
>> documenting Git's gettext, 2010-09-03), we would need a file in
>> Documentation/ directory to describe the use of _() and N_() for
>> programmers and point it from CodingGuidelines.
>
> I can add that to ab/i18n-for-junio, but haven't already. Isn't it
> better if I send that to the list for review instead of just tucking
> something at the end of the series. I can do either.

Here it is on top of ab/i18n-for-junio. These can also be fetched
from:

    git://github.com/avar/git.git ab/i18n-for-junio-with-docs

Ævar Arnfjörð Bjarmason (5):
  gettext docs: add a "Testing your changes" section to po/README
  gettext docs: add "Marking strings for translation" section in
    po/README
  gettext docs: the gettext.h C interface
  gettext docs: the git-sh-i18n.sh Shell interface
  gettext docs: the Git::I18N Perl interface

 Documentation/CodingGuidelines |    7 ++
 git-sh-i18n.sh                 |   16 +-----
 po/README                      |  125 +++++++++++++++++++++++++++++++++++++++-
 3 files changed, 133 insertions(+), 15 deletions(-)

-- 
1.7.2.3.313.gcd15

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

* [PATCH 1/5] gettext docs: add a "Testing your changes" section to po/README
  2010-09-10 17:17         ` Ævar Arnfjörð Bjarmason
  2010-09-10 19:35           ` [PATCH 0/5] gettext docs: programmer docs in po/README Ævar Arnfjörð Bjarmason
@ 2010-09-10 19:35           ` Ævar Arnfjörð Bjarmason
  2010-09-10 19:35           ` [PATCH 2/5] gettext docs: add "Marking strings for translation" section in po/README Ævar Arnfjörð Bjarmason
                             ` (3 subsequent siblings)
  5 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 19:35 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Change po/README to tell translators that they should do `make` at the
top-level before submitting their translations. Many common errors
will be caught with the `msgfmt --check` run that the Makefile will
compile the message catalogs with.

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

diff --git a/po/README b/po/README
index cca8012..4d23ca6 100644
--- a/po/README
+++ b/po/README
@@ -66,3 +66,17 @@ But then you need remember to remove the comments before you submit
 the file upstream:
 
     perl -pi -e 's/^#: .*\n//' XX.po
+
+
+Testing your changes
+--------------------
+
+Before you submit your changes go back to the top-level and do:
+
+    make
+
+On systems with GNU gettext (i.e. not Solaris) this will compile your
+changed PO file with `msgfmt --check`, the --check option flags many
+common errors, e.g. missing printf format strings, or translated
+messages that deviate from the originals in whether they begin/end
+with a newline or not.
-- 
1.7.2.3.313.gcd15

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

* [PATCH 2/5] gettext docs: add "Marking strings for translation" section in po/README
  2010-09-10 17:17         ` Ævar Arnfjörð Bjarmason
  2010-09-10 19:35           ` [PATCH 0/5] gettext docs: programmer docs in po/README Ævar Arnfjörð Bjarmason
  2010-09-10 19:35           ` [PATCH 1/5] gettext docs: add a "Testing your changes" section to po/README Ævar Arnfjörð Bjarmason
@ 2010-09-10 19:35           ` Ævar Arnfjörð Bjarmason
  2010-09-10 22:26             ` Junio C Hamano
  2010-09-10 19:35           ` [PATCH 3/5] gettext docs: the gettext.h C interface Ævar Arnfjörð Bjarmason
                             ` (2 subsequent siblings)
  5 siblings, 1 reply; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 19:35 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Add a "Marking strings for translation" section to po/README and
mention it in Documentation/CodingGuidelines.

This section documents how the maintainers of Git's source code should
go about properly marking strings for translation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 Documentation/CodingGuidelines |    7 ++++++
 po/README                      |   41 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index b8bf618..2e114d6 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -70,6 +70,10 @@ For shell scripts specifically (not exhaustive):
      are ERE elements not BRE (note that \? and \+ are not even part
      of BRE -- making them accessible from BRE is a GNU extension).
 
+ - Use Git's gettext wrappers in git-sh-i18n to make the user
+   interface translatable. See "Marking strings for translation" in
+   po/README.
+
 For C programs:
 
  - We use tabs to indent, and interpret tabs as taking up to
@@ -132,3 +136,6 @@ For C programs:
 
  - When we pass <string, length> pair to functions, we should try to
    pass them in that order.
+
+ - Use Git's gettext wrappers to make the user interface
+   translatable. See "Marking strings for translation" in po/README.
diff --git a/po/README b/po/README
index 4d23ca6..372cb9c 100644
--- a/po/README
+++ b/po/README
@@ -2,7 +2,8 @@ Core GIT Translations
 =====================
 
 This directory holds the translations for the core of Git. This
-document describes how to add to and maintain these translations.
+document describes how to add to and maintain these translations, and
+how to mark source strings for translation.
 
 
 Generating a .pot file
@@ -80,3 +81,41 @@ changed PO file with `msgfmt --check`, the --check option flags many
 common errors, e.g. missing printf format strings, or translated
 messages that deviate from the originals in whether they begin/end
 with a newline or not.
+
+
+Marking strings for translation
+-------------------------------
+
+Before strings can be translated they first have to be marked for
+translation.
+
+Git uses an internationalization interface that wraps the system's
+gettext library, so most of the advice in your gettext documentation
+(on GNU systems `info gettext` in a terminal) applies.
+
+General advice:
+
+ - Don't mark everything for translation, only strings which will be
+   read by humans (the porcelain interface) should be translated.
+
+   The output from Git's plumbing utilities will primarily be read by
+   programs and would break scripts under non-C locales. These strings
+   should not be translated.
+
+ - Adjust the strings so that they're easy to translate. Most of the
+   advice in `info '(gettext)Preparing Strings'` applies here.
+
+ - If something is unclear or ambiguous you can use a "TRANSLATORS"
+   comment to tell the translators what to make of it. These will be
+   extracted by xgettext(1) and put in the po/*.po files, e.g. from
+   git-am.sh:
+
+       # TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+       # in your translation. The program will only accept English
+       # input at this point.
+       gettext "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+
+   Or in C, from builtin/revert.c:
+
+       /* TRANSLATORS: %s will be "revert" or "cherry-pick" */
+       die(_("%s: Unable to write new index file"), me);
-- 
1.7.2.3.313.gcd15

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

* [PATCH 3/5] gettext docs: the gettext.h C interface
  2010-09-10 17:17         ` Ævar Arnfjörð Bjarmason
                             ` (2 preceding siblings ...)
  2010-09-10 19:35           ` [PATCH 2/5] gettext docs: add "Marking strings for translation" section in po/README Ævar Arnfjörð Bjarmason
@ 2010-09-10 19:35           ` Ævar Arnfjörð Bjarmason
  2010-09-10 22:30             ` Junio C Hamano
  2010-09-10 22:52             ` Junio C Hamano
  2010-09-10 19:35           ` [PATCH 4/5] gettext docs: the git-sh-i18n.sh Shell interface Ævar Arnfjörð Bjarmason
  2010-09-10 19:35           ` [PATCH 5/5] gettext docs: the Git::I18N Perl interface Ævar Arnfjörð Bjarmason
  5 siblings, 2 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 19:35 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Change po/README's "Marking strings for translation" section so that
it covers the gettext.h C interface.

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

diff --git a/po/README b/po/README
index 372cb9c..ac12637 100644
--- a/po/README
+++ b/po/README
@@ -119,3 +119,39 @@ General advice:
 
        /* TRANSLATORS: %s will be "revert" or "cherry-pick" */
        die(_("%s: Unable to write new index file"), me);
+
+We provide wrappers for C, Shell and Perl programs. Here's how they're
+used:
+
+C:
+
+ - Include builtin.h at the top, it'll pull in in gettext.h, which
+   defines the gettext interface. Consult with the list if you need to
+   use gettext.h directly.
+
+ - The C interface is a subset of the normal GNU gettext
+   interface. We currently export these functions:
+
+   - _()
+
+    Mark and translate a string. E.g.:
+
+        printf(_("HEAD is now at %s"), hex);
+
+   - N_()
+
+    A no-op pass-through macro for marking strings inside static
+    initializations, e.g.:
+        
+        static const char *reset_type_names[] = {
+            N_("mixed"), N_("soft"), N_("hard"), N_("merge"), N_("keep"), NULL
+        };
+        
+    And then, later:
+
+        die(_("%s reset is not allowed in a bare repository"),
+               _(reset_type_names[reset_type]));
+
+    Here _() couldn't have statically determined what the translation
+    string will be, but since it was already marked for translation
+    with N_() the look-up in the message catalog will succeed.
-- 
1.7.2.3.313.gcd15

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

* [PATCH 4/5] gettext docs: the git-sh-i18n.sh Shell interface
  2010-09-10 17:17         ` Ævar Arnfjörð Bjarmason
                             ` (3 preceding siblings ...)
  2010-09-10 19:35           ` [PATCH 3/5] gettext docs: the gettext.h C interface Ævar Arnfjörð Bjarmason
@ 2010-09-10 19:35           ` Ævar Arnfjörð Bjarmason
  2010-09-10 22:54             ` Junio C Hamano
  2010-09-10 19:35           ` [PATCH 5/5] gettext docs: the Git::I18N Perl interface Ævar Arnfjörð Bjarmason
  5 siblings, 1 reply; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 19:35 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Change po/README's "Marking strings for translation" section so that
it covers the git-sh-i18n.sh Shell interface.

The existing documentation in git-sh-i18n.sh has been moved to the
README file, to avoid them drifting in apart..

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-sh-i18n.sh |   16 ++--------------
 po/README      |   23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh
index b8b645a..f8dd43a 100644
--- a/git-sh-i18n.sh
+++ b/git-sh-i18n.sh
@@ -2,20 +2,8 @@
 #
 # 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.
+# This is Git's interface to gettext.sh. See po/README for usage
+# instructions.
 
 # Export the TEXTDOMAIN* data that we need for Git
 TEXTDOMAIN=git
diff --git a/po/README b/po/README
index ac12637..513cf32 100644
--- a/po/README
+++ b/po/README
@@ -155,3 +155,26 @@ C:
     Here _() couldn't have statically determined what the translation
     string will be, but since it was already marked for translation
     with N_() the look-up in the message catalog will succeed.
+
+Shell:
+
+ - The Git gettext shell interface is just a wrapper for
+   gettext.sh. Import it right after git-sh-setup like this:
+
+       . git-sh-setup
+       . git-sh-i18n
+
+   And then use the gettext or eval_gettext functions:
+
+       # For constant interface messages:
+       gettext "A message for the user"; echo
+
+       # To interpolate variables:
+       details="oh noes"
+       eval_gettext "An error occured: \$details"; echo
+
+   More documentation about the interface is available in the GNU info
+   page: `info '(gettext)sh'`. Looking at git-am.sh (the first shell
+   command to be translated) for examples is also useful:
+
+       git log --reverse -p --grep=gettextize git-am.sh
-- 
1.7.2.3.313.gcd15

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

* [PATCH 5/5] gettext docs: the Git::I18N Perl interface
  2010-09-10 17:17         ` Ævar Arnfjörð Bjarmason
                             ` (4 preceding siblings ...)
  2010-09-10 19:35           ` [PATCH 4/5] gettext docs: the git-sh-i18n.sh Shell interface Ævar Arnfjörð Bjarmason
@ 2010-09-10 19:35           ` Ævar Arnfjörð Bjarmason
  5 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 19:35 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Change po/README's "Marking strings for translation" section so that
it covers the Git::I18N Perl interface.

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

diff --git a/po/README b/po/README
index 513cf32..0d1cfa0 100644
--- a/po/README
+++ b/po/README
@@ -178,3 +178,14 @@ Shell:
    command to be translated) for examples is also useful:
 
        git log --reverse -p --grep=gettextize git-am.sh
+
+Perl:
+
+ - The Git::I18N module provides a limited subset of the
+   Locale::Messages functionality, e.g.:
+
+       use Git::I18N;
+       print __("Welcome to Git!\n");
+       printf __("The following error occured: %s\n"), $error;
+
+   Run `perldoc perl/Git/I18N.pm` for more info.
-- 
1.7.2.3.313.gcd15

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

* Re: [PATCH 2/5] gettext docs: add "Marking strings for translation" section in po/README
  2010-09-10 19:35           ` [PATCH 2/5] gettext docs: add "Marking strings for translation" section in po/README Ævar Arnfjörð Bjarmason
@ 2010-09-10 22:26             ` Junio C Hamano
  2010-09-10 22:31               ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 47+ messages in thread
From: Junio C Hamano @ 2010-09-10 22:26 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

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

> + - Don't mark everything for translation, only strings which will be
> +   read by humans (the porcelain interface) should be translated.
> +
> +   The output from Git's plumbing utilities will primarily be read by
> +   programs and would break scripts under non-C locales. These strings
> +   should not be translated.

Hmm, I had to re-read the above twice and then mentally annotate "would
break ... _if translated_" to make sense of the advice.  Perhaps other
people are much less dense than me?

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

* Re: [PATCH 3/5] gettext docs: the gettext.h C interface
  2010-09-10 19:35           ` [PATCH 3/5] gettext docs: the gettext.h C interface Ævar Arnfjörð Bjarmason
@ 2010-09-10 22:30             ` Junio C Hamano
  2010-09-10 22:53               ` Ævar Arnfjörð Bjarmason
  2010-09-10 22:52             ` Junio C Hamano
  1 sibling, 1 reply; 47+ messages in thread
From: Junio C Hamano @ 2010-09-10 22:30 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

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

> +C:
> +
> + - Include builtin.h at the top, it'll pull in in gettext.h, which
> +   defines the gettext interface.

Hmm, I would have thought that <git-compat-util.h> would be a much more
natural place for this kind of thing, not <builtin.h>.  Shouldn't you be
able to write a non-builtin Porcelain if you wanted to?

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

* Re: [PATCH 2/5] gettext docs: add "Marking strings for translation" section in po/README
  2010-09-10 22:26             ` Junio C Hamano
@ 2010-09-10 22:31               ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 22:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Fri, Sep 10, 2010 at 22:26, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> + - Don't mark everything for translation, only strings which will be
>> +   read by humans (the porcelain interface) should be translated.
>> +
>> +   The output from Git's plumbing utilities will primarily be read by
>> +   programs and would break scripts under non-C locales. These strings
>> +   should not be translated.
>
> Hmm, I had to re-read the above twice and then mentally annotate "would
> break ... _if translated_" to make sense of the advice.  Perhaps other
> people are much less dense than me?

No, that "... if translated" wording is better.

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

* Re: [PATCH 3/5] gettext docs: the gettext.h C interface
  2010-09-10 19:35           ` [PATCH 3/5] gettext docs: the gettext.h C interface Ævar Arnfjörð Bjarmason
  2010-09-10 22:30             ` Junio C Hamano
@ 2010-09-10 22:52             ` Junio C Hamano
  2010-09-10 23:03               ` Ævar Arnfjörð Bjarmason
  2010-09-10 23:06               ` Junio C Hamano
  1 sibling, 2 replies; 47+ messages in thread
From: Junio C Hamano @ 2010-09-10 22:52 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

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

> +   - _()
> +
> +    Mark and translate a string. E.g.:
> +
> +        printf(_("HEAD is now at %s"), hex);
> +
> +   - N_()
> +
> +    A no-op pass-through macro for marking strings inside static
> +    initializations, e.g.:
> +        
> +        static const char *reset_type_names[] = {
> +            N_("mixed"), N_("soft"), N_("hard"), N_("merge"), N_("keep"), NULL
> +        };
> +        
> +    And then, later:
> +
> +        die(_("%s reset is not allowed in a bare repository"),
> +               _(reset_type_names[reset_type]));

I do not think this is a very good example.  Unless we are doing l10n of
option names, a Portuguese won't be typing "git reset --misto", so there
is no point in invoking _(reset_type_names[]) to begin with, and there is
no need to mark mixed/soft/hard/... for translation.

And we won't be doing l10n of option names or subcommand names, I hope ;-).

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

* Re: [PATCH 3/5] gettext docs: the gettext.h C interface
  2010-09-10 22:30             ` Junio C Hamano
@ 2010-09-10 22:53               ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 22:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Fri, Sep 10, 2010 at 22:30, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> +C:
>> +
>> + - Include builtin.h at the top, it'll pull in in gettext.h, which
>> +   defines the gettext interface.
>
> Hmm, I would have thought that <git-compat-util.h> would be a much more
> natural place for this kind of thing, not <builtin.h>.  Shouldn't you be
> able to write a non-builtin Porcelain if you wanted to?

I don't know, I just put it in builtin.h for the builtin/*.c commands,
the rest of the porcelain stuff should all have gettext.h already.

Maybe gettext.h should be in git-compat-util.h, I don't know.

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

* Re: [PATCH 4/5] gettext docs: the git-sh-i18n.sh Shell interface
  2010-09-10 19:35           ` [PATCH 4/5] gettext docs: the git-sh-i18n.sh Shell interface Ævar Arnfjörð Bjarmason
@ 2010-09-10 22:54             ` Junio C Hamano
  2010-09-10 22:58               ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 47+ messages in thread
From: Junio C Hamano @ 2010-09-10 22:54 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

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

> +       git log --reverse -p --grep=gettextize git-am.sh

Running this from the tip of ab/i18n reveals that one commit introduces a
whitespace breakage ;-).

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

* Re: [PATCH 4/5] gettext docs: the git-sh-i18n.sh Shell interface
  2010-09-10 22:54             ` Junio C Hamano
@ 2010-09-10 22:58               ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 22:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Fri, Sep 10, 2010 at 22:54, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> +       git log --reverse -p --grep=gettextize git-am.sh
>
> Running this from the tip of ab/i18n reveals that one commit introduces a
> whitespace breakage ;-).

That breakage was actually intentional (and I *think* I noted it
somewhere). The existing "Did you hand edit your patch" in git-am.sh
already indented with spaces, and I didn't change it while I was at it
to keep the patch on-topic.

I was going to fix a whitespace fixup later.

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

* Re: [PATCH 3/5] gettext docs: the gettext.h C interface
  2010-09-10 22:52             ` Junio C Hamano
@ 2010-09-10 23:03               ` Ævar Arnfjörð Bjarmason
  2010-09-10 23:06               ` Junio C Hamano
  1 sibling, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 23:03 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Fri, Sep 10, 2010 at 22:52, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> +   - _()
>> +
>> +    Mark and translate a string. E.g.:
>> +
>> +        printf(_("HEAD is now at %s"), hex);
>> +
>> +   - N_()
>> +
>> +    A no-op pass-through macro for marking strings inside static
>> +    initializations, e.g.:
>> +
>> +        static const char *reset_type_names[] = {
>> +            N_("mixed"), N_("soft"), N_("hard"), N_("merge"), N_("keep"), NULL
>> +        };
>> +
>> +    And then, later:
>> +
>> +        die(_("%s reset is not allowed in a bare repository"),
>> +               _(reset_type_names[reset_type]));
>
> I do not think this is a very good example.  Unless we are doing l10n of
> option names, a Portuguese won't be typing "git reset --misto", so there
> is no point in invoking _(reset_type_names[]) to begin with, and there is
> no need to mark mixed/soft/hard/... for translation.

Actually all the code that uses reset_type_names isn't referring to
the option directly, but to the action currently being undertaken:

    die(_("Cannot do a %s reset in the middle of a merge."),
        _(reset_type_names[reset_type]));

    die(_("Cannot do %s reset with paths."),
        _(reset_type_names[reset_type]));

    die(_("%s reset is not allowed in a bare repository"),
        _(reset_type_names[reset_type]));

In that context translators probably want to translate them, e.g. I'd
translate the first one into Icelandic as:

    "Get ekki framkvæmt %s endurstillingu í miðri sameiningu" with %s
== "blandaða" ("mixed")

> And we won't be doing l10n of option names or subcommand names, I hope ;-).

We could do that, I don't have plans for it though, and in any case I
don't think this is such a case.

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

* Re: [PATCH 3/5] gettext docs: the gettext.h C interface
  2010-09-10 22:52             ` Junio C Hamano
  2010-09-10 23:03               ` Ævar Arnfjörð Bjarmason
@ 2010-09-10 23:06               ` Junio C Hamano
  2010-09-10 23:16                 ` Ævar Arnfjörð Bjarmason
  1 sibling, 1 reply; 47+ messages in thread
From: Junio C Hamano @ 2010-09-10 23:06 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

Junio C Hamano <gitster@pobox.com> writes:

> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
> ...
>> +        static const char *reset_type_names[] = {
>> +            N_("mixed"), N_("soft"), N_("hard"), N_("merge"), N_("keep"), NULL
>> +        };
>> +        
>> +    And then, later:
>> +
>> +        die(_("%s reset is not allowed in a bare repository"),
>> +               _(reset_type_names[reset_type]));
>
> I do not think this is a very good example.  Unless we are doing l10n of
> option names, a Portuguese won't be typing "git reset --misto", so there
> is no point in invoking _(reset_type_names[]) to begin with, and there is
> no need to mark mixed/soft/hard/... for translation.

Ahh, I think I should take half of what I said back.  The line of thought
here is that

 (1) the user types "git reset --mixed"; no l10n of option names;

 (2) however, various modes of operations in "reset" command have
     human-readable names, not necessarily cuttable-and-pastable for
     machine consumption.  E.g. "git reset --mixed" is called "mixed
     reset" in English and that is primarily meant to be explanation of
     concept in human language, i.e. should be translated.

Under that assumption, localizing reset_type_names[] in the above may make
sense.

I said "half of", because I think the example is still problematic if you
want to translate to a language where "reset" in the fixed part of the
die() message may need to be spelled differently depending on what
adjective in reset_type_names[] it takes (or the word order between the
noun "reset" and the adjective may have to be different depending on what
the adjective is), so an example may probaby need to be more like:

    static const char *error_msgs[] = {
        N_("mixed reset is not allowed..."),
        N_("soft reset is not allowed..."),
        ...
    };

    die("%s", _(error_msgs[reset_type]));

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

* Re: [PATCH 3/5] gettext docs: the gettext.h C interface
  2010-09-10 23:06               ` Junio C Hamano
@ 2010-09-10 23:16                 ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 23:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Fri, Sep 10, 2010 at 23:06, Junio C Hamano <gitster@pobox.com> wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>> ...
>>> +        static const char *reset_type_names[] = {
>>> +            N_("mixed"), N_("soft"), N_("hard"), N_("merge"), N_("keep"), NULL
>>> +        };
>>> +
>>> +    And then, later:
>>> +
>>> +        die(_("%s reset is not allowed in a bare repository"),
>>> +               _(reset_type_names[reset_type]));
>>
>> I do not think this is a very good example.  Unless we are doing l10n of
>> option names, a Portuguese won't be typing "git reset --misto", so there
>> is no point in invoking _(reset_type_names[]) to begin with, and there is
>> no need to mark mixed/soft/hard/... for translation.
>
> Ahh, I think I should take half of what I said back.  The line of thought
> here is that
>
>  (1) the user types "git reset --mixed"; no l10n of option names;
>
>  (2) however, various modes of operations in "reset" command have
>     human-readable names, not necessarily cuttable-and-pastable for
>     machine consumption.  E.g. "git reset --mixed" is called "mixed
>     reset" in English and that is primarily meant to be explanation of
>     concept in human language, i.e. should be translated.
>
> Under that assumption, localizing reset_type_names[] in the above may make
> sense.

Yeah.

> I said "half of", because I think the example is still problematic if you
> want to translate to a language where "reset" in the fixed part of the
> die() message may need to be spelled differently depending on what
> adjective in reset_type_names[] it takes (or the word order between the
> noun "reset" and the adjective may have to be different depending on what
> the adjective is), so an example may probaby need to be more like:
>
>    static const char *error_msgs[] = {
>        N_("mixed reset is not allowed..."),
>        N_("soft reset is not allowed..."),
>        ...
>    };
>
>    die("%s", _(error_msgs[reset_type]));

That, or we could also solve issues like that to some extent by using
the gettext message context, which the limited gettext.h API doesn't
support yet, it's probably not useful in this case but in others you
could do:

    _("reset-verb", "mixed")

And elsewhere:

    _("reset-noun", "mixed")

And that would turn into:

    msgctxt "reset-verb"
    msgid "mixed"
    msgstr "blandað"

Or something like that.

Anyway, regarding the examples it's the only one of two N_() uses
right now, and the builtin/notes.c example is more subtle, and needs
more explanation.

So out of lazyness I'd prefer to keep it as-is for now.

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

* Re: [PATCH 0/5] gettext docs: programmer docs in po/README
  2010-09-10 19:35           ` [PATCH 0/5] gettext docs: programmer docs in po/README Ævar Arnfjörð Bjarmason
@ 2010-09-10 23:21             ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 47+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-10 23:21 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

On Fri, Sep 10, 2010 at 19:35, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> On Fri, Sep 10, 2010 at 17:17, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
>> On Fri, Sep 10, 2010 at 16:01, Junio C Hamano <gitster@pobox.com> wrote:
>>> As a companion update to 6495411 (gettext docs: add po/README file
>>> documenting Git's gettext, 2010-09-03), we would need a file in
>>> Documentation/ directory to describe the use of _() and N_() for
>>> programmers and point it from CodingGuidelines.
>>
>> I can add that to ab/i18n-for-junio, but haven't already. Isn't it
>> better if I send that to the list for review instead of just tucking
>> something at the end of the series. I can do either.
>
> Here it is on top of ab/i18n-for-junio. These can also be fetched
> from:
>
>    git://github.com/avar/git.git ab/i18n-for-junio-with-docs

I fixed the wording on this as suggested by Junio, and a trivial
whitespace issue, but not the N_() example.

This ref can replace the existing ab/i18n ref in pu.

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

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

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 16:45 [PATCH 00/20] [CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
2010-09-07 16:45 ` [PATCH 01/20] gettextize: git-clean clean.requireForce braces Ævar Arnfjörð Bjarmason
2010-09-07 16:45 ` [PATCH 02/20] gettextize: git-clone "Cloning into" message braces Ævar Arnfjörð Bjarmason
2010-09-07 16:47 ` [PATCH 04/20] Makefile: add GNU_GETTEXT, set when we expect GNU gettext Ævar Arnfjörð Bjarmason
2010-09-07 16:47 ` [PATCH 05/20] Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT Ævar Arnfjörð Bjarmason
2010-09-07 16:47 ` [PATCH 06/20] Revert "gettextize: git-revert mark the "me" variable for translation" Ævar Arnfjörð Bjarmason
2010-09-07 16:47 ` [PATCH 07/20] gettextize: git-revert "Your local changes" message Ævar Arnfjörð Bjarmason
2010-09-07 16:47 ` [PATCH 08/20] gettextize: git-revert literal "me" messages Ævar Arnfjörð Bjarmason
2010-09-07 16:47 ` [PATCH 09/20] gettext: add GETTEXT_POISON support for shell scripts Ævar Arnfjörð Bjarmason
2010-09-07 16:48 ` [PATCH 10/20] gettext: add GETTEXT_POISON tests " Ævar Arnfjörð Bjarmason
2010-09-07 16:48 ` [PATCH 11/20] gettextize: git-am add git-sh-i18n Ævar Arnfjörð Bjarmason
2010-09-07 16:48 ` [PATCH 12/20] gettextize: git-am one-line gettext $msg; echo Ævar Arnfjörð Bjarmason
2010-09-07 16:48 ` [PATCH 13/20] gettextize: git-am multi-line getttext " Ævar Arnfjörð Bjarmason
2010-09-07 16:48 ` [PATCH 14/20] gettextize: git-am eval_gettext messages Ævar Arnfjörð Bjarmason
2010-09-07 16:48 ` [PATCH 15/20] gettextize: git-am die messages Ævar Arnfjörð Bjarmason
2010-09-07 16:48 ` [PATCH 16/20] gettextize: git-am cannot_fallback messages Ævar Arnfjörð Bjarmason
2010-09-07 16:48 ` [PATCH 17/20] gettextize: git-am clean_abort messages Ævar Arnfjörð Bjarmason
2010-09-07 16:48 ` [PATCH 18/20] gettextize: git-am "Apply?" message Ævar Arnfjörð Bjarmason
2010-09-07 16:48 ` [PATCH 19/20] gettextize: git-am core say messages Ævar Arnfjörð Bjarmason
2010-09-07 16:50 ` [PATCH 20/20] gettextize: git-am printf(1) message to eval_gettext Ævar Arnfjörð Bjarmason
2010-09-07 20:10   ` Jonathan Nieder
2010-09-07 20:29     ` Ævar Arnfjörð Bjarmason
2010-09-07 20:32       ` Jonathan Nieder
2010-09-07 20:46   ` [PATCH v2 " Ævar Arnfjörð Bjarmason
2010-09-07 20:45 ` [PATCH v2 19/20] gettextize: git-am core say messages Ævar Arnfjörð Bjarmason
2010-09-08 16:43 ` [PATCH 00/20] [CONTINUE] Add gettext support to Git Junio C Hamano
2010-09-08 23:32   ` Ævar Arnfjörð Bjarmason
2010-09-10 12:00     ` Ævar Arnfjörð Bjarmason
2010-09-10 16:01       ` Junio C Hamano
2010-09-10 17:17         ` Ævar Arnfjörð Bjarmason
2010-09-10 19:35           ` [PATCH 0/5] gettext docs: programmer docs in po/README Ævar Arnfjörð Bjarmason
2010-09-10 23:21             ` Ævar Arnfjörð Bjarmason
2010-09-10 19:35           ` [PATCH 1/5] gettext docs: add a "Testing your changes" section to po/README Ævar Arnfjörð Bjarmason
2010-09-10 19:35           ` [PATCH 2/5] gettext docs: add "Marking strings for translation" section in po/README Ævar Arnfjörð Bjarmason
2010-09-10 22:26             ` Junio C Hamano
2010-09-10 22:31               ` Ævar Arnfjörð Bjarmason
2010-09-10 19:35           ` [PATCH 3/5] gettext docs: the gettext.h C interface Ævar Arnfjörð Bjarmason
2010-09-10 22:30             ` Junio C Hamano
2010-09-10 22:53               ` Ævar Arnfjörð Bjarmason
2010-09-10 22:52             ` Junio C Hamano
2010-09-10 23:03               ` Ævar Arnfjörð Bjarmason
2010-09-10 23:06               ` Junio C Hamano
2010-09-10 23:16                 ` Ævar Arnfjörð Bjarmason
2010-09-10 19:35           ` [PATCH 4/5] gettext docs: the git-sh-i18n.sh Shell interface Ævar Arnfjörð Bjarmason
2010-09-10 22:54             ` Junio C Hamano
2010-09-10 22:58               ` Ævar Arnfjörð Bjarmason
2010-09-10 19:35           ` [PATCH 5/5] gettext docs: the Git::I18N Perl interface Ævar Arnfjörð Bjarmason

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.