Closed
Bug 566859
Opened 14 years ago
Closed 14 years ago
Plurals Formula for gd
Categories
(Core :: Internationalization: Localization, defect)
Core
Internationalization: Localization
Tracking
()
VERIFIED
FIXED
mozilla2.0b2
People
(Reporter: fios, Assigned: Mardak)
References
()
Details
Attachments
(1 file)
3.35 KB,
patch
|
smontagu
:
review+
Pike
:
review+
Mardak
:
feedback+
christian
:
approval1.9.2.9+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ga-IE; rv:1.9.2.5pre) Gecko/20100518 Namoroka/3.6.5pre ( .NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ga-IE; rv:1.9.2.5pre) Gecko/20100518 Namoroka/3.6.5pre ( .NET CLR 3.5.30729) The formula for Gaelic (gd) plurals needs amended - reflecting: Form 1 is for 1, 11, 21, 31; Form 2 is for 2, 12, 22, 32; Form 3 is for 3-10, 13-19, 23-29, 33-39; Form 4 is everything else: 20, 30, 40+ Kevin helped me put that into the right format: "Plural-Forms: nplurals=4; plural=(n%10==1 && n < 40) ? 0 : (n%10==2 && n < 40) ? 1 : (n==10 || (n%10 > 2 && n < 40)) ? 2 : 3\n" Reproducible: Always
Updated•14 years ago
|
Component: General → Localization
Product: Firefox → Core
QA Contact: general → localization
Comment 1•14 years ago
|
||
Is there progress to get the plural forms added to http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html? I'd love to keep our rules and theirs in sync if feasible.
Reporter | ||
Comment 2•14 years ago
|
||
At first glance the Irish they have looks wrong but I'll talk to Kevin and see if he knows how to convert them to their format.
Reporter | ||
Comment 3•14 years ago
|
||
Whatever the process is, it seems to be taking forever. I spoke to Kevin and he was going to get them to fix the Irish to begin with, still no luck. Is there a way we can implement this in Fx without relying on their site for now?
Comment 4•14 years ago
|
||
I don't think that "forever" is the right word, but either way, sure, we can have a patch without the cldr.
Reporter | ||
Comment 5•14 years ago
|
||
If someone is about to look at this, just hang on for a bit, there may be a bug in the formular. I'll post as soon as I can confirm either way. Will also push the CLDR addition.
Reporter | ||
Comment 6•14 years ago
|
||
Yes, there was a problem, apologies. It should be: 1, 11 >> Form 1 2, 12 >> Form 2 3-10, 13-19 >> Form 3 20 and anything above >> Form 4 I have also raised a ticket (both for Decimal and Vigesimal Gaelic, though I don't know if they handle two systems): http://unicode.org/cldr/trac/ticket/2883 As the release date has been pushed into the future I guess we can wait for a bit to see if they're quick enough?
Reporter | ||
Comment 7•14 years ago
|
||
Just coming out of a debate on WikiTranslate where I raised a ticket to refine the gd plural rules (http://translatewiki.net/w/i.php?title=Support&offset=20100703124759#New_plural_rules_for_Scots_Gaelic_%28gd%29_5290) In short, the issue was raised that WikiTranslate uses strings like PLURAL:$1|Hidden category|Hidden categories The problem arises that while Gaelic treats 1, 2, 11, 12 as singular forms, the Wiki system treats 2, 11, 12 as plurals and would thus create erroneous forms. The solution we came up with there is as follows: 1 >> Form 1 2 >> Form 2 3-10 >> Form 3 11 >> Form 1 12 >> Form 2 13-19 >> Form 3 0, 20 and anything above >> Form 4 Will that be an issue on Mozilla too?
Comment 8•14 years ago
|
||
Re comment 7, that won't be a problem for us, as we're hitting the plural form for all numbers. Mardak, would you mind doing another one of these patches?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 9•14 years ago
|
||
There's already two Gaelic rules: #4 Celtic (Scottish Gaelic) and #11 Celtic (Irish Gaeilge) https://developer.mozilla.org/En/Localization_and_Plurals#Plural_rule_.234_%283_forms%29 https://developer.mozilla.org/En/Localization_and_Plurals#Plural_rule_.2311_%285_forms%29 I'm assuming we want to add a new rule #16 instead of modifying the existing rules as the new rule has 4 forms instead of the 3 for #4 or 5 for #11.
Assignee | ||
Comment 10•14 years ago
|
||
Or is nobody using rule #4 which is labeled as Scottish Gaelic?
Assignee | ||
Comment 11•14 years ago
|
||
And just checking, 101, 111 as well as 102, 112 are treated as form 4 and not form 1 and 2 respectively.
Comment 12•14 years ago
|
||
I don't see any use of rule 4 in mxr on 1.9.2, http://mxr.mozilla.org/l10n-mozilla1.9.2/search?string=pluralRule+*%3D®exp=on&find=global%2Fintl.properties&findi=&filter=^[^\0]*%24&hitlimit=&tree=l10n-mozilla1.9.2 Guess that just changing rule 4 is a good idea.
Assignee | ||
Comment 13•14 years ago
|
||
Assuming the special case for 1,11 and 2,12 and between 0 and 20 are only for those numbers and not repeated in the hundreds like 101.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #457098 -
Flags: review?(smontagu)
Attachment #457098 -
Flags: review?(l10n)
Updated•14 years ago
|
Attachment #457098 -
Flags: review?(l10n)
Attachment #457098 -
Flags: review+
Attachment #457098 -
Flags: feedback?(fios)
Reporter | ||
Comment 14•14 years ago
|
||
Sorry was away in Edinburgh all day. #4 is the appropriate place but the original rules (1, 2, anything above) are very wrong, no idea where they came from. And yes, anything above twenty is covered by Form 4 in the decimal system, including 101, 102, 111, 112, 1001, 1012 etc. Given Kevin's involvement on Mozilla, I think we can safely assume that the rules for Irish are correct.
Comment 15•14 years ago
|
||
Comment on attachment 457098 [details] [diff] [review] v1 ># HG changeset patch ># User Edward Lee <edilee@mozilla.com> ># Date 1279042542 25200 ># Node ID 7fd5b300bdd8eb3947841e1c8400cc2668439c88 ># Parent 7133f717ed2ac649259ed3cc0fce53821d8a924e >Bug 566859 - Plurals Formula for gd >Replace the unused rule #4 (probably because it was wrong), with the correct forms for Scottish Gaelic. > >diff --git a/intl/locale/src/PluralForm.jsm b/intl/locale/src/PluralForm.jsm >--- a/intl/locale/src/PluralForm.jsm >+++ b/intl/locale/src/PluralForm.jsm >@@ -72,17 +72,17 @@ let gFunctions = [ > [1, function(n) 0], > // 1: English > [2, function(n) n!=1?1:0], > // 2: French > [2, function(n) n>1?1:0], > // 3: Latvian > [3, function(n) n%10==1&&n%100!=11?1:n!=0?2:0], > // 4: Scottish Gaelic >- [3, function(n) n==1?0:n==2?1:2], >+ [4, function(n) n==1||n==11?0:n==2||n==12?1:n>0&&n<20?2:3], > // 5: Romanian > [3, function(n) n==1?0:n==0||n%100>0&&n%100<20?1:2], > // 6: Lithuanian > [3, function(n) n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?2:1], > // 7: Russian > [3, function(n) n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2], > // 8: Slovak > [3, function(n) n==1?0:n>=2&&n<=4?1:2], >diff --git a/intl/locale/tests/unit/test_pluralForm.js b/intl/locale/tests/unit/test_pluralForm.js >--- a/intl/locale/tests/unit/test_pluralForm.js >+++ b/intl/locale/tests/unit/test_pluralForm.js >@@ -176,48 +176,48 @@ function run_test() > 3,2,3,3,3,3,3,3,3,3, > 3,2,3,3,3,3,3,3,3,3, > 3,2,3,3,3,3,3,3,3,3, > 3,2,3,3,3,3,3,3,3,3, > 3,2,3,3,3,3,3,3,3,3, > 3,2,3,3,3,3,3,3,3,3, > ], [ > // 4: Scottish Gaelic 0-9, 10-19, ..., 90-99 >+ 4,1,2,3,3,3,3,3,3,3, > 3,1,2,3,3,3,3,3,3,3, >- 3,3,3,3,3,3,3,3,3,3, >- 3,3,3,3,3,3,3,3,3,3, >- 3,3,3,3,3,3,3,3,3,3, >- 3,3,3,3,3,3,3,3,3,3, >- 3,3,3,3,3,3,3,3,3,3, >- 3,3,3,3,3,3,3,3,3,3, >- 3,3,3,3,3,3,3,3,3,3, >- 3,3,3,3,3,3,3,3,3,3, >- 3,3,3,3,3,3,3,3,3,3, >+ 4,4,4,4,4,4,4,4,4,4, >+ 4,4,4,4,4,4,4,4,4,4, >+ 4,4,4,4,4,4,4,4,4,4, >+ 4,4,4,4,4,4,4,4,4,4, >+ 4,4,4,4,4,4,4,4,4,4, >+ 4,4,4,4,4,4,4,4,4,4, >+ 4,4,4,4,4,4,4,4,4,4, >+ 4,4,4,4,4,4,4,4,4,4, > // 100-109, 110-119, ..., 190-199 >- 3,3,3,3,3,3,3,3,3,3, >- 3,3,3,3,3,3,3,3,3,3, >- 3,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,3,3, > 3,3,3,3,3,3,3,3,3,3, > 3,3,3,3,3,3,3,3,3,3,
Attachment #457098 -
Flags: review?(smontagu) → review+
Assignee | ||
Comment 16•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/1cb70c153b6e Replace the unused rule #4 (probably because it was wrong) with the correct forms for Scottish Gaelic. Also updated the docs: https://developer.mozilla.org/en/Localization_and_Plurals#Plural_rule_.234_%284_forms%29
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3b2
Assignee | ||
Comment 17•14 years ago
|
||
Comment on attachment 457098 [details] [diff] [review] v1 Michael, next time you can click the details link for an attachment that has feedback?you to mark it + or - when giving feedback as in comment 14.
Attachment #457098 -
Flags: feedback?(fios) → feedback+
Reporter | ||
Comment 18•14 years ago
|
||
Comment on attachment 457098 [details] [diff] [review] v1 feedback+
Reporter | ||
Comment 19•14 years ago
|
||
ah right I see what you mean now; will do in future, thanks for the pointer, still learning the ropes on Mozilla!
Reporter | ||
Comment 20•14 years ago
|
||
There's still a problem with the plurals I noticed in downloads.properties. The seconds for example are: diog;dhiog;diogan;diog (4 plurals) For some reason it uses plural 2 for everything. Same problem with Minutes I just noticed too. Suggestions welcome!
Comment 21•14 years ago
|
||
I filed bug 560521 on that, you'll actually need to specify to use the gaelic plural rule in intl.properties.
Reporter | ||
Comment 22•14 years ago
|
||
Ah got it, many thanks. Do I do another commit now or is that a bad idea seeing I did the "signoff" thing the other day?
Comment 23•14 years ago
|
||
Commented in bug 583571, which is the one that I actually filed (correcting the wrong bug number in comment 21).
Reporter | ||
Comment 24•14 years ago
|
||
Ok, I'm at a loss. I changed intl.properties from 1 to 4 (as on https://developer.mozilla.org/en/Localization_and_Plurals#Plural_rule_.234_%284_forms%29) but it still does not select the right form, e.g. out of diog;dhiog;diogan;diog - now it uses the 3rd form for everything. What else am I missing?
Comment 25•14 years ago
|
||
Doh, how could I not catch that? Requesting approval for 1.9.2. This is not affecting any localization but gaelic, thus really low risk to take on branch. On the other hand, it's really essential for gd to have this to deliver a good localization on 3.6.x.
blocking1.9.2: --- → ?
Comment 26•14 years ago
|
||
This isn't a blocker as we wouldn't hold a release for it, though we would certainly like the fix. I assume the blocking request was also an approval request for the patch as well, so I'll toggle it.
blocking1.9.2: ? → -
status1.9.2:
--- → wanted
Comment 27•14 years ago
|
||
Comment on attachment 457098 [details] [diff] [review] v1 a=LegNeato for 1.9.2.9. Please land on mozilla-1.9.2 default.
Attachment #457098 -
Flags: approval1.9.2.9+
Comment 28•14 years ago
|
||
landing, http://hg.mozilla.org/releases/mozilla-1.9.2/rev/0cf3900dea0d
Comment 29•14 years ago
|
||
Landing stuck, marking .9fixed. I tested this in a tinderbox-build, and I think it's right. Sadly it missed today's nightly, it's gonna only make it in for tomorrow. Michael, could you then verify?
Reporter | ||
Comment 30•14 years ago
|
||
Yes, will do!
Reporter | ||
Comment 31•14 years ago
|
||
Working beautifully now, many thanks!
Updated•14 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•