All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC 00/12] gettextize: git-submodule
@ 2010-09-13 22:09 Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 01/12] gettextize: git-submodule add git-sh-i18n Ævar Arnfjörð Bjarmason
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

This is an RFC on a series that makes git-submodule.sh
translatable. With this git-bisect/rebase/stash are the only
mainporcelain commands that aren't translatable.

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.

This is based on a master that has the "tests: use test_cmp instead of
piping to diff(1)" patch applied. Untangling the two was a pain, and
probably unnecessary since by the time this gets merged that patch
will be in maint/master.

Ævar Arnfjörð Bjarmason (12):
  gettextize: git-submodule add git-sh-i18n
  gettextize: git-submodule echo + eval_gettext messages
  gettextize: git-submodule say + eval_gettext messages
  gettextize: git-submodule die + eval_gettext messages
  gettextize: git-submodule $update_module say + die messages
  gettextize: git-submodule "cached cannot be used" message
  gettextize: git-submodule "Submodule change[...]" messages
  gettextize: git-submodule $errmsg messages
  gettextize: git-submodule "Entering [...]" message
  gettextize: git-submodule "[...] path is ignored" message
  gettextize: git-submodule "path not initialized" message
  gettextize: git-submodule "blob" and "submodule" messages

 git-submodule.sh             |   94 +++++++++++++++++++++--------------------
 t/t7400-submodule-basic.sh   |    4 +-
 t/t7401-submodule-summary.sh |   12 +++---
 t/t7407-submodule-foreach.sh |    4 +-
 4 files changed, 58 insertions(+), 56 deletions(-)

-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 01/12] gettextize: git-submodule add git-sh-i18n
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 02/12] gettextize: git-submodule echo + eval_gettext messages Ævar Arnfjörð Bjarmason
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

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

diff --git a/git-submodule.sh b/git-submodule.sh
index 9ebbab7..5ef3d0d 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -14,6 +14,7 @@ USAGE="[--quiet] add [-b branch] [-f|--force] [--reference <repository>] [--] <r
    or: $dashless [--quiet] sync [--] [<path>...]"
 OPTIONS_SPEC=
 . git-sh-setup
+. git-sh-i18n
 . git-parse-remote
 require_work_tree
 
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 02/12] gettextize: git-submodule echo + eval_gettext messages
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 01/12] gettextize: git-submodule add git-sh-i18n Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 03/12] gettextize: git-submodule say " Ævar Arnfjörð Bjarmason
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

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

diff --git a/git-submodule.sh b/git-submodule.sh
index 5ef3d0d..5a08fe6 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -219,7 +219,7 @@ cmd_add()
 	then
 		if test -d "$path"/.git -o -f "$path"/.git
 		then
-			echo "Adding existing repo at '$path' to the index"
+			echo "$(eval_gettext "Adding existing repo at '\$path' to the index")"
 		else
 			die "'$path' already exists and is not a valid git repo"
 		fi
@@ -626,7 +626,7 @@ cmd_summary() {
 				;; # removed
 			*)
 				# unexpected type
-				echo >&2 "unexpected mode $mod_dst"
+				echo >&2 "$(eval_gettext "unexpected mode \$mod_dst")"
 				continue ;;
 			esac
 		fi
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 03/12] gettextize: git-submodule say + eval_gettext messages
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 01/12] gettextize: git-submodule add git-sh-i18n Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 02/12] gettextize: git-submodule echo + eval_gettext messages Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 04/12] gettextize: git-submodule die " Ævar Arnfjörð Bjarmason
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

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

diff --git a/git-submodule.sh b/git-submodule.sh
index 5a08fe6..086acdd 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -840,7 +840,7 @@ cmd_sync()
 		if test -e "$path"/.git
 		then
 		(
-			say "Synchronizing submodule url for '$name'"
+			say "$(eval_gettext "Synchronizing submodule url for '\$name'")"
 			git config submodule."$name".url "$url"
 			clear_local_git_env
 			cd "$path"
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 04/12] gettextize: git-submodule die + eval_gettext messages
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
                   ` (2 preceding siblings ...)
  2010-09-13 22:09 ` [PATCH/RFC 03/12] gettextize: git-submodule say " Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 05/12] gettextize: git-submodule $update_module say + die messages Ævar Arnfjörð Bjarmason
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

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

diff --git a/git-submodule.sh b/git-submodule.sh
index 086acdd..1b3132f 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -35,7 +35,7 @@ resolve_relative_url ()
 {
 	remote=$(get_default_remote)
 	remoteurl=$(git config "remote.$remote.url") ||
-		die "remote ($remote) does not have a url defined in .git/config"
+		die "$(eval_gettext "remote (\$remote) does not have a url defined in .git/config")"
 	url="$1"
 	remoteurl=${remoteurl%/}
 	while test -n "$url"
@@ -76,7 +76,7 @@ module_name()
 	name=$( git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
 		sed -n -e 's|^submodule\.\(.*\)\.path '"$re"'$|\1|p' )
        test -z "$name" &&
-       die "No submodule mapping found in .gitmodules for path '$path'"
+       die "$(eval_gettext "No submodule mapping found in .gitmodules for path '\$path'")"
        echo "$name"
 }
 
@@ -102,11 +102,11 @@ module_clone()
 	if test -d "$path"
 	then
 		rmdir "$path" 2>/dev/null ||
-		die "Directory '$path' exists, but is neither empty nor a git repository"
+		die "$(eval_gettext "Directory '\$path' exists, but is neither empty nor a git repository")"
 	fi
 
 	test -e "$path" &&
-	die "A file already exist at path '$path'"
+	die "$(eval_gettext "A file already exist at path '\$path'")"
 
 	if test -n "$reference"
 	then
@@ -114,7 +114,7 @@ module_clone()
 	else
 		git-clone -n "$url" "$path"
 	fi ||
-	die "Clone of '$url' into submodule path '$path' failed"
+	die "$(eval_gettext "Clone of '\$url' into submodule path '\$path' failed")"
 }
 
 #
@@ -187,7 +187,7 @@ cmd_add()
 		realrepo=$repo
 		;;
 	*)
-		die "repo URL: '$repo' must be absolute or begin with ./|../"
+		die "$(eval_gettext "repo URL: '\$repo' must be absolute or begin with ./|../")"
 	;;
 	esac
 
@@ -204,7 +204,7 @@ cmd_add()
 			s|/*$||
 		')
 	git ls-files --error-unmatch "$path" > /dev/null 2>&1 &&
-	die "'$path' already exists in the index"
+	die "$(eval_gettext "'\$path' already exists in the index")"
 
 	if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
 	then
@@ -221,7 +221,7 @@ cmd_add()
 		then
 			echo "$(eval_gettext "Adding existing repo at '\$path' to the index")"
 		else
-			die "'$path' already exists and is not a valid git repo"
+			die "$(eval_gettext "'\$path' already exists and is not a valid git repo")"
 		fi
 
 		case "$repo" in
@@ -244,16 +244,16 @@ cmd_add()
 			'') git checkout -f -q ;;
 			?*) git checkout -f -q -b "$branch" "origin/$branch" ;;
 			esac
-		) || die "Unable to checkout submodule '$path'"
+		) || die "$(eval_gettext "Unable to checkout submodule '\$path'")"
 	fi
 
 	git add $force "$path" ||
-	die "Failed to add submodule '$path'"
+	die "$(eval_gettext "Failed to add submodule '\$path'")"
 
 	git config -f .gitmodules submodule."$path".path "$path" &&
 	git config -f .gitmodules submodule."$path".url "$repo" &&
 	git add --force .gitmodules ||
-	die "Failed to register submodule '$path'"
+	die "$(eval_gettext "Failed to register submodule '\$path'")"
 }
 
 #
@@ -303,7 +303,7 @@ cmd_foreach()
 					cmd_foreach "--recursive" "$@"
 				fi
 			) ||
-			die "Stopping at '$path'; script returned non-zero status."
+			die "$(eval_gettext "Stopping at '\$path'; script returned non-zero status.")"
 		fi
 	done
 }
@@ -346,7 +346,7 @@ cmd_init()
 
 		url=$(git config -f .gitmodules submodule."$name".url)
 		test -z "$url" &&
-		die "No url found for submodule path '$path' in .gitmodules"
+		die "$(eval_gettext "No url found for submodule path '\$path' in .gitmodules")"
 
 		# Possibly a url relative to parent
 		case "$url" in
@@ -356,14 +356,14 @@ cmd_init()
 		esac
 
 		git config submodule."$name".url "$url" ||
-		die "Failed to register url for submodule path '$path'"
+		die "$(eval_gettext "Failed to register url for submodule path '\$path'")"
 
 		upd="$(git config -f .gitmodules submodule."$name".update)"
 		test -z "$upd" ||
 		git config submodule."$name".update "$upd" ||
-		die "Failed to register update mode for submodule path '$path'"
+		die "$(eval_gettext "Failed to register update mode for submodule path '\$path'")"
 
-		say "Submodule '$name' ($url) registered for path '$path'"
+		say "$(eval_gettext "Submodule '\$name' (\$url) registered for path '\$path'")"
 	done
 }
 
@@ -453,7 +453,7 @@ cmd_update()
 		else
 			subsha1=$(clear_local_git_env; cd "$path" &&
 				git rev-parse --verify HEAD) ||
-			die "Unable to find current revision in submodule path '$path'"
+			die "$(eval_gettext "Unable to find current revision in submodule path '\$path'")"
 		fi
 
 		if ! test -z "$update"
@@ -473,7 +473,7 @@ cmd_update()
 			then
 				(clear_local_git_env; cd "$path" &&
 					git-fetch) ||
-				die "Unable to fetch in submodule path '$path'"
+				die "$(eval_gettext "Unable to fetch in submodule path '\$path'")"
 			fi
 
 			case "$update_module" in
@@ -502,7 +502,7 @@ cmd_update()
 		if test -n "$recursive"
 		then
 			(clear_local_git_env; cd "$path" && cmd_update $orig_args) ||
-			die "Failed to recurse into submodule path '$path'"
+			die "$(eval_gettext "Failed to recurse into submodule path '\$path'")"
 		fi
 	done
 }
@@ -793,7 +793,7 @@ cmd_status()
 				cd "$path" &&
 				cmd_status $orig_args
 			) ||
-			die "Failed to recurse into submodule path '$path'"
+			die "$(eval_gettext "Failed to recurse into submodule path '\$path'")"
 		fi
 	done
 }
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 05/12] gettextize: git-submodule $update_module say + die messages
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
                   ` (3 preceding siblings ...)
  2010-09-13 22:09 ` [PATCH/RFC 04/12] gettextize: git-submodule die " Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 06/12] gettextize: git-submodule "cached cannot be used" message Ævar Arnfjörð Bjarmason
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

Gettextize $update_module say and die messages. These messages needed
to be split up to make them translatable.

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

diff --git a/git-submodule.sh b/git-submodule.sh
index 1b3132f..2b33c5f 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -479,24 +479,23 @@ cmd_update()
 			case "$update_module" in
 			rebase)
 				command="git rebase"
-				action="rebase"
-				msg="rebased onto"
+				die_msg="$(eval_gettext "Unable to rebase '\$sha1' in submodule path '\$path'")"
+				say_msg="$(eval_gettext "Submodule path '\$path': rebased into '\$sha1'")"
 				;;
 			merge)
 				command="git merge"
-				action="merge"
-				msg="merged in"
+				die_msg="$(eval_gettext "Unable to rebase '\$sha1' in submodule path '\$path'")"
+				say_msg="$(eval_gettext "Submodule path '\$path': merged in '\$sha1'")"
 				;;
 			*)
 				command="git checkout $force -q"
-				action="checkout"
-				msg="checked out"
+				die_msg="$(eval_gettext "Unable to rebase '\$sha1' in submodule path '\$path'")"
+				say_msg="$(eval_gettext "Submodule path '\$path': checked out '\$sha1'")"
 				;;
 			esac
 
-			(clear_local_git_env; cd "$path" && $command "$sha1") ||
-			die "Unable to $action '$sha1' in submodule path '$path'"
-			say "Submodule path '$path': $msg '$sha1'"
+			(clear_local_git_env; cd "$path" && $command "$sha1") || die $die_msg
+			say $say_msg
 		fi
 
 		if test -n "$recursive"
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 06/12] gettextize: git-submodule "cached cannot be used" message
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
                   ` (4 preceding siblings ...)
  2010-09-13 22:09 ` [PATCH/RFC 05/12] gettextize: git-submodule $update_module say + die messages Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 07/12] gettextize: git-submodule "Submodule change[...]" messages Ævar Arnfjörð Bjarmason
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

Gettextize the "--cached cannot be used with --files" message. Since
this message starts with "--" we have to pass "--" as the first
argument. This works with both GNU gettext 0.18.1 (as expected), and
the gettext(1) on Solaris 10.

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

diff --git a/git-submodule.sh b/git-submodule.sh
index 2b33c5f..fcb11d9 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -585,7 +585,7 @@ cmd_summary() {
 	if [ -n "$files" ]
 	then
 		test -n "$cached" &&
-		die "--cached cannot be used with --files"
+		die "$(gettext -- "--cached cannot be used with --files")"
 		diff_cmd=diff-files
 		head=
 	fi
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 07/12] gettextize: git-submodule "Submodule change[...]" messages
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
                   ` (5 preceding siblings ...)
  2010-09-13 22:09 ` [PATCH/RFC 06/12] gettextize: git-submodule "cached cannot be used" message Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 08/12] gettextize: git-submodule $errmsg messages Ævar Arnfjörð Bjarmason
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

Gettextize the "Submodules changed but not updated" and "Submodule
changes to be committed" messages. This is explicitly tested for so we
need to skip some tests with NO_GETTEXT_POISON.

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

diff --git a/git-submodule.sh b/git-submodule.sh
index fcb11d9..065b343 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -710,9 +710,9 @@ cmd_summary() {
 	done |
 	if test -n "$for_status"; then
 		if [ -n "$files" ]; then
-			echo "# Submodules changed but not updated:"
+			gettext "# Submodules changed but not updated:"; echo
 		else
-			echo "# Submodule changes to be committed:"
+			gettext "# Submodule changes to be committed:"; echo
 		fi
 		echo "#"
 		sed -e 's|^|# |' -e 's|^# $|#|'
diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh
index 6a320cc..70b2fb1 100755
--- a/t/t7401-submodule-summary.sh
+++ b/t/t7401-submodule-summary.sh
@@ -225,7 +225,7 @@ EOF
     test_cmp expected actual
 "
 
-test_expect_success '--for-status' "
+test_expect_success NO_GETTEXT_POISON '--for-status' "
     git submodule summary --for-status HEAD^ >actual &&
     test_cmp actual - <<EOF
 # Submodule changes to be committed:
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 08/12] gettextize: git-submodule $errmsg messages
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
                   ` (6 preceding siblings ...)
  2010-09-13 22:09 ` [PATCH/RFC 07/12] gettextize: git-submodule "Submodule change[...]" messages Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 09/12] gettextize: git-submodule "Entering [...]" message Ævar Arnfjörð Bjarmason
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

Gettextize warning messages stored in the $errmsg variable using
eval_gettext interpolation. This is explicitly tested for so we need
to skip some tests with NO_GETTEXT_POISON.

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

diff --git a/git-submodule.sh b/git-submodule.sh
index 065b343..d453fe9 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -643,13 +643,13 @@ cmd_summary() {
 		total_commits=
 		case "$missing_src,$missing_dst" in
 		t,)
-			errmsg="  Warn: $name doesn't contain commit $sha1_src"
+			errmsg="$(eval_gettext "  Warn: \$name doesn't contain commit \$sha1_src")"
 			;;
 		,t)
-			errmsg="  Warn: $name doesn't contain commit $sha1_dst"
+			errmsg="$(eval_gettext "  Warn: \$name doesn't contain commit \$sha1_dst")"
 			;;
 		t,t)
-			errmsg="  Warn: $name doesn't contain commits $sha1_src and $sha1_dst"
+			errmsg="$(eval_gettext "  Warn: \$name doesn't contain commits \$sha1_src and \$sha1_dst")"
 			;;
 		*)
 			errmsg=
diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh
index 70b2fb1..09ef760 100755
--- a/t/t7401-submodule-summary.sh
+++ b/t/t7401-submodule-summary.sh
@@ -154,7 +154,7 @@ EOF
 rm -f sm1 &&
 test_create_repo sm1 &&
 head6=$(add_file sm1 foo6 foo7)
-test_expect_success 'nonexistent commit' "
+test_expect_success NO_GETTEXT_POISON 'nonexistent commit' "
     git submodule summary >actual &&
     cat >expected <<-EOF &&
 * sm1 $head4...$head6:
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 09/12] gettextize: git-submodule "Entering [...]" message
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
                   ` (7 preceding siblings ...)
  2010-09-13 22:09 ` [PATCH/RFC 08/12] gettextize: git-submodule $errmsg messages Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 10/12] gettextize: git-submodule "[...] path is ignored" message Ævar Arnfjörð Bjarmason
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

Gettextize the "Entering [...]" message. This is explicitly tested for
so we need to skip some tests with NO_GETTEXT_POISON.

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

diff --git a/git-submodule.sh b/git-submodule.sh
index d453fe9..6ec6aa5 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -291,7 +291,7 @@ cmd_foreach()
 	do
 		if test -e "$path"/.git
 		then
-			say "Entering '$prefix$path'"
+			say "$(eval_gettext "Entering '\$prefix\$path'")"
 			name=$(module_name "$path")
 			(
 				prefix="$prefix$path/"
diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh
index 905a8ba..217fe55 100755
--- a/t/t7407-submodule-foreach.sh
+++ b/t/t7407-submodule-foreach.sh
@@ -68,7 +68,7 @@ Entering 'sub3'
 $pwd/clone-foo3-sub3-$sub3sha1
 EOF
 
-test_expect_success 'test basic "submodule foreach" usage' '
+test_expect_success NO_GETTEXT_POISON 'test basic "submodule foreach" usage' '
 	git clone super clone &&
 	(
 		cd clone &&
@@ -153,7 +153,7 @@ Entering 'sub2'
 Entering 'sub3'
 EOF
 
-test_expect_success 'test messages from "foreach --recursive"' '
+test_expect_success NO_GETTEXT_POISON 'test messages from "foreach --recursive"' '
 	(
 		cd clone2 &&
 		git submodule foreach --recursive "true" > ../actual
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 10/12] gettextize: git-submodule "[...] path is ignored" message
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
                   ` (8 preceding siblings ...)
  2010-09-13 22:09 ` [PATCH/RFC 09/12] gettextize: git-submodule "Entering [...]" message Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 11/12] gettextize: git-submodule "path not initialized" message Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 12/12] gettextize: git-submodule "blob" and "submodule" messages Ævar Arnfjörð Bjarmason
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

Gettextize the "The following path is ignored" message. This is
explicitly tested for so we need to skip some tests with
NO_GETTEXT_POISON.

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

diff --git a/git-submodule.sh b/git-submodule.sh
index 6ec6aa5..cd37bf7 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -208,9 +208,9 @@ cmd_add()
 
 	if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
 	then
-		echo >&2 "The following path is ignored by one of your .gitignore files:" &&
-		echo >&2 $path &&
-		echo >&2 "Use -f if you really want to add it."
+		echo >&2 "$(eval_gettext "The following path is ignored by one of your .gitignore files:
+\$path
+Use -f if you really want to add it.")"
 		exit 1
 	fi
 
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 9bda970..0531dd1 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -86,7 +86,7 @@ test_expect_success 'submodule add' '
 	test_cmp empty untracked
 '
 
-test_expect_success 'submodule add to .gitignored path fails' '
+test_expect_success NO_GETTEXT_POISON 'submodule add to .gitignored path fails' '
 	(
 		cd addtest-ignore &&
 		cat <<-\EOF >expect &&
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 11/12] gettextize: git-submodule "path not initialized" message
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
                   ` (9 preceding siblings ...)
  2010-09-13 22:09 ` [PATCH/RFC 10/12] gettextize: git-submodule "[...] path is ignored" message Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  2010-09-13 22:09 ` [PATCH/RFC 12/12] gettextize: git-submodule "blob" and "submodule" messages Ævar Arnfjörð Bjarmason
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

Gettextize the "Submodule path '$path' not initialized" message. This
is explicitly tested for so we need to skip some tests with
NO_GETTEXT_POISON.

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

diff --git a/git-submodule.sh b/git-submodule.sh
index cd37bf7..edf8774 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -441,8 +441,8 @@ cmd_update()
 			# Only mention uninitialized submodules when its
 			# path have been specified
 			test "$#" != "0" &&
-			say "Submodule path '$path' not initialized" &&
-			say "Maybe you want to use 'update --init'?"
+			say "$(eval_gettext "Submodule path '\$path' not initialized
+Maybe you want to use 'update --init'?")"
 			continue
 		fi
 
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 0531dd1..b25bcb6 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -349,7 +349,7 @@ test_expect_success 'apply submodule diff' '
 	test_cmp empty staged
 '
 
-test_expect_success 'update --init' '
+test_expect_success NO_GETTEXT_POISON 'update --init' '
 	mv init init2 &&
 	git config -f .gitmodules submodule.example.url "$(pwd)/init2" &&
 	git config --remove-section submodule.example &&
-- 
1.7.3.rc1.220.gb4d42

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

* [PATCH/RFC 12/12] gettextize: git-submodule "blob" and "submodule" messages
  2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
                   ` (10 preceding siblings ...)
  2010-09-13 22:09 ` [PATCH/RFC 11/12] gettextize: git-submodule "path not initialized" message Ævar Arnfjörð Bjarmason
@ 2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason
  11 siblings, 0 replies; 13+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-13 22:09 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Lars Hjemli, Ævar Arnfjörð Bjarmason

Gettextize the words "blob" and "submodule", which will be
interpolated in a message emitted by git-submodule. This is
explicitly tested for so we need to skip some tests with
NO_GETTEXT_POISON.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-submodule.sh             |    6 ++++--
 t/t7401-submodule-summary.sh |    8 ++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index edf8774..3de519a 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -674,11 +674,13 @@ cmd_summary() {
 		sha1_abbr_dst=$(echo $sha1_dst | cut -c1-7)
 		if test $status = T
 		then
+			blob="$(gettext "blob")"
+			submodule="$(gettext "submodule")"
 			if test $mod_dst = 160000
 			then
-				echo "* $name $sha1_abbr_src(blob)->$sha1_abbr_dst(submodule)$total_commits:"
+				echo "* $name $sha1_abbr_src($blob)->$sha1_abbr_dst($submodule)$total_commits:"
 			else
-				echo "* $name $sha1_abbr_src(submodule)->$sha1_abbr_dst(blob)$total_commits:"
+				echo "* $name $sha1_abbr_src($submodule)->$sha1_abbr_dst($blob)$total_commits:"
 			fi
 		else
 			echo "* $name $sha1_abbr_src...$sha1_abbr_dst$total_commits:"
diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh
index 09ef760..a56787a 100755
--- a/t/t7401-submodule-summary.sh
+++ b/t/t7401-submodule-summary.sh
@@ -120,7 +120,7 @@ git add sm1 &&
 rm -f sm1 &&
 mv sm1-bak sm1
 
-test_expect_success 'typechanged submodule(submodule->blob), --cached' "
+test_expect_success NO_GETTEXT_POISON 'typechanged submodule(submodule->blob), --cached' "
     git submodule summary --cached >actual &&
     cat >expected <<-EOF &&
 * sm1 $head4(submodule)->$head5(blob) (3):
@@ -130,7 +130,7 @@ EOF
     test_cmp actual expected
 "
 
-test_expect_success 'typechanged submodule(submodule->blob), --files' "
+test_expect_success NO_GETTEXT_POISON 'typechanged submodule(submodule->blob), --files' "
     git submodule summary --files >actual &&
     cat >expected <<-EOF &&
 * sm1 $head5(blob)->$head4(submodule) (3):
@@ -142,7 +142,7 @@ EOF
 
 rm -rf sm1 &&
 git checkout-index sm1
-test_expect_success 'typechanged submodule(submodule->blob)' "
+test_expect_success NO_GETTEXT_POISON 'typechanged submodule(submodule->blob)' "
     git submodule summary >actual &&
     cat >expected <<-EOF &&
 * sm1 $head4(submodule)->$head5(blob):
@@ -165,7 +165,7 @@ EOF
 "
 
 commit_file
-test_expect_success 'typechanged submodule(blob->submodule)' "
+test_expect_success NO_GETTEXT_POISON 'typechanged submodule(blob->submodule)' "
     git submodule summary >actual &&
     cat >expected <<-EOF &&
 * sm1 $head5(blob)->$head6(submodule) (2):
-- 
1.7.3.rc1.220.gb4d42

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

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

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 01/12] gettextize: git-submodule add git-sh-i18n Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 02/12] gettextize: git-submodule echo + eval_gettext messages Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 03/12] gettextize: git-submodule say " Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 04/12] gettextize: git-submodule die " Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 05/12] gettextize: git-submodule $update_module say + die messages Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 06/12] gettextize: git-submodule "cached cannot be used" message Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 07/12] gettextize: git-submodule "Submodule change[...]" messages Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 08/12] gettextize: git-submodule $errmsg messages Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 09/12] gettextize: git-submodule "Entering [...]" message Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 10/12] gettextize: git-submodule "[...] path is ignored" message Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 11/12] gettextize: git-submodule "path not initialized" message Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 12/12] gettextize: git-submodule "blob" and "submodule" messages Æ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.