356 bytes, text/html
Created attachment 702000 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7602
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Attachment #702000 - Flags: review?(kaze)
ok. this bug is not as innocent as I thought. Because we rarely remove the listener, we actually fire all the code that depends on the event in all apps twice, which contributes to startup timing.
blocking-b2g: --- → tef?
A good workaround to this is to unregister the localized handler when starting your app (which you should really do anyway since the event will fire again later if the user changes locales...)
:kaze, what do you think about that ?
Like I wrote on m.d.gaia when djf reported this bug a few days ago, I sure agree it should be fixed. This patch works but it relies on the fact that `loadLocale' is called twice — which is what should be fixed, precisely. Give me a couple hours, I’ll r+ Gandalf’s patch if I can’t find any better fix.
(In reply to Fabien Cazenave [:kaze] from comment #5) > This patch works but it relies on the fact that > `loadLocale' is called twice um. no. loadLocale is called once. It just calls fireL10nReadyEvent twice without this patch.
Looking at the code I would say the right fix will be to omit the second argument of loadLocale at line 942. The early return in the patch will not set the state of l10n as 'complete'.
(In reply to Vivien Nicolas (:vingtetun) from comment #7) > Looking at the code I would say the right fix will be to omit the second > argument of loadLocale at line 942. The early return in the patch will not > set the state of l10n as 'complete'. Good point. Updated the pull request
Comment on attachment 702000 [details] Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7602 I much prefer this approach. Gandalf, Vivien, thanks for your help! [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: Testing completed: Risk to taking this patch (and alternatives if risky):
Attachment #702000 - Flags: approval-gaia-master?(21) → approval-gaia-master+
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
status-b2g18: --- → fixed
You need to log in before you can comment on or make changes to this bug.