Clean up bootstrap mozL10n API use in Email

RESOLVED FIXED

Status

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: zbraniecki, Assigned: zbraniecki)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Email currently works around the bug in mozL10n.ready. 

This should be fixed https://github.com/mozilla-b2g/gaia/blob/master/apps/email/js/l10n.js#L7-L13 once we fix bug 993188.
Depends on: 993188
Blocks: 1000593
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Posted file pull request
I moved away from using mozL10n.ready because the code does not benefit from the callack being fired on language change.

It overall seems that the whole app does not carry retranslation of strings provided by JS code. Not sure if it's a bug, but it's a separate issue.
Attachment #8416827 - Flags: review?(jrburke)
Comment on attachment 8416827 [details] [review]
pull request

Tested on device and confirmed marionette tests still pass locally. Thanks!
Attachment #8416827 - Flags: review?(jrburke) → review+
To clarify a bit more:

The once makes sense here because we are setting a module export value, which only registered once anyway.

I tested switching the language and it works for for the displayed cards and any new cards, but if a card template was already loaded, it is not getting translated. I filed bug 1005760 to track that fix.
You need to log in before you can comment on or make changes to this bug.