Closed Bug 1441942 Opened 7 years ago Closed 7 years ago

Migration creates broken FTL for Arabic when missing a zero case

Categories

(Localization Infrastructure and Tools :: Fluent Migration, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: flod, Assigned: stas)

Details

Attachments

(1 file)

54 bytes, text/x-github-pull-request
Details | Review
Migration code generated two broken plural forms for Arabic, fixed in this changeset by removing the empty [zero] form. https://hg.mozilla.org/l10n-central/ar/rev/fbbc5b00392d1ea7d3fad60eaa4c2d40238f5619 This happened because the origin string has an empty zero form https://hg.mozilla.org/l10n-central/ar/file/7c077d8e0a59/browser/chrome/browser/preferences/preferences.properties#l253 The empty string should be serialized as {""}, but in this specific case (plurals) we should likely just drop the empty variant.
NI on Stas to pick his brain :)
Flags: needinfo?(stas)
Dropping empty variants sounds good but we should make sure we support the edge cases like `key=` and `key=;` in the legacy translations. I should also add checks to make sure empty TextElements are converted to {""} in the resulting AST. And in general, I'd like to write a few more tests for handling empty legacy values like `key=`. Can this wait a bit? I can work on this when I'm back from being sick.
Flags: needinfo?(stas)
(In reply to Staś Małolepszy :stas from comment #2) > Can this wait a bit? I can work on this when I'm back from being sick. Definitely. The Arabic bug was already fixed.
(In reply to Staś Małolepszy :stas from comment #2) > Dropping empty variants sounds good but we should make sure we support the > edge cases like `key=` and `key=;` in the legacy translations. I should also > add checks to make sure empty TextElements are converted to {""} in the > resulting AST. And in general, I'd like to write a few more tests for > handling empty legacy values like `key=`. Found another error due to empty strings https://l10n.mozilla.org/dashboard/compare?run=924810#issue1 https://hg.mozilla.org/l10n-central/si/file/f1da9ec0c3f6/browser/browser/preferences/preferences.ftl#l196
Attached file Pull Request
Assignee: nobody → stas
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
No longer blocks: fluent.migrate
Component: Python Library → Fluent Migration
Product: L20n → Localization Infrastructure and Tools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: