Skip to content

Commit 57984dd

Browse files
vascoolgitster
authored andcommitted
i18n: bisect: simplify error message for i18n
The message was not being extracted by xgettext, although it was marked for translation, seemingly because it contained a command substitution. Moreover, eval_gettext should be used instead of gettext for strings with substitution. See step 4. of section 15.5.2.1 Preparing Shell Scripts for Internationalization from gettext manual [1]: "Simplify translatable strings so that they don't contain command substitution ("`...`" or "$(...)") [...]" [1] http://www.gnu.org/software/gettext/manual/html_node/Preparing-Shell-Scripts.html Signed-off-by: Vasco Almeida <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c36d8ee commit 57984dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

git-bisect.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,9 @@ bisect_state() {
277277
0,*)
278278
die "$(gettext "Please call 'bisect_state' with at least one argument.")" ;;
279279
1,"$TERM_BAD"|1,"$TERM_GOOD"|1,skip)
280-
rev=$(git rev-parse --verify $(bisect_head)) ||
281-
die "$(gettext "Bad rev input: $(bisect_head)")"
280+
bisected_head=$(bisect_head)
281+
rev=$(git rev-parse --verify "$bisected_head") ||
282+
die "$(eval_gettext "Bad rev input: \$bisected_head")"
282283
bisect_write "$state" "$rev"
283284
check_expected_revs "$rev" ;;
284285
2,"$TERM_BAD"|*,"$TERM_GOOD"|*,skip)

0 commit comments

Comments
 (0)