Re: gettext, plural form and translation

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <stark(at)enterprisedb(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Sergey Burladyan <eshkinkot(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: gettext, plural form and translation
Date: 2009-03-19 13:29:00
Message-ID: 49C2489C.4010208@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> Greg Stark wrote:
>>> If the "(n rows)" is the *only* message that needs it then I think it
>>> would be simpler to just make it "(Rows: n)" instead. But I wouldn't
>>> be surprised if there were other messages with similar issues.
>
>> There are a few more, e.g.,
>
>> %d index pages have been deleted
>> %d connections
>> Identifier must be less than %d characters.
>
> What's supposed to happen when a message contains more than one
> number (for example, most of the vacuum activity messages)?

Heh. Good point. That is not supported. It would obviously explode
the API. But I agree it's a problem.

Btw., you can find out how much of a problem by using

for x in $(find . -name "*.pot"); do msggrep -K -E -e '%[diu]
[[:alpha:]].*%[diu] [[:alpha:]]' $x; done

and manually hand-filtering the rest. I count about 16 problem
messages. They are mostly vacuum messages as well as messages of the
kind "expected %d things but received only %d items". There are a
number of additional messages that circumvent the problem by writing
"expected %d things but received only %d", but that is not possible in
all cases.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aidan Van Dyk 2009-03-19 13:54:40 Re: gettext, plural form and translation
Previous Message Tom Lane 2009-03-19 12:40:39 Re: gettext, plural form and translation