[email] Remove cache on localization change

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jrburke, Assigned: jrburke)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Bugs like bug 1138562 can occur depending on the order of bootstrapping for the l10n stuff and when the cache is saved. 

While bug 1138624 will take care of the string placeholders, the user (or more likely a QA person) will see an old localization of the cache after first switching locales.

To avoid those bugs being filed, html_cache should listen for localization changes and just clear the localStorage cache.

This should not be back-ported to the cookie cache mechanism (2.2 and earlier), as that one is a bit more complex to clear.
Created attachment 8571555 [details] [review]
[gaia] jrburke:bug1138625-email-clear-cache-localize > mozilla-b2g:master
(Assignee)

Updated

4 years ago
Attachment #8571555 - Flags: review?(bugmail)
Comment on attachment 8571555 [details] [review]
[gaia] jrburke:bug1138625-email-clear-cache-localize > mozilla-b2g:master

r=asuth by inspection on the logic and additional verification that we don't seem to listen for the "languagechange" event anywhere else in email so there shouldn't be any potential for ordering races/inconsistency that would interfere with the intent here.  If we do implement a follow-on that attempts to re-save the cache, we'll probably be fine, but then we'll want some comments about that in the code.  (Noting that l10n.js doesn't seem to provide any notifications to help us out in that case.)
Attachment #8571555 - Flags: review?(bugmail) → review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed

Updated

4 years ago
Keywords: checkin-needed

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.