Closed
Bug 1491859
Opened 7 years ago
Closed 7 years ago
Migration fails silently when FTL in ctx.add_transforms is not well-formed
Categories
(Localization Infrastructure and Tools :: Fluent Migration, defect)
Localization Infrastructure and Tools
Fluent Migration
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: flod, Assigned: Pike)
References
Details
Attachments
(2 files)
Discovered while testing bug 1486936.
ctx.add_transforms(
"toolkit/toolkit/about/config.ftl",
"toolkit/toolkit/about/config.ftl",
transforms_from(
"""
config-window =
.title = { COPY(from_path, "window.title") }
.aria-describedby = { COPY(from_path, "boolean.label") }
config-about-warning-title =
.value = { COPY(from_path, "aboutWarningTitle.label") }
""", from_path="toolkit/chrome/global/config.dtd"))
This code fails silently: nothing is migrated, no errors in console.
Note that the patch in bug 1486936 had another ctx.add_transforms defined, which is ignored as well.
Assignee | ||
Comment 1•7 years ago
|
||
I would expect that to say
Skipping migration bug_1486936_about_config for test
flod, can you confirm?
Not that that's a great error message, but I'd like to confirm that the code behaves like I expect.
Flags: needinfo?(francesco.lodolo)
Reporter | ||
Comment 2•7 years ago
|
||
You're right, it actually says that (I missed it when filing the bug, because I misnamed the file…)
Running migration bug_1486936_about_config for test
WARNING:migrate:Plural rule for "'test'" is not defined in compare-locales
Skipping migration bug_1486936_about_config for test
Flags: needinfo?(francesco.lodolo)
Assignee | ||
Comment 3•7 years ago
|
||
Simple enough. The upcoming patch changes that to:
Running migration bug_1486936_about_config for test
WARNING:migrate:Plural rule for "'test'" is not defined in compare-locales
Skipping migration bug_1486936_about_config for test:
Transform contains parse error: Expected an entry start, at 1
Assignee: nobody → l10n
Assignee | ||
Comment 4•7 years ago
|
||
Reporter | ||
Comment 5•7 years ago
|
||
Comment on attachment 9009650 [details]
bug 1491859, expose underlying error when a transform fails, r=flod
Francesco Lodolo [:flod] has approved the revision.
Attachment #9009650 -
Flags: review+
Assignee | ||
Comment 6•7 years ago
|
||
https://hg.mozilla.org/l10n/fluent-migration/rev/b27d1d2aa83e, marking FIXED.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•