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

Re: [PATCH] Revert diffstat back to English

From
Junio C Hamano <junio@pobox.com>
Date
Sep 14, 2012, 16:54 UTC
Message-ID
<7vvcfg5yvo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1347545786-936-1-git-send-email-pclouds@gmail.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>> This reverts the i18n part of 7f81463 (Use correct grammar in diffstat
>> summary line - 2012-02-01) but still keeps the grammar correctness for
>> English. It also reverts b354f11 (Fix tests under GETTEXT_POISON on
>> diffstat - 2012-08-27). The result is diffstat always in English
>> for all commands.
>>
>> This helps stop users from accidentally sending localized
>> format-patch'd patches.
>>
>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Why am I getting this from t3300?
    --- expected    2012-09-14 16:43:09.000000000 +0000
    +++ current     2012-09-14 16:43:09.000000000 +0000
    @@ -1,2 +1,2 @@
      "tabs\t,\" (dq) and spaces"
    - 1 file changed, 0 insertions(+), 0 deletions(-)
    + 1 files changed, 0 insertion(+), 0 deletion(-)

Ah, your rewrite of Q_() is wrong. Will squash the attached in before queueing this for maint.

Thanks.
 diff.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git c/diff.c w/diff.c
index 3ddf0e6..1d9783c 100644
--- c/diff.c
+++ w/diff.c
@@ -1401,7 +1401,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
 	}
 
 	strbuf_addf(&sb,
-		    files ? " %d files changed" : " %d file changed",
+		    (files == 1) ? " %d file changed" : " %d files changed",
 		    files);
 
 	/*
@@ -1418,7 +1418,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
 		 * do not translate it.
 		 */
 		strbuf_addf(&sb,
-			    insertions ? ", %d insertions(+)" : ", %d insertion(+)",
+			    (insertions == 1) ? ", %d insertion(+)" : ", %d insertions(+)",
 			    insertions);
 	}
 
@@ -1428,7 +1428,7 @@ int print_stat_summary(FILE *fp, int files, int insertions, int deletions)
 		 * do not translate it.
 		 */
 		strbuf_addf(&sb,
-			    deletions ? ", %d deletions(-)" : ", %d deletion(-)",
+			    (deletions == 1) ? ", %d deletion(-)" : ", %d deletions(-)",
 			    deletions);
 	}
 	strbuf_addch(&sb, '\n');
Previous: Nguyen Thai Ngoc DuyNext: Nguyen Thai Ngoc Duy
Message 19 of 28 in “Mixing English and a local language”
  1. 0/2 Mixing English and a local languageNguyễn Thái Ngọc Duy, Aug 25, 2012
  2. 1/2 Allow to print diffstat in English regardless current localeNguyễn Thái Ngọc Duy, Aug 25, 2012
  3. 2/2 format-patch: always print diffstat in EnglishNguyễn Thái Ngọc Duy, Aug 25, 2012
  4. Nguyen Thai Ngoc DuySep 12, 2012
  5. Junio C HamanoSep 12, 2012
  6. Jeff KingSep 13, 2012
  7. Revert diffstat back to EnglishNguyễn Thái Ngọc Duy, Sep 13, 2012
  8. Jeff KingSep 13, 2012
  9. Junio C HamanoSep 13, 2012
  10. Junio C HamanoSep 13, 2012
  11. Jeff KingSep 13, 2012
  12. Junio C HamanoSep 13, 2012
  13. Jeff KingSep 13, 2012
  14. Junio C HamanoSep 13, 2012
  15. Jeff KingSep 13, 2012
  16. Junio C HamanoSep 13, 2012
  17. Jeff KingSep 14, 2012
  18. Nguyen Thai Ngoc DuySep 14, 2012
  19. Junio C HamanoSep 14, 2012
  20. Nguyen Thai Ngoc DuySep 15, 2012
  21. Junio C HamanoSep 13, 2012
  22. Junio C HamanoSep 13, 2012
  23. Jeff KingSep 13, 2012
  24. Jeff KingSep 13, 2012
  25. Michael J GruberSep 14, 2012
  26. Nguyen Thai Ngoc DuySep 14, 2012
  27. Makefile: respect $LINGUAS variable on selecting .mo files to installNguyễn Thái Ngọc Duy, Sep 14, 2012
  28. Michael J GruberSep 14, 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.