git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Jon Forrest <nobozo@gmail.com>
Cc: unlisted-recipients:; (no To-header on input)
	git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] For Real - Fixed pluralization in diff reports
Date: Wed, 03 Aug 2011 06:38:43 -0700 (PDT)	[thread overview]
Message-ID: <m3livdqh9h.fsf@localhost.localdomain> (raw)
In-Reply-To: <4E36B8E4.5080900@gmail.com>

Jon Forrest <nobozo@gmail.com> writes:
> On 8/1/2011 2:58 AM, Sverre Rabbelier wrote:
>> On Mon, Aug 1, 2011 at 06:46, Jon Forrest<nobozo@gmail.com>  wrote:

>>>         fprintf(options->file, "%s", line_prefix);
>>>         fprintf(options->file,
>>> -              " %d files changed, %d insertions(+), %d deletions(-)\n",
>>> -              total_files, adds, dels);
>>> +              " %d file%s changed, %d insertion%s(+), %d deletion%s(-)\n",
>>> +              total_files, total_files == 1 ? "" : "s", adds, adds == 1 ?
>>> "" : "s", dels,
>>> +               dels == 1 ? "" : "s");
>>>   }
>>
>> Also, this is rather detrimental to the i18n effort methinks?

Besides, as it was already said, this is an API.
 
> If the goal if the i18n effort is also to produce grammatically
> correct output in all the supported languages then the
> tests that my patch would break would have to be rewritten
> anyway.

That's not it.

The problem is that above code assumes that plural form can be formed
by adding suffix, and it assumes that is only one plural form... both
assumptions does not hold for non-English.

C.f. "Additional functions for plural forms" chapter in gettext info
page: http://www.gnu.org/s/hello/manual/gettext/Plural-forms.html

-- 
Jakub Narębski

  parent reply	other threads:[~2011-08-03 13:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01  4:46 [PATCH] For Real - Fixed pluralization in diff reports Jon Forrest
2011-08-01  4:50 ` Nguyen Thai Ngoc Duy
2011-08-01  4:57   ` Jon Forrest
2011-08-01  5:21     ` Nguyen Thai Ngoc Duy
2011-08-01  9:58 ` Sverre Rabbelier
2011-08-01 14:32   ` Jon Forrest
2011-08-01 18:06     ` Jeff King
2011-08-01 18:27       ` Jon Forrest
2011-08-01 18:32         ` Sverre Rabbelier
2011-08-01 18:38           ` Jeff King
2011-08-03 13:38     ` Jakub Narebski [this message]
2011-08-03 16:52       ` Jon Forrest

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=m3livdqh9h.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=nobozo@gmail.com \
    /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).