Closed
Bug 1716664
Opened 3 years ago
Closed 3 years ago
[fluent-dom] Skip applying async translation if `data-l10n-id` was removed before application
Categories
(Core :: Internationalization: Localization, enhancement)
Core
Internationalization: Localization
Tracking
()
RESOLVED
FIXED
91 Branch
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: zbraniecki, Assigned: zbraniecki)
References
Details
Attachments
(1 file)
While working on bug 1613705 we identified additional case where we can short-circuit through applying translation if the l10n-id annotation is removed before the l10n frame completes.
An example:
- code sets
data-l10n-id
triggering L10nMutation - At animation frame, we coalesce all pending translations
- TranslateElements is fired asynchronously for translations of elements scheduled in (1)
- While the async I/O is being executed, code removes the
data-l10n-id
- ApplyTranslations is executed on all elements
Between (2) and (3) we remove from the list elements if data-l10n-id
was removed immediately - https://searchfox.org/mozilla-central/rev/d97dca5907e2a0a77a2435b24ef980268cd3c4fe/dom/l10n/L10nMutations.cpp#137-139
but if FlushPendingTranslations
has been called and the removal of the attribute happens between that and ApplyTranslations
we will apply the translation.
We can use the same if/continue in ApplyTranslations
to improve that.
Assignee | ||
Updated•3 years ago
|
Assignee: nobody → zbraniecki
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Attachment #9227292 -
Attachment description: WIP: Bug 1716664 - Skip applying translations on elements that had their data-l10n-id removed. → Bug 1716664 - Skip applying translations on elements that had their data-l10n-id removed.
Pushed by zbraniecki@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/da56143c727a Skip applying translations on elements that had their data-l10n-id removed. r=platform-i18n-reviewers,dminor
Comment 4•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox91:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•