[PATCH 10/51] i18n: git-am core say messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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 2c8770b..a15c5cc 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -739,7 +739,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
 	'')
@@ -784,7 +784,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
 		    }
@@ -810,7 +810,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 850fc96..aa3d4ad 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 C_LOCALE_OUTPUT '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 c95c4cc..b9d8f5e 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 C_LOCALE_OUTPUT "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.4.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]