Code

gettextize: git-stash die + eval_gettext $* messages
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 14 Sep 2010 11:39:41 +0000 (11:39 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:58:25 +0000 (07:58 +0000)
Gettextize messages that used the $* variable. Since it's subroutine
local we have to provide an alias for it for eval_gettext.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
git-stash.sh

index a01bd5944787c6e6965e556605f3bc200ab07258..9c9ca8da6c1e4c6249094cc2ab2c1312f7646244 100755 (executable)
@@ -330,7 +330,10 @@ is_stash_like()
 }
 
 assert_stash_like() {
-       is_stash_like "$@" || die "'$*' is not a stash-like commit"
+       is_stash_like "$@" || {
+               args="$*"
+               die "$(eval_gettext "'\$args' is not a stash-like commit")"
+       }
 }
 
 is_stash_ref() {
@@ -338,7 +341,10 @@ is_stash_ref() {
 }
 
 assert_stash_ref() {
-       is_stash_ref "$@" || die "'$*' is not a stash reference"
+       is_stash_ref "$@" || {
+               args="$*"
+               die "$(eval_gettext "'\$args' is not a stash reference")"
+       }
 }
 
 apply_stash () {