git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] am: quote string for translation before passing to eval_gettextln

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Aug 22, 2012, 14:48 UTC
Message-ID
<1345646883-18746-1-git-send-email-pclouds@gmail.com>
In-Reply-To
<20120822141726.GA674@mannheim-rule.local>

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 <pclouds@gmail.com>
---
 On Wed, Aug 22, 2012 at 9:17 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
 > Nguyen Thai Ngoc Duy wrote:
 >
 >> 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(-)
diff --git a/git-am.sh b/git-am.sh
index bd9620c..c682d34 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -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
-- 
1.7.12.rc2.18.g61b472e
Previous: Jonathan NiederNext: Junio C Hamano
Message 3 of 4 in “eval_gettextln does not work correctly?”
  1. Nguyen Thai Ngoc DuyAug 22, 2012
  2. Jonathan NiederAug 22, 2012
  3. am: quote string for translation before passing to eval_gettextlnNguyễn Thái Ngọc Duy, Aug 22, 2012
  4. Junio C HamanoAug 22, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.