summaryrefslogtreecommitdiff
path: root/git-sh-setup.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-12-20 17:36:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-20 17:36:23 (GMT)
commitacefe2be287b099886f1240bd1f5adfa66dbadee (patch)
tree5de1e456fac773cd31c74ac2efc9b2d06ad332d4 /git-sh-setup.sh
parent415c7dd026e4649bea48c35ccbe29d2fa8b69be5 (diff)
downloadgit-acefe2be287b099886f1240bd1f5adfa66dbadee.zip
git-acefe2be287b099886f1240bd1f5adfa66dbadee.tar.gz
git-acefe2be287b099886f1240bd1f5adfa66dbadee.tar.bz2
i18n: fix misconversion in shell scripts
An earlier series that was merged at 2703572b3a ("Merge branch 'va/i18n-even-more'", 2016-07-13) failed to use $(eval_gettext "string with \$variable interpolation") and instead used gettext in a few places, and ended up showing the variable names in the message, e.g. $ git submodule fatal: $program_name cannot be used without a working tree. Catch these mistakes with $ git grep -n '[^_]gettext .*\\\$' and fix them all to use eval_gettext instead. Reported-by: Josh Bleecher Snyder Acked-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-sh-setup.sh')
-rw-r--r--git-sh-setup.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 2eda134..c7b2a95 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -194,14 +194,14 @@ require_work_tree_exists () {
if test "z$(git rev-parse --is-bare-repository)" != zfalse
then
program_name=$0
- die "$(gettext "fatal: \$program_name cannot be used without a working tree.")"
+ die "$(eval_gettext "fatal: \$program_name cannot be used without a working tree.")"
fi
}
require_work_tree () {
test "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true || {
program_name=$0
- die "$(gettext "fatal: \$program_name cannot be used without a working tree.")"
+ die "$(eval_gettext "fatal: \$program_name cannot be used without a working tree.")"
}
}