git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junio@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH] Revert diffstat back to English
Date: Fri, 14 Sep 2012 09:54:03 -0700	[thread overview]
Message-ID: <7vvcfg5yvo.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: Junio C. Hamano's message of "Fri\, 14 Sep 2012 09\:35\:37 -0700"

Junio C Hamano <gitster@pobox.com> writes:

> 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');

  parent reply	other threads:[~2012-09-14 16:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-25 19:26 [PATCH RFC 0/2] Mixing English and a local language Nguyễn Thái Ngọc Duy
2012-08-25 19:26 ` [PATCH 1/2] Allow to print diffstat in English regardless current locale Nguyễn Thái Ngọc Duy
2012-08-25 19:26 ` [PATCH 2/2] format-patch: always print diffstat in English Nguyễn Thái Ngọc Duy
2012-09-12 14:05 ` [PATCH RFC 0/2] Mixing English and a local language Nguyen Thai Ngoc Duy
2012-09-12 18:18   ` Junio C Hamano
2012-09-13 13:28     ` Jeff King
2012-09-13 14:16       ` [PATCH] Revert diffstat back to English Nguyễn Thái Ngọc Duy
2012-09-13 14:57         ` Jeff King
2012-09-13 17:39         ` Junio C Hamano
2012-09-13 18:40           ` Junio C Hamano
2012-09-13 21:01             ` Jeff King
2012-09-13 21:10               ` Junio C Hamano
2012-09-13 21:20                 ` Jeff King
2012-09-13 21:26                   ` Junio C Hamano
2012-09-13 21:31                     ` Jeff King
2012-09-13 21:47                       ` Junio C Hamano
2012-09-14  0:11                         ` Jeff King
2012-09-14 11:56                           ` Nguyen Thai Ngoc Duy
2012-09-14 16:54         ` Junio C Hamano [this message]
2012-09-15  2:41           ` Nguyen Thai Ngoc Duy
2012-09-13 17:30       ` [PATCH RFC 0/2] Mixing English and a local language Junio C Hamano
2012-09-13 17:52         ` Junio C Hamano
2012-09-13 18:04           ` Jeff King
2012-09-13 18:00         ` Jeff King
2012-09-14 10:41           ` Michael J Gruber
2012-09-14 11:35             ` Nguyen Thai Ngoc Duy
2012-09-14 12:40               ` [PATCH] Makefile: respect $LINGUAS variable on selecting .mo files to install Nguyễn Thái Ngọc Duy
2012-09-14 13:06                 ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vvcfg5yvo.fsf@alter.siamese.dyndns.org \
    --to=junio@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).