Re: problem with plural-forms

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: problem with plural-forms
Дата
Msg-id 20090526140535.GB32650@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: problem with plural-forms  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: problem with plural-forms  (Greg Stark <greg.stark@enterprisedb.com>)
Re: problem with plural-forms  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: problem with plural-forms  (Aidan Van Dyk <aidan@highrise.ca>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: generic options for explain
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4)