Re: problem with plural-forms

From: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Zdenek Kotala <Zdenek(dot)Kotala(at)sun(dot)com>
Subject: Re: problem with plural-forms
Date: 2009-05-26 14:14:54
Message-ID: 0054431E-02E5-48B0-B698-5452297B1B40@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Isn't case I think in these two cases that using "one" is actively a
bad idea. These aren't English sentences they're fragments meant to
report numerical results to programmers. We don't use "two" or "three"
either.

If the value were just part of some full sentence where the actual
value wasn't the key piece of data such as some error messages the
situation might be different.

--
Greg

On 26 May 2009, at 15:05, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
wrote:

> Tom Lane wrote:
>
>> That advice is, if not outright wrong, at least incredibly
>> short-sighted. The method breaks the instant you have any additional
>> values to print. For example, this ain't gonna work:
>>
>> printf (ngettext ("One file removed, containing %lu bytes",
>> "%d files removed, containing %lu bytes", n),
>> n, total_bytes);
>
> I think it should use the %2$s style specifier in that case. This
> should work:
>
>> printf (ngettext ("One file removed, containing %2$lu bytes",
>> "%d files removed, containing %lu bytes", n),
>> n, total_bytes);
>
> --
> Alvaro Herrera http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-05-26 14:19:50 Re: problem with plural-forms
Previous Message Tom Lane 2009-05-26 14:09:01 Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4)