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

Re: [translate-pootle] [Translation-i18n] gettext with non-en source language



F Wolff wrote:
> > What you call "gettext's English-centredness" is only a recommendation
> > in the doc. You _can_ use another language as the language of the source
> > files and the msgids in the PO files. Did you try it? Did you encounter
> > problems?
> 
> Well, I did not try it, but the example used here (Czech as source
> language) won't work, because it has three plural forms.

Good point. But this problem can be overcome by defining a function

const char *
cz_ngettext (const char *singular, const char *paucal, const char *plural,
             unsigned long n)
{
  const char *translation = ngettext (singular, plural, n);
  if (translation == singular || translation == plural)
    return (n == 1 ? singular : n >= 2 && n <= 4 ? paucal : plural);
  else
    return translation;
}

then using cz_ngettext in the source code, and finally passing the option
--keyword=cz_ngettext:1,3 to xgettext.

> I foresee a possible scenario for example
> where someone in francophone Africa writes in French which will be the
> common language to use to translate into local languages. Not the best
> choice to get you translations in all the world's languages, perhaps,
> but the correct choice for their circumstances. I'm speaking quite
> hypothetical now, of course.

Quite hypothetical, indeed. Africa is not yet connected to the programmer's
net. I got a single mail from Africa in 14 years. (Not counting the masses
of Nigeria connection spam :-))

> Although it would be interesting to see how
> many people will be able to contribute for the first time if
> understanding of English is removed as obstacle.

That appears to depend on the country's culture or economic situation. There
must be good knowledge of English in India, yet there are reportedly only
7 free software developers in whole India.

Bruno



Reply to: