]> git.ipfire.org Git - thirdparty/git.git/commitdiff
i18n: git-am core say messages
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 21 May 2011 18:43:52 +0000 (18:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 21 May 2011 18:57:14 +0000 (11:57 -0700)
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>
git-am.sh
t/t4150-am.sh
t/t4151-am-abort.sh

index a0db15e6bbe53da0e9c2a275163e40b64c537b7e..72d4c03b62a51710f405e580cc3741f1018d6138 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -742,7 +742,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
        '')
@@ -787,7 +787,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
                    }
@@ -813,7 +813,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
index 850fc96d1f07b19310cb4672ab44374b37b82d67..151404e0908c55f3c0d399d03225b077dc226562 100755 (executable)
@@ -465,7 +465,7 @@ test_expect_success 'am newline in subject' '
        test_tick &&
        sed -e "s/second/second \\\n foo/" patch1 >patchnl &&
        git am <patchnl >output.out 2>&1 &&
-       grep "^Applying: second \\\n foo$" output.out
+       test_i18ngrep "^Applying: second \\\n foo$" output.out
 '
 
 test_expect_success 'am -q is quiet' '
index c95c4ccc393d0863ad53b6a2a684893282d7d9e6..1176bcccf3b3f3708df04f49bfd084190cd27600 100755 (executable)
@@ -45,8 +45,9 @@ do
 
        test_expect_success "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 &&
+               test_i18ngrep "^Applying" output >output.applying &&
+               test_i18ngrep "^Applying: 6$" output.applying &&
+               test_i18ncmp file-2-expect file-2 &&
                test ! -f .git/MERGE_RR
        '