Closed
Bug 747911
Opened 12 years ago
Closed 12 years ago
Add plural rule for Breton (br)
Categories
(Core :: Internationalization: Localization, defect)
Core
Internationalization: Localization
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: mnedeleg, Assigned: mnedeleg)
Details
Attachments
(1 file, 1 obsolete file)
1.86 KB,
patch
|
Pike
:
review+
smontagu
:
review+
|
Details | Diff | Splinter Review |
Since we started the breton localization, we use only 2 plural forms which is accepted but it would be more correct if we could use the following plural rules: - Form 1 for numbers that ends with 1 (except those ending with 11,71,91) - Form 2 for numbers that ends with 2 (except those ending with 12,72,92) - Form 3 for numbers that ends with 3, 4 or 9 (except those ending with 13,14,19,73,74,79,93,94,99) - Form 4 for numbers that ends with 1 000 000 - Form 5 for the other numbers You can find the same rule in the Unicode repository (though the form 3 is written differently) : http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html Would it be possible to add this plural rule to Mozilla products ? I have looked at the existing rules at the following URL but there is nothing that match the breton one: https://developer.mozilla.org/en/Localization_and_Plurals I have made some tests with a PO file with the rule below. The format seems to be the same as the one used in intl/locale/src/PluralForm.jsm Plural-Forms: nplurals=5; plural=n%10==1&&n%100!=11&&n%100!=71&&n%100!=91?0:n%10==2&&n%100!=12&&n%100!=72&&n%100!=92?1:(n%10==3||n%10==4||n%10==9)&&n%100!=13&&n%100!=14&&n%100!=19&&n%100!=73&&n%100!=74&&n%100!=79&&n%100!=93&&n%100!=94&&n%100!=99?2:n%1000000==0&&n!=0?3:4;
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #620349 -
Flags: review?(l10n)
Comment 2•12 years ago
|
||
Comment on attachment 620349 [details] [diff] [review] Patch for PluralForm.jsm Review of attachment 620349 [details] [diff] [review]: ----------------------------------------------------------------- This will need to have tests, too. Also, is this the same form as http://unicode.org/cldr/trac/ticket/2886#comment:9 ? Didn't dive into the details, but I'd like to make sure if we're doing the same thing or something differing.
Attachment #620349 -
Flags: review?(l10n) → review-
Comment 3•12 years ago
|
||
PS: The existing tests are in http://mxr.mozilla.org/mozilla-central/source/intl/locale/tests/unit/
Assignee | ||
Comment 4•12 years ago
|
||
We're doing the same thing. The following link mentions the bug 2886 you gave in comment 2 : http://unicode.org/cldr/trac/browser/trunk/common/supplemental/plurals.xml#L97 And the rules are the same as the one i use.
Assignee | ||
Comment 5•12 years ago
|
||
I added a test for the breton rule to the file intl/locale/tests/unit/test_pluralForm.js. But I didn't manage to run this test. How can I do that ?
Attachment #620349 -
Attachment is obsolete: true
Attachment #623403 -
Flags: review?(l10n)
Comment 6•12 years ago
|
||
Comment on attachment 623403 [details] [diff] [review] Patch for PluralForm.jsm and test_pluralForm.js Review of attachment 623403 [details] [diff] [review]: ----------------------------------------------------------------- Sorry for the late response. You run the tests in a build with --enable-tests, and then from the top-level object directory, make SOLO_FILE="test_pluralForm.js" -C intl/locale/tests/ check-one https://developer.mozilla.org/en/Writing_xpcshell-based_unit_tests#Your_first_xpcshell-based_test has more info. I'm cancelling the review request for now, feel free to re-request once you've successfully run the tests.
Attachment #623403 -
Flags: review?(l10n)
Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 623403 [details] [diff] [review] Patch for PluralForm.jsm and test_pluralForm.js I run the test and everything works fine with the plural rule I have added. You can review the patch.
Attachment #623403 -
Flags: review?(l10n)
Comment 8•12 years ago
|
||
Comment on attachment 623403 [details] [diff] [review] Patch for PluralForm.jsm and test_pluralForm.js Review of attachment 623403 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me, requesting review from Simon, too.
Attachment #623403 -
Flags: review?(smontagu)
Attachment #623403 -
Flags: review?(l10n)
Attachment #623403 -
Flags: review+
Updated•12 years ago
|
Attachment #623403 -
Flags: review?(smontagu) → review+
Comment 9•12 years ago
|
||
Flagging for check-in. Michel, to make landing of future patches easier, mind checking out https://developer.mozilla.org/en/Creating_a_patch_that_can_be_checked_in on a few technical steps that save our landing heros some time?
Keywords: checkin-needed
Assignee | ||
Comment 10•12 years ago
|
||
Thanks you, Axel! I will take care of that if I have to do patches in the future.
Updated•12 years ago
|
Assignee: nobody → mnedeleg
Comment 11•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/aba4c340a437 Thanks for the patch, Michel! Sorry for the delay getting it checked in.
Comment 12•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/aba4c340a437
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•