Thread (49 messages) flat view 49 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH v2 34/48] i18n: git-stash die + eval_gettext $* messages

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:51:17
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 git-stash.sh |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh
index 3d89c15..509e14f 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -321,7 +321,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() {
@@ -329,7 +332,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.5.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help