git-am: take advantage of gettextln and eval_gettextln.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jon Seymour committed Aug 7, 2011 at 21:58 UTC de88c1ceda8ded0722faaa6ddcc2375957ef8732
1 file changed +14 -17
git-am.sh
+14 -17
@@ -89,11 +89,8 @@ safe_to_abort () {
89 then
90 return 0
91 fi
92 - (
93 - gettext "You seem to have moved HEAD since the last 'am' failure.
94 -Not rewinding to ORIG_HEAD" &&
95 - echo
96 - ) >&2
92 + gettextln "You seem to have moved HEAD since the last 'am' failure.
93 +Not rewinding to ORIG_HEAD" >&2
94 return 1
95 }
96
@@ -102,9 +99,9 @@ stop_here_user_resolve () {
99 printf '%s\n' "$resolvemsg"
100 stop_here $1
101 fi
105 - eval_gettext "When you have resolved this problem run \"\$cmdline --resolved\".
102 + eval_gettextln "When you have resolved this problem run \"\$cmdline --resolved\".
103 If you would prefer to skip this patch, instead run \"\$cmdline --skip\".
107 -To restore the original branch and stop patching run \"\$cmdline --abort\"."; echo
104 +To restore the original branch and stop patching run \"\$cmdline --abort\"."
105
106 stop_here $1
107 }
@@ -118,7 +115,7 @@ go_next () {
115
116 cannot_fallback () {
117 echo "$1"
121 - gettext "Cannot fall back to three-way merge."; echo
118 + gettextln "Cannot fall back to three-way merge."
119 exit 1
120 }
121
@@ -611,9 +608,9 @@ do
608 go_next && continue
609
610 test -s "$dotest/patch" || {
614 - eval_gettext "Patch is empty. Was it split wrong?
611 + eval_gettextln "Patch is empty. Was it split wrong?
612 If you would prefer to skip this patch, instead run \"\$cmdline --skip\".
616 -To restore the original branch and stop patching run \"\$cmdline --abort\"."; echo
613 +To restore the original branch and stop patching run \"\$cmdline --abort\"."
614 stop_here $this
615 }
616 rm -f "$dotest/original-commit" "$dotest/author-script"
@@ -648,7 +645,7 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
645
646 if test -z "$GIT_AUTHOR_EMAIL"
647 then
651 - gettext "Patch does not have a valid e-mail address."; echo
648 + gettextln "Patch does not have a valid e-mail address."
649 stop_here $this
650 fi
651
@@ -699,7 +696,7 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
696 action=again
697 while test "$action" = again
698 do
702 - gettext "Commit Body is:"; echo
699 + gettextln "Commit Body is:"
700 echo "--------------------------"
701 cat "$dotest/final-commit"
702 echo "--------------------------"
@@ -763,16 +760,16 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
760 # working tree.
761 resolved=
762 git diff-index --quiet --cached HEAD -- && {
766 - gettext "No changes - did you forget to use 'git add'?
763 + gettextln "No changes - did you forget to use 'git add'?
764 If there is nothing left to stage, chances are that something else
768 -already introduced the same changes; you might want to skip this patch."; echo
765 +already introduced the same changes; you might want to skip this patch."
766 stop_here_user_resolve $this
767 }
768 unmerged=$(git ls-files -u)
769 if test -n "$unmerged"
770 then
774 - gettext "You still have unmerged paths in your index
775 -did you forget to use 'git add'?"; echo
771 + gettextln "You still have unmerged paths in your index
772 +did you forget to use 'git add'?"
773 stop_here_user_resolve $this
774 fi
775 apply_status=0
@@ -797,7 +794,7 @@ did you forget to use 'git add'?"; echo
794 fi
795 if test $apply_status != 0
796 then
800 - eval_gettext 'Patch failed at $msgnum $FIRSTLINE'; echo
797 + eval_gettextln 'Patch failed at $msgnum $FIRSTLINE'
798 stop_here_user_resolve $this
799 fi
800