Closed Bug 996291 Opened 11 years ago Closed 11 years ago

Calendar mozL10n API use cleanups

Categories

(Firefox OS Graveyard :: Gaia::Calendar, defect)

defect
Not set
normal

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.
Blocks: 993188
Depends on: 993189
Sure.
Assignee: nobody → evanxd
mozL10n.once has landed. Feel free to switch.
Attached file pull request
Assignee: evanxd → gandalf
Status: NEW → ASSIGNED
Attachment #8409819 - Flags: review?(evanxd)
Blocks: 1000593
Should observeDateLocalization in apps/calendar/js/app.js also use mozL10n.ready?
No longer blocks: 993188
(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.
Comment on attachment 8409819 [details] [review] pull request Kevin, can you look at this patch?
Attachment #8409819 - Flags: review?(evanxd) → review?(kgrandon)
lgtm fwiw :P
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+
I named the function and rebased it on top of the latest master. I'll wait for travis and merge.
aand one test failed. I'll debug it tomorrow.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Thanks for Kevin's help. :)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: