i18n: git-am core say messages

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 changed to use the test_i18* functions along with this translation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed May 21, 2011 at 18:43 UTC dff1a98350c97c6ce207c582c8fd042bc6c04cd2
3 files changed +7 -6
git-am.sh
+3 -3
@@ -742,7 +742,7 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
742 stop_here $this
743 fi
744
745 - say "Applying: $FIRSTLINE"
745 + say "$(eval_gettext "Applying: \$FIRSTLINE")"
746
747 case "$resolved" in
748 '')
@@ -787,7 +787,7 @@ did you forget to use 'git add'?"; echo
787 # Applying the patch to an earlier tree and merging the
788 # result may have produced the same tree as ours.
789 git diff-index --quiet --cached HEAD -- && {
790 - say No changes -- Patch already applied.
790 + say "$(gettext "No changes -- Patch already applied.")"
791 go_next
792 continue
793 }
@@ -813,7 +813,7 @@ did you forget to use 'git add'?"; echo
813 GIT_AUTHOR_DATE=
814 fi
815 parent=$(git rev-parse --verify -q HEAD) ||
816 - say >&2 "applying to an empty history"
816 + say >&2 "$(gettext "applying to an empty history")"
817
818 if test -n "$committer_date_is_author_date"
819 then
t/t4150-am.sh
+1 -1
@@ -465,7 +465,7 @@ test_expect_success 'am newline in subject' '
465 test_tick &&
466 sed -e "s/second/second \\\n foo/" patch1 >patchnl &&
467 git am <patchnl >output.out 2>&1 &&
468 - grep "^Applying: second \\\n foo$" output.out
468 + test_i18ngrep "^Applying: second \\\n foo$" output.out
469 '
470
471 test_expect_success 'am -q is quiet' '
t/t4151-am-abort.sh
+3 -2
@@ -45,8 +45,9 @@ do
45
46 test_expect_success "am$with3 --skip continue after failed am$with3" '
47 test_must_fail git am$with3 --skip >output &&
48 - test "$(grep "^Applying" output)" = "Applying: 6" &&
49 - test_cmp file-2-expect file-2 &&
48 + test_i18ngrep "^Applying" output >output.applying &&
49 + test_i18ngrep "^Applying: 6$" output.applying &&
50 + test_i18ncmp file-2-expect file-2 &&
51 test ! -f .git/MERGE_RR
52 '
53