i18n: git-am die messages
The die messages in git-am need to use: die "$(gettext "string")" Since gettext(1) emits the message instead of returning it like the C equivalent, and our die() function in git-sh-setup needs to get a string as an argument. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
May 21, 2011 at 18:43 UTC
790872592ee51318062a2c0cc68d1040d74ca529
1 file changed
+7
-7
git-am.sh
+7
-7
@@ -44,7 +44,7 @@ require_work_tree
44
cd_to_toplevel
45
46
git var GIT_COMMITTER_IDENT >/dev/null ||
47
- die "You need to set your committer info first"
47
+ die "$(gettext "You need to set your committer info first")"
48
49
if git rev-parse --verify -q HEAD >/dev/null
50
then
@@ -362,7 +362,7 @@ do
362
--rebasing)
363
rebasing=t threeway=t keep=t scissors=f no_inbody_headers=t ;;
364
-d|--dotest)
365
- die "-d option is no longer supported. Do not use."
365
+ die "$(gettext "-d option is no longer supported. Do not use.")"
366
;;
367
--resolvemsg)
368
shift; resolvemsg=$1 ;;
@@ -425,12 +425,12 @@ then
425
false
426
;;
427
esac ||
428
- die "previous rebase directory $dotest still exists but mbox given."
428
+ die "$(eval_gettext "previous rebase directory \$dotest still exists but mbox given.")"
429
resume=yes
430
431
case "$skip,$abort" in
432
t,t)
433
- die "Please make up your mind. --skip or --abort?"
433
+ die "$(gettext "Please make up your mind. --skip or --abort?")"
434
;;
435
t,)
436
git rerere clear
@@ -457,7 +457,7 @@ then
457
else
458
# Make sure we are not given --skip, --resolved, nor --abort
459
test "$skip$resolved$abort" = "" ||
460
- die "Resolve operation not in progress, we are not resuming."
460
+ die "$(gettext "Resolve operation not in progress, we are not resuming.")"
461
462
# Start afresh.
463
mkdir -p "$dotest" || exit
@@ -522,7 +522,7 @@ case "$resolved" in
522
if test "$files"
523
then
524
test -n "$HAS_HEAD" && : >"$dotest/dirtyindex"
525
- die "Dirty index: cannot apply patches (dirty: $files)"
525
+ die "$(eval_gettext "Dirty index: cannot apply patches (dirty: \$files)")"
526
fi
527
esac
528
@@ -695,7 +695,7 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."; ec
695
if test "$interactive" = t
696
then
697
test -t 0 ||
698
- die "cannot be interactive without stdin connected to a terminal."
698
+ die "$(gettext "cannot be interactive without stdin connected to a terminal.")"
699
action=again
700
while test "$action" = again
701
do