Stop using non-standard attributes as a DTD migration legacy and lint for reoccurrences
Categories
(Firefox :: General, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: Gijs, Assigned: Gijs)
References
Details
Attachments
(4 files)
bug 1838549 happened because the content used to be localized using DTDs (which were processed at HTML/XUL-parse time), and used JS to update labels dynamically based on the non-standard attributes. When migrating to fluent, this ended up inadvertently depending on l10n timing, because the attribute could be blank if fluent translation hadn't happened yet at the point where the JS ran.
This is a bad pattern, full stop - the JS should just switch to a different l10n ID. The pre-fix-in-bug1838549 code was not only racy, but also would not work well if the document was retranslated after a language update, because the "real" label would not have been updated until the JS re-ran.
I have a WIP patch that lints for non-standard attributes, and it's found a few other instances of this, plus some cases where we've accidentally used a non-meaningful attribute (e.g. "tooltip") when we intended to use a "real" one (like "tooltiptext"), so a linter seems like it'd be useful.
Comment 1•1 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Migration' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•1 years ago
|
Updated•1 years ago
|
Assignee | ||
Comment 3•1 years ago
|
||
Assignee | ||
Comment 4•1 years ago
|
||
Depends on D181228
Assignee | ||
Comment 5•1 years ago
|
||
Depends on D181229
Assignee | ||
Comment 6•1 years ago
|
||
Depends on D181230
Comment 8•1 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2d8cda133356
https://hg.mozilla.org/mozilla-central/rev/153a0ea81f77
https://hg.mozilla.org/mozilla-central/rev/547458ae6707
https://hg.mozilla.org/mozilla-central/rev/e7e1efea4e06
Description
•