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> --- 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 -- 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