Implement plural forms for real in l10n module.

RESOLVED FIXED

Status

Add-on SDK
General
P1
normal
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: ochameau, Assigned: ochameau)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Currently, l10n module only implements engligh plural forms:
https://github.com/mozilla/addon-sdk/blob/master/packages/addon-kit/lib/l10n.js#L37-42


We need to implement specific set of forms for each language, by following rules described here:
http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html

We may use code provided by PluralForms.jsm:
http://mxr.mozilla.org/mozilla-central/source/intl/locale/src/PluralForm.jsm#67

Updated

6 years ago
Priority: -- → P1
(Assignee)

Comment 1

6 years ago
Created attachment 591814 [details]
Pull request 332

-> more information in the pull request.
Assignee: nobody → poirot.alex
(Assignee)

Comment 2

6 years ago
Here is the documentation for current XUL way of doing localization with plural forms:
https://developer.mozilla.org/En/Localization_and_Plurals#Plural_rule_.2312_%286_forms%29
(Assignee)

Comment 3

5 years ago
Comment on attachment 591814 [details]
Pull request 332

As you already reviewed the very first l10n patch, I'd think that you may review this one too? Feel free to redirect the review to Irakli if you do not feel reviewing JS code.
Attachment #591814 - Flags: review?(warner-bugzilla)
I've added comments to the pull request.. looks mostly good, one potential real bug, a handful of style recommendations.
Comment on attachment 591814 [details]
Pull request 332

Looks good: r+ with or without the remaining minor suggestions on the pull-request
Attachment #591814 - Flags: review?(warner-bugzilla) → review+

Comment 6

5 years ago
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/e0aaf738d89ac77341ca39594a7ff4b028292093
Merge pull request #332 from ochameau/implement-plural-forms

Bug 719402 - Implement plural forms r=@warner
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.