Code

i18n: git-stash echo + gettext message
[git.git] / git-am.sh
index efce63a4ee399eb38d4fa66442a9af4f50ae58ed..463c741dfc259927b4429f19972ced21d87c215e 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -151,7 +151,7 @@ It does not apply to blobs recorded in its index.")"
     orig_tree=$(cat "$dotest/patch-merge-base") &&
     rm -fr "$dotest"/patch-merge-* || exit 1
 
-    say Falling back to patching base and 3-way merge...
+    say "$(gettext "Falling back to patching base and 3-way merge...")"
 
     # This is not so wrong.  Depending on which base we picked,
     # orig_tree may be wildly different from ours, but his_tree
@@ -703,7 +703,10 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
                echo "--------------------------"
                cat "$dotest/final-commit"
                echo "--------------------------"
-               printf "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+               # TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a]
+               # in your translation. The program will only accept English
+               # input at this point.
+               gettext "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
                read reply
                case "$reply" in
                [yY]*) action=yes ;;
@@ -739,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
        '')
@@ -784,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
                    }
@@ -794,7 +797,7 @@ did you forget to use 'git add'?"; echo
        fi
        if test $apply_status != 0
        then
-               printf 'Patch failed at %s %s\n' "$msgnum" "$FIRSTLINE"
+               eval_gettext 'Patch failed at $msgnum $FIRSTLINE'; echo
                stop_here_user_resolve $this
        fi
 
@@ -810,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