[PATCH 37/51] i18n: git-stash die + eval_gettext $* messages
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 3, 2011, 16:46 UTC
- Message-ID
- <1301849175-1697-38-git-send-email-avarab@gmail.com>
- In-Reply-To
- <1301849175-1697-1-git-send-email-avarab@gmail.com>
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 | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh index 06f00ae..afe7043 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -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 () {
-- 1.7.4.1