Code

i18n: git-am multi-line getttext $msg; echo
[git.git] / git-am.sh
index f4db17d93424c18c1db53e9bf84cdeee8219fa10..5a152b0878f206539a64c90cc4f8dce969845e43 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -37,6 +37,7 @@ rerere-autoupdate update the index with reused conflict resolution if possible
 rebasing*       (internal use for git-rebase)"
 
 . git-sh-setup
+. git-sh-i18n
 prefix=$(git rev-parse --show-prefix)
 set_reflog_action am
 require_work_tree
@@ -114,7 +115,7 @@ go_next () {
 
 cannot_fallback () {
        echo "$1"
-       echo "Cannot fall back to three-way merge."
+       gettext "Cannot fall back to three-way merge."; echo
        exit 1
 }
 
@@ -467,12 +468,12 @@ else
                                set x
                                first=
                        }
-                       case "$arg" in
-                       /*)
-                               set "$@" "$arg" ;;
-                       *)
-                               set "$@" "$prefix$arg" ;;
-                       esac
+                       if is_absolute_path "$arg"
+                       then
+                               set "$@" "$arg"
+                       else
+                               set "$@" "$prefix$arg"
+                       fi
                done
                shift
        fi
@@ -644,7 +645,7 @@ do
 
        if test -z "$GIT_AUTHOR_EMAIL"
        then
-               echo "Patch does not have a valid e-mail address."
+               gettext "Patch does not have a valid e-mail address."; echo
                stop_here $this
        fi
 
@@ -695,7 +696,7 @@ do
            action=again
            while test "$action" = again
            do
-               echo "Commit Body is:"
+               gettext "Commit Body is:"; echo
                echo "--------------------------"
                cat "$dotest/final-commit"
                echo "--------------------------"
@@ -756,16 +757,16 @@ do
                # working tree.
                resolved=
                git diff-index --quiet --cached HEAD -- && {
-                       echo "No changes - did you forget to use 'git add'?"
-                       echo "If there is nothing left to stage, chances are that something else"
-                       echo "already introduced the same changes; you might want to skip this patch."
+                       gettext "No changes - did you forget to use 'git add'?
+If there is nothing left to stage, chances are that something else
+already introduced the same changes; you might want to skip this patch."; echo
                        stop_here_user_resolve $this
                }
                unmerged=$(git ls-files -u)
                if test -n "$unmerged"
                then
-                       echo "You still have unmerged paths in your index"
-                       echo "did you forget to use 'git add'?"
+                       gettext "You still have unmerged paths in your index
+did you forget to use 'git add'?"; echo
                        stop_here_user_resolve $this
                fi
                apply_status=0