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

[PATCH 1/2] i18n: leave \n out of translated diffstat

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jun 24, 2012, 12:41 UTC
Message-ID
<1340541692-10834-1-git-send-email-pclouds@gmail.com>

GETTEXT_POISON scrapes everything in translated strings, including \n. t4205.12 however needs this \n in matching the end result. Keep this \n out of translation to make t4205.12 happy.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 diff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/diff.c b/diff.c
index 1a594df..923b6aa 100644
--- a/diff.c
+++ b/diff.c
@@ -1397,7 +1397,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
 
 	if (!files) {
 		assert(insertions == 0 && deletions == 0);
-		return fputs(_(" 0 files changed\n"), fp);
+		return fprintf(fp, "%s\n", _(" 0 files changed"));
 	}
 
 	strbuf_addf(&sb,
-- 
1.7.8
Next: Nguyễn Thái Ngọc Duy
Message 1 of 11 in “i18n: leave \n out of translated diffstat”
  1. 1/2 i18n: leave \n out of translated diffstatNguyễn Thái Ngọc Duy, Jun 24, 2012
  2. 2/2 Add C_LOCALE_OUTPUT prereq to test cases that require English text matchingNguyễn Thái Ngọc Duy, Jun 24, 2012
  3. Jonathan NiederJun 24, 2012
  4. Nguyen Thai Ngoc DuyJun 25, 2012
  5. Jonathan NiederJun 25, 2012
  6. Nguyen Thai Ngoc DuyJun 25, 2012
  7. Jonathan NiederJun 25, 2012
  8. Jonathan NiederJun 24, 2012
  9. Junio C HamanoJun 25, 2012
  10. Nguyen Thai Ngoc DuyJun 25, 2012
  11. Jonathan NiederJun 25, 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.