Closed
Bug 1423679
Opened 6 years ago
Closed 6 years ago
Update plural rule for Georgian (ka), Persian (fa), Turkish (tr), Uzbek (uz), Welsh (cy), Breton (br)
Categories
(Webtools Graveyard :: Pontoon, enhancement, P2)
Webtools Graveyard
Pontoon
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: flod, Assigned: mathjazz)
References
Details
Attachments
(2 files, 1 obsolete file)
We're changing the plural form for Georgian (ka) and Persian (fa) They're both moving from one form (other) to two forms (one, other). Is there a way to make this change not painful for GetText projects? Plurals for FTL files seem to be already OK (not sure I was expecting that). We might have other locales going through this kind of change: have one bug open for Turkish, we change az but it was already set to [one, other].
Reporter | ||
Updated•6 years ago
|
Flags: needinfo?(m)
Assignee | ||
Comment 1•6 years ago
|
||
In Gettext projects pluralized strings will become untranslated. We'd need to manually update stats to reflect that. Or we can also provide translations for the plural form "one" if it can be automated. Is there anything else we should?
Flags: needinfo?(m)
Assignee | ||
Updated•6 years ago
|
Priority: -- → P3
Reporter | ||
Comment 2•6 years ago
|
||
(In reply to Matjaz Horvat [:mathjazz] from comment #1) > Or we can also provide translations for the plural form "one" if it can be > automated. I think we should do this: provide the translation, copying the existing one. Note that we'll have Uzbek (bug 1423126) and likely Turkish (bug 1423131), so it would be worth documenting it.
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Summary: Update plural rule for Georgian (ka) and Persian (fa) → Update plural rule for Georgian (ka), Persian (fa), Turkish (tr)
Assignee | ||
Comment 3•6 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #2) > I think we should do this: provide the translation, copying the existing one. We should only do this if the existing translation is approved, right? Should we also copy translation author and timestamp to the new translation? > Note that we'll have Uzbek (bug 1423126) and likely Turkish (bug 1423131), > so it would be worth documenting it. We can build a management command to populate translations for the newly added plural forms and document it here: https://github.com/mozilla-l10n/documentation/tree/master/tools/pontoon. Or would that be an overkill?
Reporter | ||
Comment 4•6 years ago
|
||
(In reply to Matjaz Horvat [:mathjazz] from comment #3) > (In reply to Francesco Lodolo [:flod] from comment #2) > > I think we should do this: provide the translation, copying the existing one. > > We should only do this if the existing translation is approved, right? Yes, that seems the right thing to do. > Should we also copy translation author and timestamp to the new translation? Yes. > We can build a management command to populate translations for the newly > added plural forms and document it here: > https://github.com/mozilla-l10n/documentation/tree/master/tools/pontoon. > > Or would that be an overkill? Documenting it there might be overkill. The idea is to avoid having to analyze the problem again, if this happens in the future (hopefully it won't). If it's a command added to Pontoon codebase, I guess documenting it in the code itself would be enough?
Reporter | ||
Updated•6 years ago
|
Summary: Update plural rule for Georgian (ka), Persian (fa), Turkish (tr) → Update plural rule for Georgian (ka), Persian (fa), Turkish (tr), Uzbek (uz)
Assignee | ||
Comment 5•6 years ago
|
||
Let's run this as a data migration.
Assignee: nobody → m
Priority: P3 → P2
Reporter | ||
Comment 6•6 years ago
|
||
We will have a second scenario to keep in mind for planning this (it would be a future separate bug, but worth keeping in mind). Bug 1423138 is going to change plural rule for Welsh, adding 2 more forms. I'm not sure new values can be derived safely from existing translations (need to ask), so we might need to mark all plural strings in .po files as suggestions, or copy one existing translation to more than one plural form.
Reporter | ||
Comment 7•6 years ago
|
||
Confirmed that Welsh is moving from 4 to 6 forms: one of the existing plural forms should be copied over, and the string marked as fuzzy/suggested to let the team review them.
Reporter | ||
Updated•6 years ago
|
Summary: Update plural rule for Georgian (ka), Persian (fa), Turkish (tr), Uzbek (uz) → Update plural rule for Georgian (ka), Persian (fa), Turkish (tr), Uzbek (uz), Welsh (cy)
Reporter | ||
Comment 8•6 years ago
|
||
Breton: one, two, few, many, other.
Summary: Update plural rule for Georgian (ka), Persian (fa), Turkish (tr), Uzbek (uz), Welsh (cy) → Update plural rule for Georgian (ka), Persian (fa), Turkish (tr), Uzbek (uz), Welsh (cy), Breton (br)
Reporter | ||
Comment 9•6 years ago
|
||
On a side note: we now have the same problem with Fluent.
Reporter | ||
Comment 10•6 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #9) > On a side note: we now have the same problem with Fluent. Clarifying cryptic message: - New strings with plural forms will have the wrong variants by default - Existing strings with the wrong number of plural forms need to be migrated
Assignee | ||
Comment 11•6 years ago
|
||
We also need to update the `plural_rule` for those locales. :flod, could you confirm that these look OK? I've taken the plural rules from here: http://mlocati.github.io/cldr-to-gettext-plural-rules/
Attachment #8968473 -
Flags: review?(francesco.lodolo)
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Attachment #8968473 -
Attachment is patch: true
Reporter | ||
Comment 12•6 years ago
|
||
Comment on attachment 8968473 [details] locales.txt Persian is incorrect 'fa': { 'cldr_plurals': '1,5', 'plural_rule': '(n != 1)', }, It should be n > 1 (like French). Breton is different from what we have in pluralForm.jsm, but it's readable https://searchfox.org/mozilla-central/rev/a30a60eadcff99d2a043241955d215dbeccad876/intl/locale/PluralForm.jsm#73 And the results are the same as in our tests https://searchfox.org/mozilla-central/source/intl/locale/tests/unit/test_pluralForm.js#559 r+ with Persian fixed.
Attachment #8968473 -
Attachment is patch: false
Attachment #8968473 -
Flags: review?(francesco.lodolo) → review+
Assignee | ||
Comment 13•6 years ago
|
||
Attachment #8968473 -
Attachment is obsolete: true
Comment 14•6 years ago
|
||
Reporter | ||
Comment 15•6 years ago
|
||
CCing a few localizers to make sure they know why a few strings will show up as suggested.
Comment 16•6 years ago
|
||
Commit pushed to master at https://github.com/mozilla/pontoon https://github.com/mozilla/pontoon/commit/ddfb1dac0ce7ae8c84febad263c9ca620eb08e4f Bug 1423679: Update plural rules (#932) Fix plural rules for some locales and adjust Translations and Stats.
Assignee | ||
Comment 17•6 years ago
|
||
Fixed in: https://github.com/mozilla/pontoon/commit/ddfb1dac0ce7ae8c84febad263c9ca620eb08e4f
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Updated•2 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•