Closed
Bug 996291
Opened 10 years ago
Closed 10 years ago
Calendar mozL10n API use cleanups
Categories
(Firefox OS Graveyard :: Gaia::Calendar, defect)
Firefox OS Graveyard
Gaia::Calendar
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: zbraniecki, Assigned: zbraniecki)
References
Details
Attachments
(1 file)
Calendar uses manual code to emulate what we want to achieve with mozL10n.once: https://github.com/mozilla-b2g/gaia/blob/b7a304a173a0b7e0fdd201efb788b20c5bea0267/apps/calendar/js/app.js#L411-L421 After landing bug 993189 we should switch.
Assignee | ||
Updated•10 years ago
|
Comment 1•10 years ago
|
||
Sure.
Updated•10 years ago
|
Assignee: nobody → evanxd
Assignee | ||
Comment 2•10 years ago
|
||
mozL10n.once has landed. Feel free to switch.
Assignee | ||
Comment 3•10 years ago
|
||
Assignee: evanxd → gandalf
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Attachment #8409819 -
Flags: review?(evanxd)
Comment 4•10 years ago
|
||
Should observeDateLocalization in apps/calendar/js/app.js also use mozL10n.ready?
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Staś Małolepszy :stas from comment #4) > Should observeDateLocalization in apps/calendar/js/app.js also use > mozL10n.ready? I don't think so. This is used to manage re-translations, not the initial translation. (observeDateLocalization is called by _init which is after this patch called by mozL10n.once). What's interesting is that without this patch there's a bug. https://github.com/mozilla-b2g/gaia/blob/master/apps/calendar/js/app.js#L418-L420 - next() is called on each re-translation, but because it tests var `pending` for being false, it will fire _init only once, but it'll preserve the closure forever.
Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8409819 [details] [review] pull request Kevin, can you look at this patch?
Attachment #8409819 -
Flags: review?(evanxd) → review?(kgrandon)
Comment 7•10 years ago
|
||
lgtm fwiw :P
Comment 8•10 years ago
|
||
Comment on attachment 8409819 [details] [review] pull request (In reply to Gareth Aye [:gaye] from comment #7) > lgtm fwiw :P Feel free to steal calendar reviews from me if you want :) Seems easy enough, and happy travis means I am happy. Thanks for the patch!
Attachment #8409819 -
Flags: review?(kgrandon) → review+
Assignee | ||
Comment 9•10 years ago
|
||
I named the function and rebased it on top of the latest master. I'll wait for travis and merge.
Assignee | ||
Comment 10•10 years ago
|
||
aand one test failed. I'll debug it tomorrow.
Assignee | ||
Comment 11•10 years ago
|
||
aand, it was noise, cannot reproduce and it passes now. merging. Commit: https://github.com/mozilla-b2g/gaia/commit/83a6213f5d90ed650f9f891087d0fc1d34dee91e Merged: https://github.com/mozilla-b2g/gaia/commit/e3fc29c5d4a9196b0e32e246f3d0150ae0c39221
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 12•10 years ago
|
||
Thanks for Kevin's help. :)
You need to log in
before you can comment on or make changes to this bug.
Description
•