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
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+
Pull request has landed in master: https://github.com/mozilla-b2g/gaia/commit/9e4fe8cb130a86f5fd27d6d6b7aa9871f3736a27
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.