eval_gettextln does not work correctly?
I was running git with preloadable_libintl.so to catch unmarked strings and I saw this
domain "git"
msgid "The copy of the patch that failed is found in:\n"
" /home/pclouds/w/git/t/trash
directory.t4254-am-corrupt/.git/rebase-apply/patch" msgstr ""
which means git performed a lookup on that string. It is from git-am.sh:
eval_gettextln "The copy of the patch that failed is found in:
$dotest/patch"
I suppose it should look up "... $dotest/patch" instead (i.e. no variable expansion). Something is wrong here? I have a few local patches on top of master, but none of them touches gettext shell functions.
Signature · 1 line
Duy
Quoted 4 lines · Nguyen Thai Ngoc Duy
which means git performed a lookup on that string. It is from
git-am.sh:
eval_gettextln"The copy of the patch that failed is found in:
$dotest/patch"
Good catch. It should use single-quotes.
PATCH 1/1 am: quote string for translation before passing to eval_gettextln
If it's not quoted, the string is expanded before it gets looked up in gettext database and obviously nothing is returned.
---
Quoted 8 lines · Jonathan Nieder
Quoted 4 lines · Nguyen Thai Ngoc Duy
which means git performed a lookup on that string. It is from
git-am.sh:
eval_gettextln"The copy of the patch that failed is found in:
$dotest/patch"Good catch. It should use single-quotes.
Yep. Verified. Also checked that no other places have this problem. xgettext probably detects this too. Without this patch it does not collect this string. With this patch, it does.
git-am.sh | 4 ++--
1 tập tin đã bị thay đổi, 2 được thêm vào(+), 2 bị xóa(-)
git-am.sh +2 -2
@@ -855,8 +855,8 @@ did you forget to use 'git add'?" eval_gettextln 'Patch failed at $msgnum $FIRSTLINE' if test "$(git config --bool advice.amworkdir)" != false then - eval_gettextln "The copy of the patch that failed is found in: - $dotest/patch" + eval_gettextln 'The copy of the patch that failed is found in: + $dotest/patch' fi stop_here_user_resolve $this fi
Signature · 1 line
1.7.12.rc2.18.g61b472e
Re: [PATCH] am: quote string for translation before passing to eval_gettextln
Quoted 9 lines · Nguyễn Thái Ngọc Duy
If it's not quoted, the string is expanded before it gets looked up in gettext database and obviously nothing is returned.
Signed-off-by Nguyễn Thái Ngọc Duy <[email protected]>---
...
Yep. Verified. Also checked that no other places have this problem. xgettext probably detects this too. Without this patch it does not collect this string. With this patch, it does.
Will queue; thanks.
Quoted 19 lines
git-am.sh | 4 ++--1 tập tin đã bị thay đổi, 2 được thêm vào(+), 2 bị xóa(-)
git-am.sh +2
-2@@ -855,8 +855,8 @@ did you forget to use 'git add'?" eval_gettextln 'Patch failed at $msgnum $FIRSTLINE' if test "$(git config --bool advice.amworkdir)" != false then - eval_gettextln "The copy of the patch that failed is found in: - $dotest/patch" + eval_gettextln 'The copy of the patch that failed is found in: + $dotest/patch' fi stop_here_user_resolve $this fi