Re: Proposal of code changes for l10n in FF3

Marek Stepien <[email protected]> Sun, 06 Aug 2006 18:48:23 +0200
Newsgroups gmane.comp.mozilla.internationalization
Message-ID <v-OdnQZnLfXLgEvZnZ2dnUVZ_sednZ2d__18459.8639760681$1154883016$gmane$org@mozilla.org>
Jean-Marc Desperrier napisał(a):
> Is it some js, that must be added in the localisation, or an XPCOM
> component ? 

The localization would only need to provide the plural forms expression
that decides which plural form is correct for a specific number.

> Maybe the nicest is an XPCOM component, that you can choose
> to code in js, or in low level language when that is more adapted.

Probably, yes.

But I suppose a getFormattedPluralString method next to
getString and getFormattedString would be the most natural place for
this.

> Or, well maybe we should include in the i18n code a table driven plural
> chooser, and the l10n provides the tables so that we solve the
> performance problem.

What do you mean by "table driven plural chooser"?

> If it's *really* complex, there could be a way by
> which the localisation provide it's own XPCOM implementation to call.

XPCOM component is not something that a localization team (often
consisting of non-techies) should provide. They should only provide the
plural forms expression, like for gettext, and preferably it should be
the same expression as in gettext, like these:

http://www.wordforge.org/static/l10n-pluralforms.html

(note: I don't know how accurate this page is, however it seems OK for
English, Germand and Polish)

-- 
Marek Stępień <[email protected]>
AviaryPL - polski zespół lokalizacyjny Mozilli
http://www.firefox.pl/ | http://www.mozilla.org.pl/