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)
Localization Infrastructure and Tools
Fluent Migration
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: flod, Assigned: stas)
Details
Attachments
(1 file)
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.
Assignee | ||
Comment 2•7 years ago
|
||
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)
Reporter | ||
Comment 3•7 years ago
|
||
(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.
Reporter | ||
Comment 4•7 years ago
|
||
(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
Assignee | ||
Comment 5•7 years ago
|
||
Assignee: nobody → stas
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•7 years ago
|
||
Fixed as part of https://github.com/projectfluent/python-fluent/commit/6e14e772c973f54a7692bcfbd2a8932107e8c8b5.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•7 years ago
|
Blocks: fluent.migrate
Assignee | ||
Updated•7 years ago
|
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.
Description
•