Closed
Bug 830521
Opened 13 years ago
Closed 13 years ago
with precompiled l10n we fire "localized" event twice
Categories
(Firefox OS Graveyard :: Gaia, defect)
Tracking
(blocking-b2g:-, b2g18 fixed)
People
(Reporter: zbraniecki, Assigned: zbraniecki)
References
Details
Attachments
(1 file)
|
356 bytes,
text/html
|
kaze
:
review+
vingtetun
:
approval-gaia-v1+
|
Details |
No description provided.
| Assignee | ||
Comment 1•13 years ago
|
||
| Assignee | ||
Comment 2•13 years ago
|
||
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?
Comment 3•13 years ago
|
||
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...)
Comment 5•13 years ago
|
||
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.
Flags: needinfo?(kaze)
| Assignee | ||
Comment 6•13 years ago
|
||
(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.
Updated•13 years ago
|
blocking-b2g: tef? → -
Comment 7•13 years ago
|
||
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'.
| Assignee | ||
Comment 8•13 years ago
|
||
(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 9•13 years ago
|
||
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: review?(kaze)
Attachment #702000 -
Flags: review+
Attachment #702000 -
Flags: approval-gaia-master?(21)
Attachment #702000 -
Flags: approval-gaia-master?(21) → approval-gaia-master+
Comment 10•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
status-b2g18:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•