Closed
Bug 1423138
Opened 5 years ago
Closed 5 years ago
[cy] Switch plural rule from #1 (2 forms) to #18 (6 forms)
Categories
(Mozilla Localizations :: cy / Welsh, defect)
Mozilla Localizations
cy / Welsh
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: flod, Assigned: rprys)
References
Details
Welsh has 6 plural forms according to CLDR http://www.unicode.org/cldr/charts/dev/supplemental/language_plural_rules.html#cy But Firefox and Firefox for Android are set to use the plural form 1, which means 2 plural forms (like English). Translate House has 4 forms http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html In comparison, Irish uses 5 forms https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals At this point I have no clue which form is correct, I only know for sure that the one used in Firefox is wrong. Once change, about 50/60 strings will need to be fixed.
Reporter | ||
Updated•5 years ago
|
Flags: needinfo?(rprys)
Assignee | ||
Comment 1•5 years ago
|
||
It's complicated and depends what you're asking for... Delyth is offering you a tutorial on the fringes of Y'all Hands next week :-)
Flags: needinfo?(rprys)
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Rhoslyn Prys from comment #1) > Delyth is offering you a tutorial on the fringes of Y'all Hands next week That sounds like a great idea :)
Reporter | ||
Comment 3•5 years ago
|
||
I fixed the following errors. Locale: cy (5) - charts.totalSecondsNonBlocking (devtools/client/netmonitor.properties) has 3 plural forms (requested: 2) - shortSeconds (toolkit/chrome/mozapps/downloads/downloads.properties) has 4 plural forms (requested: 2) - shortMinutes (toolkit/chrome/mozapps/downloads/downloads.properties) has 4 plural forms (requested: 2) - shortHours (toolkit/chrome/mozapps/downloads/downloads.properties) has 4 plural forms (requested: 2) - shortDays (toolkit/chrome/mozapps/downloads/downloads.properties) has 4 plural forms (requested: 2) We'll still need to figure out what's the best rule for Welsh.
Comment 4•5 years ago
|
||
Hi, the correct rule is the six-category one in the CLDR. From a computational perspective, there are six categories but no single word distinguishes all six categories. That is why the CLDR minimal pairs use both "ci" (dog) and "cath" (cat) at the same time. (Disclaimer: I wrote those examples for Mark Davis many years ago). The confusion arises because, from a traditional grammar perspective, the form changes that mark agreement with the numbers are not called "plural forms" but "mutations". So Welsh speakers would never say that Welsh "has six plural forms". But to generate translations that Welsh speakers regard as correct for any number, the six-category rule must be used.
Comment 5•5 years ago
|
||
Oh, the Translate House data is a very old version of the CLDR data which was incorrect for Welsh (e.g. you can see it in CLDR 1.8.1). So it should be regarded as a pre-correction copy, and not as an authority in itself.
Reporter | ||
Comment 6•5 years ago
|
||
Thanks David, this sounds reasonable to me. @Rhoslyn Any concern in moving forward with 6 forms? You'll need to verify about plural 50 strings Pontoon is also set to use 4 forms right now, missing zero and many, and it doesn't look like something that can be automated.
Flags: needinfo?(rprys)
Assignee | ||
Comment 7•5 years ago
|
||
No, I accept David'a recommendation. No problem with dealing with the changes - will they appear in Pontoon as fuzzy?
Flags: needinfo?(rprys)
Reporter | ||
Comment 8•5 years ago
|
||
(In reply to Rhoslyn Prys from comment #7) > No problem with dealing with the changes - will they appear in Pontoon as > fuzzy? No, you'll need to go through them for Firefox, Firefox for Android, etc. It's not as painful as it sounds, since you can search all plural strings and show them in one screen. I'm afraid it's going to be more complicated for .po based products and Pontoon, but we can deal with that later. First of all I need to patch our pluralform system, since we don't have any rule similar to this. I'll ping you as soon as we're ready on the code side.
Reporter | ||
Comment 9•5 years ago
|
||
@Rhos I've switched the plural rule in Gecko to 18. At this point you can update strings, they will ship in Firefox 59 https://pontoon.mozilla.org/cy/firefox/all-resources/?status=translated&search=Localization_and_Plurals https://pontoon.mozilla.org/cy/firefox-for-android/all-resources/?status=translated&search=Localization_and_Plurals Thunderbird (which won't ship until 60) https://pontoon.mozilla.org/cy/thunderbird/all-resources/?status=translated&search=Localization_and_Plurals https://pontoon.mozilla.org/cy/lightning/all-resources/?status=translated&search=Localization_and_Plurals
Summary: [cy] Verify plural rule for Welsh → [cy] Switch plural rule from #1 (2 forms) to #18 (6 forms)
Reporter | ||
Comment 10•5 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #9) > @Rhos > I've switched the plural rule in Gecko to 18. Forgot the link: https://hg.mozilla.org/l10n-central/cy/rev/5933d78c2433bc4063b828a1880143bf46a9cf0d
Assignee | ||
Comment 11•5 years ago
|
||
Ok, I've updated the strings. Thanks.
Reporter | ||
Comment 12•5 years ago
|
||
(In reply to Rhoslyn Prys from comment #11) > Ok, I've updated the strings. Thanks. At first glance, I don't see anything updated in Firefox or Fennec in Pontoon. I only see one landing in Mercurial for Thunderbird, and it's incorrect. https://hg.mozilla.org/l10n-central/cy/rev/b30b368f8094 glodaFacetView.facets.mode.top.listAllLabel=Rhestru'r #1i gyd;Rhestru'r #1 i gyd; There should be six forms, each one separated by a semicolon stringID = form1;form2;form3;form4;form5;form6 The string above has 3 form, and the 3rd form is empty, since the string ends with a semicolon.
Assignee | ||
Comment 13•5 years ago
|
||
OK... Like this? Mae #1 tab wedi cyrraedd o #2.;Mae #1 tab wedi cyrraedd o #2;Mae #1 tab wedi cyrraedd o #2;Mae #1 tab wedi cyrraedd o #2;Mae #1 tab wedi cyrraedd o #2;Mae #1 tab wedi cyrraedd o #2
Reporter | ||
Comment 14•5 years ago
|
||
(In reply to Rhoslyn Prys from comment #13) > OK... Like this? > Mae #1 tab wedi cyrraedd o #2.;Mae #1 tab wedi cyrraedd o #2;Mae #1 tab wedi > cyrraedd o #2;Mae #1 tab wedi cyrraedd o #2;Mae #1 tab wedi cyrraedd o > #2;Mae #1 tab wedi cyrraedd o #2 Exactly, remembering the the forms are used in this order: - 0 - 1 - 2 - 3 - 6 - anything else
Assignee | ||
Comment 15•5 years ago
|
||
Does this follow the same pattern? The first part looks like - 1 #1 has been installed successfully.;#2 add-ons have been installed successfully.
Reporter | ||
Comment 16•5 years ago
|
||
(In reply to Rhoslyn Prys from comment #15) > Does this follow the same pattern? The first part looks like - 1 > #1 has been installed successfully.;#2 add-ons have been installed > successfully. That's an old string that was poorly done, and it's been fixed in Firefox 59. Ignore the first form, translate everything as "#2 add-ons have been installed"
Assignee | ||
Comment 17•5 years ago
|
||
Does this follow the same pattern? Delete Page;Delete Pages
Reporter | ||
Comment 18•5 years ago
|
||
(In reply to Rhoslyn Prys from comment #17) > Does this follow the same pattern? > Delete Page;Delete Pages Yes. That's another poor string, they should always use the number explicitly. Anyhow, you still need 6 forms in Welsh, e.g. Dileu Tudalen;Dileu Tudalennau;Dileu Tudalennau;Dileu Tudalennau;Dileu Tudalennau;Dileu Tudalennau
Assignee | ||
Comment 19•5 years ago
|
||
e;e s;s m;m d;d ?
Reporter | ||
Comment 20•5 years ago
|
||
Sadly, you need to repeat it 6 times e;e;e;e;e;e The idea is that the code doesn't know if the string is dumb (like this) or more complex: it's going to search for 6 forms for Welsh, falling back to the first form and log an error if it doesn't find the one it's searching for. The plural is there to accommodate for locales that won't use a single character as unit of measurement.
Assignee | ||
Comment 21•5 years ago
|
||
I'm a bit confused by this type of string - See one result;See all #1 results. If: - 0 - 1 - 2 - 3 - 6 - anything else Then the first part appears to be - 1. Where is - 0? How do I deal with - 0?
Reporter | ||
Comment 22•5 years ago
|
||
In English: 1st form: 1 2nd form: 0, anything else So it uses the 2nd form, "See all 0 results". The code should probably know not to show this specific string for 0, since it doesn't make a lot of sense. In case of Welsh, you have a specific case for 0 that you still need to add explicitly. So, you will end up with something similar to: > Gweld y #1 canlyniad;Gweld y #1 canlyniad;Gweld y #1 canlyniad;Gweld y #1 canlyniad;Gweld y #1 canlyniad;Gweld y #1 canlyniad The 1st form is used for 0. You could also translate this as > ;Gweld y #1 canlyniad;Gweld y #1 canlyniad;Gweld y #1 canlyniad;Gweld y #1 canlyniad;Gweld y #1 canlyniad Notice the starting semicolon? It means that there's a 1st form, and it's empty. Or even: > No results;Gweld y #1 canlyniad;Gweld y #1 canlyniad;Gweld y #1 canlyniad;Gweld y #1 canlyniad;Gweld y #1 canlyniad Up to you what you prefer, I'd just go with the full 6 forms for sake of simplicity. Side note: remember that the semicolon is just a separator, not proper punctuation. For example: > Gweld y canlyniad;gweld y #1 canlyniad The second sentence should start uppercase too.
Assignee | ||
Comment 23•5 years ago
|
||
Thanks, I'll go with the full 6 forms to avoid confusion. I'm easily confused. ;-)
Reporter | ||
Comment 24•5 years ago
|
||
Please do not change this string: the correct value is 18 (number of rule, not number of forms) https://pontoon.mozilla.org/cy/firefox/toolkit/chrome/global/intl.properties/?search=pluralRule&string=81020
Reporter | ||
Comment 25•5 years ago
|
||
These are the remaining errors: - addonsInstalledNeedsRestart (browser/chrome/browser/browser.properties) has 2 plural forms (requested: 6) - addonsGenericInstalledNeedsRestart (browser/chrome/browser/browser.properties) has 5 plural forms (requested: 6) - removeContainerMsg (browser/chrome/browser/preferences/preferences.properties) has 5 plural forms (requested: 6) - tabs.closeWarningMultiple (browser/chrome/browser/tabbrowser.properties) has 7 plural forms (requested: 6) - crashesTitle (toolkit/chrome/global/aboutSupport.properties) has 5 plural forms (requested: 6) - webextPerms.hostDescription.tooManySites (mobile/android/chrome/browser.properties) has 5 plural forms (requested: 6) I've already fixed these two (they had double ;): - showAllSearchResults (toolkit/chrome/mozapps/extensions/extensions.properties) has 9 plural forms (requested: 6) - webrtcIndicator.sharingWindowWithNTabs.menuitem (browser/chrome/browser/webrtcIndicator.properties) has 8 plural forms (requested: 6)
Assignee | ||
Comment 26•5 years ago
|
||
Thanks, I've checked the above and corrected them - these however appeared to be correct ??? - addonsGenericInstalledNeedsRestart (browser/chrome/browser/browser.properties) has 5 plural forms (requested: 6) - removeContainerMsg (browser/chrome/browser/preferences/preferences.properties) has 5 plural forms (requested: 6) - tabs.closeWarningMultiple (browser/chrome/browser/tabbrowser.properties) has 7 plural forms (requested: 6)
Reporter | ||
Comment 27•5 years ago
|
||
(In reply to Rhoslyn Prys from comment #26) > Thanks, I've checked the above and corrected them - these however appeared > to be correct ??? > - addonsGenericInstalledNeedsRestart > (browser/chrome/browser/browser.properties) has 5 plural forms (requested: 6) There was still a period instead of semicolon between form 2 and 3. I've replaced it. > - removeContainerMsg > (browser/chrome/browser/preferences/preferences.properties) has 5 plural > forms (requested: 6) No separator between form 1 and 2 ('… Cynhwysydd hwn?Os fyddwch yn …'), added it. > - tabs.closeWarningMultiple (browser/chrome/browser/tabbrowser.properties) > has 7 plural forms (requested: 6) This one looks correct now. Before, since it started with ";", it had an empty form 1.
Reporter | ||
Comment 28•5 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #25) > These are the remaining errors: > - addonsInstalledNeedsRestart (browser/chrome/browser/browser.properties) > has 2 plural forms (requested: 6) This one still has 2 forms. While it's unused in 59, it would be good to fix for 58, translating only the second part (as per comment 16) https://pontoon.mozilla.org/cy/firefox/browser/chrome/browser/browser.properties/?search=addonsInstalledNeedsRestart&string=74463 Side question: other projects based on other formats (Gettext, Fluent). Right now they're using 4 forms, we need to move them to 6. Would it be safe to copy one of existing values into the 2 missing forms? Should those strings be marked as suggested/fuzzy to be double checked? For example: "x minutes ago" https://pontoon.mozilla.org/cy/firefox-screenshots/server.ftl/?search=ago&string=168505
Assignee | ||
Comment 29•5 years ago
|
||
Ok I've corrected the issues you outlined, I think they all now have 6 forms. In the meanwhile I've received a useful e-mail from David outlining some further changes in relation to mutations and making the initial form more natural and less a variation of forms 2-6. I'll be giving those some attention over the next few days, if that's OK. Side question - yes, they need to change to 6 and having the changes marked as suggested/fuzzy would enable me to identify and check them.
Reporter | ||
Comment 30•5 years ago
|
||
(In reply to Rhoslyn Prys from comment #29) > Ok I've corrected the issues you outlined, I think they all now have 6 > forms. Thanks. I can confirm that there are no more errors for Firefox and Firefox for Android. The dashboard will start showing wrong number plurals as warnings in the near future, so they will be easier to spot in all products, also for new strings. > In the meanwhile I've received a useful e-mail from David outlining some > further changes in relation to mutations and making the initial form more > natural and less a variation of forms 2-6. I'll be giving those some > attention over the next few days, if that's OK. Yes, that's absolutely OK. > Side question - yes, they need to change to 6 and having the changes marked > as suggested/fuzzy would enable me to identify and check them. OK. Let's close this one and wait for bug 1423679 to fix that for other projects.
Assignee: nobody → rprys
Blocks: 1423679
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Comment 31•5 years ago
|
||
https://hg.mozilla.org/l10n/compare-locales/rev/3c0e25a6cd9b is the fix for compare-locales.
Reporter | ||
Comment 32•5 years ago
|
||
For now please ignore warnings reported in the dashboard for plural rules, everything is correct https://l10n.mozilla.org/teams/cy We need to release a new version of compare-locales that knows about this bug. It should happen in a few days.
Reporter | ||
Comment 33•5 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #32) > For now please ignore warnings reported in the dashboard for plural rules, > everything is correct > https://l10n.mozilla.org/teams/cy OK, new version of compare-locales is up, and errors reported from now on are actual errors ;-) https://l10n.mozilla.org/dashboard/compare?run=898422#issue1 String: https://pontoon.mozilla.org/cy/firefox/toolkit/chrome/global/findbar.properties/?search=FoundMatchesCountLimit&string=80344
Assignee | ||
Comment 34•5 years ago
|
||
findbar.properties ↓ expecting 6 plurals, found 5 at line 22, column 24 for FoundMatchesCountLimit Ok, I fixed that one about an hour ago, it should be correct now - I've just counted 6. I've also included suggestions by David on the plural forms.
Reporter | ||
Comment 35•5 years ago
|
||
Confirming that now it's fixed.
Reporter | ||
Updated•5 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•