Re: problem with plural-forms - Mailing list pgsql-hackers

From Greg Stark
Subject Re: problem with plural-forms
Date
Msg-id 0054431E-02E5-48B0-B698-5452297B1B40@enterprisedb.com
Whole thread Raw
In response to Re: problem with plural-forms  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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@commandprompt.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4)
Next
From: Tom Lane
Date:
Subject: Re: problem with plural-forms