Thread: I sort of hate singulars

I sort of hate singulars

From
Daniele Varrazzo
Date:
Hello,

Dealing with the Italian translation I've often been confronted with
singular/plural messages whose singular version doesn't really sound
good with a 1 in the message. E.g. in:

    msgid "I am drinking %d bottle of beer"
    msgid_plural "I am drinking %d bottles of beer"

The singular version with the placeholder replaced by 1 ("sto bevendo
1 bottiglia di birra") is possibly worse than the plural version with
1 as number ("sto bevendo 1 bottiglie di birra"). The best translation
would be "sto bevendo una bottiglia di birra" (not unlike English
where sometimes "a/an" would be better than "1/one" sometimes,
worsened by grammatical gender).

Gettext docs (https://www.gnu.org/software/gettext/manual/gettext.html#c_002dformat-Flag)
mentions that placeholders can be reordered. I wonder if they can be
omitted too, e.g. to translate the singular of:

    msgid "database \"%s\" must be vacuumed before %u more MultiXactId is used"
    msgid_plural "database \"%s\" must be vacuumed before %u more
MultiXactIds are used"

with something like:

    msgid "occorre effettuare un vacuum sul database \"%1$s\" per
usare un altro MultiXactId"
    msgid_plural "occorre effettuare un vacuum sul database \"%s\" per
usare altri %d MultiXactId"

or, in the beer example above, not having any placeholder at all in
the singular string. Would it work reliably on any platform where
PostgreSQL is supported? Or would it be better to settle with using
the plural version for the singular too? (Because "altri 1" would be a
normal computer naivety whereas "1 altro" sounds plain wrong).

-- Daniele


Re: I sort of hate singulars

From
Peter Eisentraut
Date:
On 4/17/16 1:20 PM, Daniele Varrazzo wrote:
> Dealing with the Italian translation I've often been confronted with
> singular/plural messages whose singular version doesn't really sound
> good with a 1 in the message. E.g. in:
>
>     msgid "I am drinking %d bottle of beer"
>     msgid_plural "I am drinking %d bottles of beer"
>
> The singular version with the placeholder replaced by 1 ("sto bevendo
> 1 bottiglia di birra") is possibly worse than the plural version with
> 1 as number ("sto bevendo 1 bottiglie di birra"). The best translation
> would be "sto bevendo una bottiglia di birra" (not unlike English
> where sometimes "a/an" would be better than "1/one" sometimes,
> worsened by grammatical gender).

I don't think it's possible to accomplish that in a reasonable way.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services