bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question regarding an error with msgfmt


From: Chusslove Illich
Subject: Re: Question regarding an error with msgfmt
Date: Sun, 25 Jan 2009 17:20:16 +0100
User-agent: KMail/1.9.9

> [: Bruno Haible :]
> Suppose you are translating a PO file, and it contains an entry like this:

Insofar as example translations are from a particular Balkan language with
thousand names, I'd suggest these instead (by order of appearance):

example 1

  #, c-format
  msgid "One ship departed"
  msgid_plural "%d ships departed"
  msgstr[0] "%d brodova isplovilo"
  msgstr[1] "%d brodova isplovilo"
  msgstr[2] "%d brodova isplovilo"

example 2

  #, c-format
  msgid "One ship departed"
  msgid_plural "%d ships departed"
  msgstr[0] "%d brod isplovio"
  msgstr[1] "%d broda isplovila"
  msgstr[2] "%d brodova isplovilo"

example 3

  msgstr[0] "jedan brod isplovio"

The example sentence is selected so that the plural forms have different
declinations of all words and are monotonically increasing in length.

On a side note, for Serbian we're turning to use this plural header in all
recent translations:

  "Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n%"
  "10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"

It's the same as the previous (i.e. current in Gettext doc), except that it
adds msgstr[3] for strictly n == 1.

While in the above example the extra form may not be so necessary -- we
could discuss if "1 brod isplovio" or "jedan brod isplovio" is better --
there are cases when having "1" is indisputably wrong. For example, in:

  msgid "Disregard this iceberg?"
  msgid_plural "Disregard these %d icebergs?"
  msgstr[0] "Zanemariti ovaj %d ledeni breg?"
  msgstr[1] "Zanemariti ova %d ledena brega?"
  msgstr[2] "Zanemariti ovih %d ledenih bregova?"

getting "Zanemariti ovaj 1 ledeni breg?" instead of "Zanemariti ovaj ledeni
breg?" is quite horrible.

So I'd ask Gettext documentation (and the rest) to change to the new plural
header, at least for Serbian. (Though any Slavic language without n == 1
form should be concerned, but...)

As to why msgstr[3] instead of msgstr[0] to be n == 1 form, it was not my
own idea, but was explained that it had something to do with easy upgrading
of translations with earlier plural header. At any rate, it serves well to
spook and get fixed any PO tools which would assume msgstr[0] is the
singular form.

-- 
Chusslove Illich (Часлав Илић)

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]