Closed
Bug 999163
Opened 10 years ago
Closed 10 years ago
Clean up bootstrap mozL10n API use in FTU
Categories
(Firefox OS Graveyard :: Gaia::First Time Experience, defect)
Firefox OS Graveyard
Gaia::First Time Experience
Tracking
(b2g-v2.0 fixed)
RESOLVED
FIXED
2.0 S1 (9may)
Tracking | Status | |
---|---|---|
b2g-v2.0 | --- | fixed |
People
(Reporter: zbraniecki, Assigned: zbraniecki)
References
Details
Attachments
(1 file)
FTU currently initializes two codepaths using mozL10n.ready and manually set document's lang/dir. It should use mozL10n.once and should not set document's lang/dir manually (l10n.js does that).
Assignee | ||
Comment 1•10 years ago
|
||
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Attachment #8409852 -
Flags: review?(fernando.campo)
Assignee | ||
Comment 2•10 years ago
|
||
Actually, I left single mozL10n.ready and a flag since it wasn't cleaner to separate it into mozL10n.ready and mozL10n.once code. I just renamed the flag to be more self-explanatory and removed manual setting of document's lang/dir.
Comment 3•10 years ago
|
||
Comment on attachment 8409852 [details] [review] pull request Right, lang and dir are set on translation. Has been any change about this or have we been using this wrong from the beginning? I'm a little lost with l10n.js after the refactor, but does not function once() wait till isReady flag has been set and then trigger the callback? Doesn't that make .once() and .ready() do the same?
Attachment #8409852 -
Flags: review?(fernando.campo) → review+
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Fernando Campo (:fcampo) from comment #3) > Comment on attachment 8409852 [details] [review] > pull request > > Right, lang and dir are set on translation. Has been any change about this > or have we been using this wrong from the beginning? Refactor cleaned this. > I'm a little lost with l10n.js after the refactor, but does not function > once() wait till isReady flag has been set and then trigger the callback? > Doesn't that make .once() and .ready() do the same? .once will fire once (yay!) and deregister. .ready will fire once and then on every language change when new language resources are ready. Use .once for all basic code initialization patterns. Use .ready for code that sets UI using language.
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 5•10 years ago
|
||
Master: https://github.com/mozilla-b2g/gaia/commit/d8904c5af6152f5d647a93a0c31227171ddecd87
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-b2g-v2.0:
--- → fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S1 (9may)
You need to log in
before you can comment on or make changes to this bug.
Description
•