Closed Bug 1415906 Opened 2 years ago Closed 2 years ago

Verify plural rule for Macedonian

Categories

(Mozilla Localizations :: mk / Macedonian, defect)

defect
Not set

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: flod, Assigned: flod)

References

Details

(Whiteboard: cldr-data-done)

Attachments

(1 file)

This document says that Macedonian uses form #14
https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals#Plural_rule_14_(3_forms)

- one form for numbers ending in 1
- one form for numbers ending in 2
- one form for anything else

Code is defined here
http://searchfox.org/mozilla-central/rev/c99d035f00dd894feff38e4ad28a73fb679c63a6/intl/locale/PluralForm.jsm#67-68

(n) => n%10==1?0:n%10==2?1:2]

But, Firefox is set to use a different rule (#15)
https://hg.mozilla.org/l10n-central/mk/file/default/toolkit/chrome/global/intl.properties#l18

And that has only 2 forms:
* one form for anything that ends in 1, but not 11
* one form for anything else

CLDR has yet another form
http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#mk
- one form for numbers ending in 1
- one form for anything else

Which one is correct for Macedonian?
Goce, Novica: can you help?
Flags: needinfo?(nnovica)
Flags: needinfo?(goce.mitevski)
From Novica via IRC:
* #14 is not correct for Macedonian
* CLDR is not correct. 11 should be treated as any other number, not like 1, 21, 31, etc.
Flags: needinfo?(nnovica)
> 11 should be treated as any other number, not like 1, 21, 31, etc.

Correct.
Flags: needinfo?(goce.mitevski)
Ok, so we have a few problems:
1) mk should not be using #15. We should likely fix #14, since no other locale is using it, and switch Macedonian to it.
2) We need to figure out how to report this problem back to CLDR.

Not sure in which order this should happen.

I spend quite a bit of time searching, but wasn't able to find a single document explaining plural forms in Macedonian.
Flags: needinfo?(gdamjan)
Whiteboard: cldr-data
(In reply to Francesco Lodolo [:flod] (traveling, slow answers, back Nov 22) from comment #4)
> Ok, so we have a few problems:
> 1) mk should not be using #15. We should likely fix #14, since no other
> locale is using it, and switch Macedonian to it.

Adding another step: since we switch from 3 forms to 2 forms, I'll need to invalidate all existing plural translations in Pontoon (likely 30/40), so that team can check them and remove the third form.
> Adding another step: since we switch from 3 forms to 2 forms, I'll need to
> invalidate all existing plural translations in Pontoon (likely 30/40), so
> that team can check them and remove the third form.

Let me know if you need any help with those.
I tried to find some reference for this, but couldn't find it.

anyways,
everything modulo 100 equaling 11 is plural (11, 111, 211, 1011…)
everything else modulo 10 equaling 1 is singular (1, 21, 31, 101, 121)
everything else is plural.

if I find a reference I'll update the bug
Flags: needinfo?(gdamjan)
(In reply to Damjan Georgievski from comment #7)
> everything modulo 100 equaling 11 is plural (11, 111, 211, 1011…)
> everything else modulo 10 equaling 1 is singular (1, 21, 31, 101, 121)
> everything else is plural.

Do you use the same number for 11 and 22 for example? Not sure if "plural" means that they're using the same form, so you end up with only 2 forms.
> Do you use the same number for 11 and 22 for example? Not sure if "plural"
> means that they're using the same form, so you end up with only 2 forms.

The numbers are different but the form is the same:

eleven (11) apples = единаесет (11) **јаболки** (јаболки means apples)
twenty-two (22) apples = дваесет и две (22) **јаболки**

one (1) apple = едно (1) **јаболко** (јаболко means apple)
a hundred and one (101) apple = сто и едно (101) **јаболко**
yes, there are only two forms, singular and plural
Duplicate of this bug: 467547
Duplicate of this bug: 775918
Assignee: nobody → francesco.lodolo
Comment 7 seems to be describing plural rule #15, so maybe just the documentation needs to be fixed:

Plural Rule #14 (3 forms):
Families: unknown
…

Plural Rule #15 (2 forms):
Families: Icelandic, Slavic (Macedonian)
…
Yes, I need to update docs, reference in file, and report to CLDR.
(In reply to Ed Lee :Mardak from comment #13)
> Comment 7 seems to be describing plural rule #15, so maybe just the
> documentation needs to be fixed:
> 
> Plural Rule #14 (3 forms):
> Families: unknown
> …
> 
> Plural Rule #15 (2 forms):
> Families: Icelandic, Slavic (Macedonian)
> …

There is no Slavic (Macedonian). The language is Macedonian.
Slavic intended as the language family (that's also what the MDN page said). Fixed the MDN page, filing bugs for the rest.
This also needs an update in compare-locales, but not completely sure how to change it: change say 14 (unused) and remove the CLDR note? Can we go without a bug?
https://hg.mozilla.org/l10n/compare-locales/file/tip/compare_locales/plurals.py#l41
(In reply to Francesco Lodolo [:flod] from comment #16)
> Fixed the MDN page, filing bugs for the rest.

What's the fix, because I cannot find Macedonian anywhere on the page. Rule 15 still says just: Icelandic.
(In reply to Goce Mitevski from comment #18)
> (In reply to Francesco Lodolo [:flod] from comment #16)
> > Fixed the MDN page, filing bugs for the rest.
> 
> What's the fix, because I cannot find Macedonian anywhere on the page. Rule
> 15 still says just: Icelandic.

Removed from 14, forgot to update 15.
Summarizing since this bug has become pretty confusing.
* mk is already using rule #15, and that's correct. No need to change strings, or update an existing rule.
* We only need to update references to Macedonian in code and documentation, since it wrongly references rule #14.
* We need to report the issue back to CLDR.
(In reply to Francesco Lodolo [:flod] from comment #21)
> Summarizing since this bug has become pretty confusing.
> * mk is already using rule #15, and that's correct. No need to change
> strings, or update an existing rule.
> * We only need to update references to Macedonian in code and documentation,
> since it wrongly references rule #14.
> * We need to report the issue back to CLDR.

Thanks Francesco.
Comment on attachment 8933579 [details]
Bug 1415906 - Update references to Macedonian in PluralForm.jsm

https://reviewboard.mozilla.org/r/204514/#review210144
Attachment #8933579 - Flags: review?(l10n) → review+
Pushed by axel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/37b4ae2a4693
Update references to Macedonian in PluralForm.jsm r=Pike
(In reply to Francesco Lodolo [:flod] from comment #17)
> This also needs an update in compare-locales, but not completely sure how to
> change it: change say 14 (unused) and remove the CLDR note? Can we go
> without a bug?
> https://hg.mozilla.org/l10n/compare-locales/file/tip/compare_locales/plurals.
> py#l41

https://hg.mozilla.org/l10n/compare-locales/rev/6cecafb4384d93ada1dbf4f1497c3b023f255c32, this was just a comment fix. The value was already 15. Didn't fidgit with the cldr note, mostly because I forgot, and who cares about un-used, right?
https://hg.mozilla.org/mozilla-central/rev/37b4ae2a4693
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
@goce (or others)

To answer a question asked in
https://unicode.org/cldr/trac/ticket/10857

Using their own examples
http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#mk

Can you confirm that 

11 ден (incorrect)
11 дена (correct)
Flags: needinfo?(goce.mitevski)
11 ден (incorrect) - True. Incorrect.
11 дена (correct) - True. Correct.
Flags: needinfo?(goce.mitevski)
Whiteboard: cldr-data → cldr-data-done
You need to log in before you can comment on or make changes to this bug.