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

Re: translating via an intermediate language



Dwayne Bailey wrote:
> > The syntax for a mixed PO file could like this:
> > 
> >   msgid "Hello, world!"
> >   msgid[ru] "Здравствуй, мир!"
> >   msgstr "Chào thế giới !"
> 
> these are the issues I see:
> 
> * Plurals - mentioned already

I can reduce the number of plural forms to 2, by choosing for the
"singular" the one with n = 1 and for "plural" the one which is chosen
most often for n -> ∞.

> * fuzziness - if [ru] is fuzzy do you merge it or leave it out and how
> do you differentiate from [ru] fuzziness or fuzziness that relates to
> the target language.

If the Russian message translation is fuzzy, I don't store it in the
PO file. First the Russian translator has to make a correct translation,
then only it makes sense that other translators see it.

A message in the mixed PO file can become fuzzy if the msgid changed,
but also if the msgid[ru] changed while the msgid stayed the same.
The Vietnamese translator can distinguish these two cases (i.e. know
whether the English has changed, or the Russian one, or both) by looking
at the previous msgids.

"Previous msgids" will be a new feature in gettext 0.15.1. Quoting the
NEWS file:

 "msgmerge has a new option --previous that has the effect of saving the
  previous msgid of message when making them fuzzy. These previous msgids are
  stored in the resulting PO file, using a pseudo-comment syntax like this:

     #, fuzzy
     #| msgid "too many arguments"
     msgid "too few arguments"
     msgstr "trop d'arguments"

  The translator then only needs to compare the previous and the current
  msgid ("too many arguments" and "too few arguments"), and infer which
  parts of the translation she needs to change."

In our example,

  msgid "Hello, world!"
  msgid[ru] "Здравствуй, мир!"
  msgstr "Chào thế giới !"

can become

  #, fuzzy
  #| msgid "Hello, world!"
  msgid "Hello, the entire world!"
  msgid[ru] "Здравствуй, мир!"
  msgstr "Chào thế giới !"

or

  #, fuzzy
  #| msgid[ru] "Здравствуй, мир!"
  msgid "Hello, world!"
  msgid[ru] "Здравствулте, мир!"
  msgstr "Chào thế giới !"

> msginit would be a good way to initialise a file such as this by
> allowing you to specify the .po and language code any number of time
> 
> msgmerge would also need to be updated so that you can update a PO
> file's [xx] entries as well as its source entries.

Yes.

Bruno



Reply to: