git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC 00/20] gettextize: git-stash & git-bisect
@ 2010-09-14 13:52 Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 01/20] gettextize: git-stash add git-sh-i18n Ævar Arnfjörð Bjarmason
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

This is an RFC on a series that makes git-stash.sh and git-bisect.sh
translatable. With this git-rebase is the only mainporcelain command
that isn't translatable (soon to be fixed).

I'll be folding this into the next version of the ab/i18n series I'll
be sending to Junio. No need to apply it to the current one.

Note that this isn't diff --check clean, because the code I'm altering
wasn't:

    git-bisect.sh:117: indent with spaces.
    +                       die "$(eval_gettext "'\$arg' does not appear to be a valid revision")"
    git-bisect.sh:190: indent with spaces.
    +                revs=$(git rev-list "$arg") || die "$(eval_gettext "Bad rev input: \$arg")" ;;

Patches to fix these whitespace issues can come later after the i18n
series is applied.

Ævar Arnfjörð Bjarmason (20):
  gettextize: git-stash add git-sh-i18n
  gettextize: git-stash echo + gettext message
  gettextize: git-stash say + gettext messages
  gettextize: git-stash die + gettext messages
  gettextize: git-stash die + eval_gettext messages
  gettextize: git-stash die + eval_gettext $* messages
  gettextize: git-stash die + eval_gettext $1 messages
  gettextize: git-stash "unknown option" message
  gettextize: git-stash drop_stash say/die messages
  gettextize: git-bisect add git-sh-i18n
  gettextize: git-bisect gettext + echo message
  gettextize: git-bisect echo + gettext messages
  gettextize: git-bisect echo + eval_gettext message
  gettextize: git-bisect die + gettext messages
  gettextize: git-bisect die + eval_gettext messages
  gettextize: git-bisect bisect_run + $@ messages
  gettextize: git-bisect bisect_reset + $1 messages
  gettextize: git-bisect bisect_replay + $1 messages
  gettextize: git-bisect [Y/n] messages
  gettextize: git-bisect bisect_next_check "You need to" message

 git-bisect.sh |   84 ++++++++++++++++++++++++++++++++------------------------
 git-stash.sh  |   75 +++++++++++++++++++++++++++++++-------------------
 2 files changed, 94 insertions(+), 65 deletions(-)

-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 01/20] gettextize: git-stash add git-sh-i18n
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 02/20] gettextize: git-stash echo + gettext message Ævar Arnfjörð Bjarmason
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-stash.sh b/git-stash.sh
index 7ce818b..e89a629 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -13,6 +13,7 @@ USAGE="list [<options>]
 SUBDIRECTORY_OK=Yes
 OPTIONS_SPEC=
 . git-sh-setup
+. git-sh-i18n
 require_work_tree
 cd_to_toplevel
 
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 02/20] gettextize: git-stash echo + gettext message
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 01/20] gettextize: git-stash add git-sh-i18n Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 03/20] gettextize: git-stash say + gettext messages Ævar Arnfjörð Bjarmason
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-stash.sh b/git-stash.sh
index e89a629..efffdce 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -408,7 +408,7 @@ apply_stash () {
 		status=$?
 		if test -n "$INDEX_OPTION"
 		then
-			echo >&2 'Index was not unstashed.'
+			echo >&2 "$(gettext "Index was not unstashed.")"
 		fi
 		exit $status
 	fi
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 03/20] gettextize: git-stash say + gettext messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 01/20] gettextize: git-stash add git-sh-i18n Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 02/20] gettextize: git-stash echo + gettext message Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 04/20] gettextize: git-stash die " Ævar Arnfjörð Bjarmason
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-stash.sh b/git-stash.sh
index efffdce..78f392a 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -167,7 +167,7 @@ save_stash () {
 	git update-index -q --refresh
 	if no_changes
 	then
-		say 'No local changes to save'
+		say "$(gettext "No local changes to save")"
 		exit 0
 	fi
 	test -f "$GIT_DIR/logs/$ref_stash" ||
@@ -503,7 +503,7 @@ branch)
 	case $# in
 	0)
 		save_stash &&
-		say '(To restore them type "git stash apply")'
+		say "$(gettext "(To restore them type \"git stash apply\")")"
 		;;
 	*)
 		usage
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 04/20] gettextize: git-stash die + gettext messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (2 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 03/20] gettextize: git-stash say + gettext messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 05/20] gettextize: git-stash die + eval_gettext messages Ævar Arnfjörð Bjarmason
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-stash.sh b/git-stash.sh
index 78f392a..3a0f917 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -38,7 +38,7 @@ no_changes () {
 clear_stash () {
 	if test $# != 0
 	then
-		die "git stash clear with parameters is unimplemented"
+		die "$(gettext "git stash clear with parameters is unimplemented")"
 	fi
 	if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
 	then
@@ -60,7 +60,7 @@ create_stash () {
 	then
 		head=$(git rev-list --oneline -n 1 HEAD --)
 	else
-		die "You do not have the initial commit yet"
+		die "$(gettext "You do not have the initial commit yet")"
 	fi
 
 	if branch=$(git symbolic-ref -q HEAD)
@@ -75,7 +75,7 @@ create_stash () {
 	i_tree=$(git write-tree) &&
 	i_commit=$(printf 'index on %s\n' "$msg" |
 		git commit-tree $i_tree -p $b_commit) ||
-		die "Cannot save the current index state"
+		die "$(gettext "Cannot save the current index state")"
 
 	if test -z "$patch_mode"
 	then
@@ -91,7 +91,7 @@ create_stash () {
 			git write-tree &&
 			rm -f "$TMP-index"
 		) ) ||
-			die "Cannot save the current worktree state"
+			die "$(gettext "Cannot save the current worktree state")"
 
 	else
 
@@ -104,14 +104,14 @@ create_stash () {
 
 		# state of the working tree
 		w_tree=$(GIT_INDEX_FILE="$TMP-index" git write-tree) ||
-		die "Cannot save the current worktree state"
+		die "$(gettext "Cannot save the current worktree state")"
 
 		git diff-tree -p HEAD $w_tree > "$TMP-patch" &&
 		test -s "$TMP-patch" ||
-		die "No changes selected"
+		die "$(gettext "No changes selected")"
 
 		rm -f "$TMP-index" ||
-		die "Cannot remove temporary index (can't happen)"
+		die "$(gettext "Cannot remove temporary index (can't happen)")"
 
 	fi
 
@@ -124,7 +124,7 @@ create_stash () {
 	fi
 	w_commit=$(printf '%s\n' "$stash_msg" |
 		git commit-tree $w_tree -p $b_commit -p $i_commit) ||
-		die "Cannot record working tree state"
+		die "$(gettext "Cannot record working tree state")"
 }
 
 save_stash () {
@@ -171,7 +171,7 @@ save_stash () {
 		exit 0
 	fi
 	test -f "$GIT_DIR/logs/$ref_stash" ||
-		clear_stash || die "Cannot initialize stash"
+		clear_stash || die "$(gettext "Cannot initialize stash")"
 
 	create_stash "$stash_msg"
 
@@ -179,7 +179,7 @@ save_stash () {
 	: >>"$GIT_DIR/logs/$ref_stash"
 
 	git update-ref -m "$stash_msg" $ref_stash $w_commit ||
-		die "Cannot save the current status"
+		die "$(gettext "Cannot save the current status")"
 	say Saved working directory and index state "$stash_msg"
 
 	if test -z "$patch_mode"
@@ -192,7 +192,7 @@ save_stash () {
 		fi
 	else
 		git apply -R < "$TMP-patch" ||
-		die "Cannot remove worktree changes"
+		die "$(gettext "Cannot remove worktree changes")"
 
 		if test -z "$keep_index"
 		then
@@ -294,7 +294,7 @@ parse_flags_and_rev()
 
 	case $# in
 		0)
-			have_stash || die "No stash found."
+			have_stash || die "$(gettext "No stash found.")"
 			set -- ${ref_stash}@{0}
 		;;
 		1)
@@ -354,11 +354,11 @@ apply_stash () {
 
 	git update-index -q --refresh &&
 	git diff-files --quiet --ignore-submodules ||
-		die 'Cannot apply to a dirty working tree, please stage your changes'
+		die "$(gettext "Cannot apply to a dirty working tree, please stage your changes")"
 
 	# current index state
 	c_tree=$(git write-tree) ||
-		die 'Cannot apply a stash in the middle of a merge'
+		die "$(gettext "Cannot apply a stash in the middle of a merge")"
 
 	unstashed_index_tree=
 	if test -n "$INDEX_OPTION" && test "$b_tree" != "$i_tree" &&
@@ -366,9 +366,9 @@ apply_stash () {
 	then
 		git diff-tree --binary $s^2^..$s^2 | git apply --cached
 		test $? -ne 0 &&
-			die 'Conflicts in index. Try without --index.'
+			die "$(gettext "Conflicts in index. Try without --index.")"
 		unstashed_index_tree=$(git write-tree) ||
-			die 'Could not save index tree'
+			die "$(gettext "Could not save index tree")"
 		git reset
 	fi
 
@@ -394,7 +394,7 @@ apply_stash () {
 			git diff-index --cached --name-only --diff-filter=A $c_tree >"$a" &&
 			git read-tree --reset $c_tree &&
 			git update-index --add --stdin <"$a" ||
-				die "Cannot unstage modified files"
+				die "$(gettext "Cannot unstage modified files")"
 			rm -f "$a"
 		fi
 		squelch=
@@ -432,7 +432,7 @@ drop_stash () {
 }
 
 apply_to_branch () {
-	test -n "$1" || die 'No branch name specified'
+	test -n "$1" || die "$(gettext "No branch name specified")"
 	branch=$1
 	shift 1
 
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 05/20] gettextize: git-stash die + eval_gettext messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (3 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 04/20] gettextize: git-stash die " Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 06/20] gettextize: git-stash die + eval_gettext $* messages Ævar Arnfjörð Bjarmason
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-stash.sh b/git-stash.sh
index 3a0f917..38720b8 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -301,7 +301,7 @@ parse_flags_and_rev()
 			:
 		;;
 		*)
-			die "Too many revisions specified: $REV"
+			die "$(eval_gettext "Too many revisions specified: \$REV")"
 		;;
 	esac
 
@@ -325,7 +325,7 @@ parse_flags_and_rev()
 		# this condition with a non-zero status code but as of 1.7.2.1 it
 		# it did not. So, we use non-empty stderr output as a proxy for the
 		# condition of interest.
-		test -z "$(git rev-parse "$REV" 2>&1 >/dev/null)" || die "$REV does not exist in the stash log"
+		test -z "$(git rev-parse "$REV" 2>&1 >/dev/null)" || die "$(eval_gettext "\$REV does not exist in the stash log")"
 	fi
 
 }
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 06/20] gettextize: git-stash die + eval_gettext $* messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (4 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 05/20] gettextize: git-stash die + eval_gettext messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 07/20] gettextize: git-stash die + eval_gettext $1 messages Ævar Arnfjörð Bjarmason
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Gettextize messages that used the $* variable. Since it's subroutine
local we have to provide an alias for it for eval_gettext.

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

diff --git a/git-stash.sh b/git-stash.sh
index 38720b8..f3ea9e8 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -337,7 +337,10 @@ is_stash_like()
 }
 
 assert_stash_like() {
-	is_stash_like "$@" || die "'$*' is not a stash-like commit"
+	is_stash_like "$@" || {
+		args="$*"
+		die "$(eval_gettext "'\$args' is not a stash-like commit")"
+	}
 }
 
 is_stash_ref() {
@@ -345,7 +348,10 @@ is_stash_ref() {
 }
 
 assert_stash_ref() {
-	is_stash_ref "$@" || die "'$*' is not a stash reference"
+	is_stash_ref "$@" || {
+		args="$*"
+		die "$(eval_gettext "'\$args' is not a stash reference")"
+	}
 }
 
 apply_stash () {
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 07/20] gettextize: git-stash die + eval_gettext $1 messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (5 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 06/20] gettextize: git-stash die + eval_gettext $* messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 08/20] gettextize: git-stash "unknown option" message Ævar Arnfjörð Bjarmason
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Gettextize a messages that used the $1 variable. Since it's subroutine
local we have to provide an alias for it for eval_gettext.

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

diff --git a/git-stash.sh b/git-stash.sh
index f3ea9e8..7c005d3 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -305,7 +305,10 @@ parse_flags_and_rev()
 		;;
 	esac
 
-	REV=$(git rev-parse --quiet --symbolic --verify $1 2>/dev/null) || die "$1 is not valid reference"
+	REV=$(git rev-parse --quiet --symbolic --verify $1 2>/dev/null) || {
+		reference="$1"
+		die "$(eval_gettext "\$reference is not valid reference")"
+	}
 
 	i_commit=$(git rev-parse --quiet --verify $REV^2 2>/dev/null) &&
 	set -- $(git rev-parse $REV $REV^1 $REV: $REV^1: $REV^2: 2>/dev/null) &&
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 08/20] gettextize: git-stash "unknown option" message
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (6 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 07/20] gettextize: git-stash die + eval_gettext $1 messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 09/20] gettextize: git-stash drop_stash say/die messages Ævar Arnfjörð Bjarmason
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Gettextize the "unknown option for 'stash save'" message that's shown
on:

    $ git stash save --blah-blah
    error: unknown option for 'stash save': --blah-blah
           To provide a message, use git stash save -- '--blah-blah'
    Usage: git stash list [<options>]

In a translation the second line should be aligned with the first
one. I've added a TRANSLATORS comment to indicate this.

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

diff --git a/git-stash.sh b/git-stash.sh
index 7c005d3..63885a3 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -151,8 +151,14 @@ save_stash () {
 			break
 			;;
 		-*)
-			echo "error: unknown option for 'stash save': $1"
-			echo "       To provide a message, use git stash save -- '$1'"
+			option="$1"
+			# TRANSLATORS: $option is an invalid option, like
+			# `--blah-blah'. The 7 spaces at the beginning of the
+			# second line correspond to "error: ". So you should line
+			# up the second line with however many characters the
+			# translation of "error: " takes in your language.
+			eval_gettext "$("error: unknown option for 'stash save': \$option
+       To provide a message, use git stash save -- '\$option'")"; echo
 			usage
 			;;
 		*)
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 09/20] gettextize: git-stash drop_stash say/die messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (7 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 08/20] gettextize: git-stash "unknown option" message Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 10/20] gettextize: git-bisect add git-sh-i18n Ævar Arnfjörð Bjarmason
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Gettextize the say/die eval_gettext messages in the drop_stash
function. Since making these translatable would result in a long line
I've wrapped this into two lines.

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

diff --git a/git-stash.sh b/git-stash.sh
index 63885a3..36d821b 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -440,7 +440,8 @@ drop_stash () {
 	assert_stash_ref "$@"
 
 	git reflog delete --updateref --rewrite "${REV}" &&
-		say "Dropped ${REV} ($s)" || die "${REV}: Could not drop stash entry"
+		say "$(eval_gettext "Dropped \${REV} (\$s)")" ||
+		die "$(eval_gettext "\${REV}: Could not drop stash entry")"
 
 	# clear_stash if we just dropped the last stash entry
 	git rev-parse --verify "$ref_stash@{0}" > /dev/null 2>&1 || clear_stash
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 10/20] gettextize: git-bisect add git-sh-i18n
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (8 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 09/20] gettextize: git-stash drop_stash say/die messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 11/20] gettextize: git-bisect gettext + echo message Ævar Arnfjörð Bjarmason
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-bisect.sh b/git-bisect.sh
index 6e2acb8..d0d95f6 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -28,6 +28,7 @@ Please use "git help bisect" to get the full man page.'
 
 OPTIONS_SPEC=
 . git-sh-setup
+. git-sh-i18n
 require_work_tree
 
 _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 11/20] gettextize: git-bisect gettext + echo message
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (9 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 10/20] gettextize: git-bisect add git-sh-i18n Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 12/20] gettextize: git-bisect echo + gettext messages Ævar Arnfjörð Bjarmason
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-bisect.sh b/git-bisect.sh
index d0d95f6..1274f11 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -306,7 +306,7 @@ bisect_visualize() {
 
 bisect_reset() {
 	test -s "$GIT_DIR/BISECT_START" || {
-		echo "We are not bisecting."
+		gettext "We are not bisecting."; echo
 		return
 	}
 	case "$#" in
@@ -406,7 +406,7 @@ bisect_run () {
       fi
 
       if sane_grep "is the first bad commit" "$GIT_DIR/BISECT_RUN" > /dev/null; then
-	  echo "bisect run success"
+	  gettext "bisect run success"; echo
 	  exit 0;
       fi
 
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 12/20] gettextize: git-bisect echo + gettext messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (10 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 11/20] gettextize: git-bisect gettext + echo message Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 13/20] gettextize: git-bisect echo + eval_gettext message Ævar Arnfjörð Bjarmason
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-bisect.sh b/git-bisect.sh
index 1274f11..4920878 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -36,7 +36,7 @@ _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
 
 bisect_autostart() {
 	test -s "$GIT_DIR/BISECT_START" || {
-		echo >&2 'You need to start by "git bisect start"'
+		echo >&2 "$(gettext "You need to start by \"git bisect start\"")"
 		if test -t 0
 		then
 			echo >&2 -n 'Do you want me to do it for you [Y/n]? '
@@ -239,7 +239,7 @@ bisect_next_check() {
 	t,,good)
 		# have bad but not good.  we could bisect although
 		# this is less optimum.
-		echo >&2 'Warning: bisecting only with a bad commit.'
+		echo >&2 "$(gettext "Warning: bisecting only with a bad commit.")"
 		if test -t 0
 		then
 			printf >&2 'Are you sure [Y/n]? '
@@ -395,7 +395,7 @@ bisect_run () {
 
       if sane_grep "first bad commit could be any of" "$GIT_DIR/BISECT_RUN" \
 		> /dev/null; then
-	  echo >&2 "bisect run cannot continue any more"
+	  echo >&2 "$(gettext "bisect run cannot continue any more")"
 	  exit $res
       fi
 
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 13/20] gettextize: git-bisect echo + eval_gettext message
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (11 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 12/20] gettextize: git-bisect echo + gettext messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 14/20] gettextize: git-bisect die + gettext messages Ævar Arnfjörð Bjarmason
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-bisect.sh b/git-bisect.sh
index 4920878..c294819 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -400,8 +400,8 @@ bisect_run () {
       fi
 
       if [ $res -ne 0 ]; then
-	  echo >&2 "bisect run failed:"
-	  echo >&2 "'bisect_state $state' exited with error code $res"
+	  echo >&2 "$(eval_gettext "bisect run failed:
+'bisect_state \$state' exited with error code \$res")"
 	  exit $res
       fi
 
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 14/20] gettextize: git-bisect die + gettext messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (12 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 13/20] gettextize: git-bisect echo + eval_gettext message Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 15/20] gettextize: git-bisect die + eval_gettext messages Ævar Arnfjörð Bjarmason
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-bisect.sh b/git-bisect.sh
index c294819..31ca97c 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -58,7 +58,7 @@ bisect_start() {
 	#
 	head=$(GIT_DIR="$GIT_DIR" git symbolic-ref -q HEAD) ||
 	head=$(GIT_DIR="$GIT_DIR" git rev-parse --verify HEAD) ||
-	die "Bad HEAD - I need a HEAD"
+	die "$(gettext "Bad HEAD - I need a HEAD")"
 
 	#
 	# Check if we are bisecting.
@@ -77,11 +77,11 @@ bisect_start() {
 			# cogito usage, and cogito users should understand
 			# it relates to cg-seek.
 			[ -s "$GIT_DIR/head-name" ] &&
-				die "won't bisect on seeked tree"
+				die "$(gettext "won't bisect on seeked tree")"
 			start_head="${head#refs/heads/}"
 			;;
 		*)
-			die "Bad HEAD - strange symbolic ref"
+			die "$(gettext "Bad HEAD - strange symbolic ref")"
 			;;
 		esac
 	fi
@@ -198,10 +198,10 @@ bisect_state() {
 	state=$1
 	case "$#,$state" in
 	0,*)
-		die "Please call 'bisect_state' with at least one argument." ;;
+		die "$(gettext "Please call 'bisect_state' with at least one argument.")" ;;
 	1,bad|1,good|1,skip)
 		rev=$(git rev-parse --verify HEAD) ||
-			die "Bad rev input: HEAD"
+			die "$(gettext "Bad rev input: HEAD")"
 		bisect_write "$state" "$rev"
 		check_expected_revs "$rev" ;;
 	2,bad|*,good|*,skip)
@@ -216,7 +216,7 @@ bisect_state() {
 		eval "$eval"
 		check_expected_revs "$@" ;;
 	*,bad)
-		die "'git bisect bad' can take only one argument." ;;
+		die "$(gettext "'git bisect bad' can take only one argument.")" ;;
 	*)
 		usage ;;
 	esac
@@ -355,7 +355,7 @@ bisect_replay () {
 		good|bad|skip)
 			bisect_write "$command" "$rev" ;;
 		*)
-			die "?? what are you talking about?" ;;
+			die "$(gettext "?? what are you talking about?")" ;;
 		esac
 	done <"$1"
 	bisect_auto_next
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 15/20] gettextize: git-bisect die + eval_gettext messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (13 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 14/20] gettextize: git-bisect die + gettext messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 16/20] gettextize: git-bisect bisect_run + $@ messages Ævar Arnfjörð Bjarmason
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

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

diff --git a/git-bisect.sh b/git-bisect.sh
index 31ca97c..f715e84 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -111,7 +111,7 @@ bisect_start() {
 	    *)
 		rev=$(git rev-parse -q --verify "$arg^{commit}") || {
 		    test $has_double_dash -eq 1 &&
-		        die "'$arg' does not appear to be a valid revision"
+		        die "$(eval_gettext "'\$arg' does not appear to be a valid revision")"
 		    break
 		}
 		case $bad_seen in
@@ -156,7 +156,7 @@ bisect_write() {
 	case "$state" in
 		bad)		tag="$state" ;;
 		good|skip)	tag="$state"-"$rev" ;;
-		*)		die "Bad bisect_write argument: $state" ;;
+		*)		die "$(eval_gettext "Bad bisect_write argument: \$state")" ;;
 	esac
 	git update-ref "refs/bisect/$tag" "$rev" || exit
 	echo "# $state: $(git show-branch $rev)" >>"$GIT_DIR/BISECT_LOG"
@@ -184,7 +184,7 @@ bisect_skip() {
 	do
 	    case "$arg" in
             *..*)
-                revs=$(git rev-list "$arg") || die "Bad rev input: $arg" ;;
+                revs=$(git rev-list "$arg") || die "$(eval_gettext "Bad rev input: \$arg")" ;;
             *)
                 revs=$(git rev-parse --sq-quote "$arg") ;;
 	    esac
@@ -210,7 +210,7 @@ bisect_state() {
 		for rev in "$@"
 		do
 			sha=$(git rev-parse --verify "$rev^{commit}") ||
-				die "Bad rev input: $rev"
+				die "$(eval_gettext "Bad rev input: \$rev")"
 			eval="$eval bisect_write '$state' '$sha'; "
 		done
 		eval "$eval"
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 16/20] gettextize: git-bisect bisect_run + $@ messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (14 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 15/20] gettextize: git-bisect die + eval_gettext messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 17/20] gettextize: git-bisect bisect_reset + $1 messages Ævar Arnfjörð Bjarmason
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Gettextize bisect_run messages that use the $@ variable. Since it's
subroutine local we have to provide an alias for it for eval_gettext.

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

diff --git a/git-bisect.sh b/git-bisect.sh
index f715e84..3b10ce6 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -366,14 +366,15 @@ bisect_run () {
 
     while true
     do
-      echo "running $@"
+      command="$@"
+      eval_gettext "running \$command"; echo
       "$@"
       res=$?
 
       # Check for really bad run error.
       if [ $res -lt 0 -o $res -ge 128 ]; then
-	  echo >&2 "bisect run failed:"
-	  echo >&2 "exit code $res from '$@' is < 0 or >= 128"
+	  echo >&2 "$(eval_gettext "bisect run failed:
+exit code \$res from '\$command' is < 0 or >= 128")"
 	  exit $res
       fi
 
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 17/20] gettextize: git-bisect bisect_reset + $1 messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (15 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 16/20] gettextize: git-bisect bisect_run + $@ messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 18/20] gettextize: git-bisect bisect_replay " Ævar Arnfjörð Bjarmason
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

ettextize bisect_reset messages that use the $1 variable. Since it's
subroutine local we have to provide an alias for it for eval_gettext.

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

diff --git a/git-bisect.sh b/git-bisect.sh
index 3b10ce6..64c6b81 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -311,8 +311,10 @@ bisect_reset() {
 	}
 	case "$#" in
 	0) branch=$(cat "$GIT_DIR/BISECT_START") ;;
-	1) git rev-parse --quiet --verify "$1^{commit}" > /dev/null ||
-	       die "'$1' is not a valid commit"
+	1) git rev-parse --quiet --verify "$1^{commit}" > /dev/null || {
+	       invalid="$1"
+	       die "$(eval_gettext "'\$invalid' is not a valid commit")"
+	   }
 	   branch="$1" ;;
 	*)
 	    usage ;;
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 18/20] gettextize: git-bisect bisect_replay + $1 messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (16 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 17/20] gettextize: git-bisect bisect_reset + $1 messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 19/20] gettextize: git-bisect [Y/n] messages Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 20/20] gettextize: git-bisect bisect_next_check "You need to" message Ævar Arnfjörð Bjarmason
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Gettextize bisect_replay messages that use the $1 variable. Since it's
subroutine local we have to provide an alias for it for eval_gettext.

Since I was doing that anyway I've changed all other uses of $1
variable to use the alias variable for clarity.

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

diff --git a/git-bisect.sh b/git-bisect.sh
index 64c6b81..f3162d6 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -341,7 +341,8 @@ bisect_clean_state() {
 }
 
 bisect_replay () {
-	test -r "$1" || die "cannot read $1 for replaying"
+	file="$1"
+	test -r "$file" || die "$(eval_gettext "cannot read \$file for replaying")"
 	bisect_reset
 	while read git bisect command rev
 	do
@@ -359,7 +360,7 @@ bisect_replay () {
 		*)
 			die "$(gettext "?? what are you talking about?")" ;;
 		esac
-	done <"$1"
+	done <"$file"
 	bisect_auto_next
 }
 
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 19/20] gettextize: git-bisect [Y/n] messages
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (17 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 18/20] gettextize: git-bisect bisect_replay " Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  2010-09-14 13:52 ` [PATCH/RFC 20/20] gettextize: git-bisect bisect_next_check "You need to" message Ævar Arnfjörð Bjarmason
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Gettextize the [Y/n] questions git-bisect presents, and leave a note
in a TRANSLATORS comment explaining that translators have to preserve
a mention of the Y/n characters since the program will expect them,
and not their localized equivalents.

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

diff --git a/git-bisect.sh b/git-bisect.sh
index f3162d6..b130129 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -39,7 +39,10 @@ bisect_autostart() {
 		echo >&2 "$(gettext "You need to start by \"git bisect start\"")"
 		if test -t 0
 		then
-			echo >&2 -n 'Do you want me to do it for you [Y/n]? '
+			# TRANSLATORS: Make sure to include [Y] and [n] in your
+			# translation. The program will only accept English input
+			# at this point.
+			echo >&2 -n "$(gettext "Do you want me to do it for you [Y/n]? ")"
 			read yesno
 			case "$yesno" in
 			[Nn]*)
@@ -242,7 +245,10 @@ bisect_next_check() {
 		echo >&2 "$(gettext "Warning: bisecting only with a bad commit.")"
 		if test -t 0
 		then
-			printf >&2 'Are you sure [Y/n]? '
+			# TRANSLATORS: Make sure to include [Y] and [n] in your
+			# translation. The program will only accept English input
+			# at this point.
+			printf >&2 "$(gettext "Are you sure [Y/n]? ")"
 			read yesno
 			case "$yesno" in [Nn]*) exit 1 ;; esac
 		fi
-- 
1.7.3.rc1.234.g8dc15

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

* [PATCH/RFC 20/20] gettextize: git-bisect bisect_next_check "You need to" message
  2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
                   ` (18 preceding siblings ...)
  2010-09-14 13:52 ` [PATCH/RFC 19/20] gettextize: git-bisect [Y/n] messages Ævar Arnfjörð Bjarmason
@ 2010-09-14 13:52 ` Ævar Arnfjörð Bjarmason
  19 siblings, 0 replies; 21+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-14 13:52 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Gettextize the "You need to start by" message in
bisect_next_check. This message assembled English output by hand so it
needed to be split up to make it translatable.

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

diff --git a/git-bisect.sh b/git-bisect.sh
index b130129..b5836dd 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -255,15 +255,16 @@ bisect_next_check() {
 		: bisect without good...
 		;;
 	*)
-		THEN=''
-		test -s "$GIT_DIR/BISECT_START" || {
-			echo >&2 'You need to start by "git bisect start".'
-			THEN='then '
-		}
-		echo >&2 'You '$THEN'need to give me at least one good' \
-			'and one bad revisions.'
-		echo >&2 '(You can use "git bisect bad" and' \
-			'"git bisect good" for that.)'
+
+		if test -s "$GIT_DIR/BISECT_START"
+		then
+			echo >&2 "$(gettext "You need to give me at least one good and one bad revisions.
+(You can use \"git bisect bad\" and \"git bisect good\" for that.)")"
+		else
+			echo >&2 "$(gettext "You need to start by \"git bisect start\".
+You then need to give me at least one good and one bad revisions.
+(You can use \"git bisect bad\" and \"git bisect good\" for that.)")"
+		fi
 		exit 1 ;;
 	esac
 }
-- 
1.7.3.rc1.234.g8dc15

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

end of thread, other threads:[~2010-09-14 14:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-14 13:52 [PATCH/RFC 00/20] gettextize: git-stash & git-bisect Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 01/20] gettextize: git-stash add git-sh-i18n Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 02/20] gettextize: git-stash echo + gettext message Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 03/20] gettextize: git-stash say + gettext messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 04/20] gettextize: git-stash die " Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 05/20] gettextize: git-stash die + eval_gettext messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 06/20] gettextize: git-stash die + eval_gettext $* messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 07/20] gettextize: git-stash die + eval_gettext $1 messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 08/20] gettextize: git-stash "unknown option" message Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 09/20] gettextize: git-stash drop_stash say/die messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 10/20] gettextize: git-bisect add git-sh-i18n Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 11/20] gettextize: git-bisect gettext + echo message Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 12/20] gettextize: git-bisect echo + gettext messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 13/20] gettextize: git-bisect echo + eval_gettext message Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 14/20] gettextize: git-bisect die + gettext messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 15/20] gettextize: git-bisect die + eval_gettext messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 16/20] gettextize: git-bisect bisect_run + $@ messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 17/20] gettextize: git-bisect bisect_reset + $1 messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 18/20] gettextize: git-bisect bisect_replay " Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 19/20] gettextize: git-bisect [Y/n] messages Ævar Arnfjörð Bjarmason
2010-09-14 13:52 ` [PATCH/RFC 20/20] gettextize: git-bisect bisect_next_check "You need to" message Ævar Arnfjörð Bjarmason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).