Closed
Bug 1224063
Opened 9 years ago
Closed 9 years ago
Refactor System to use modern L10n API
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: zbraniecki, Assigned: zbraniecki)
References
Details
Attachments
(2 files, 2 obsolete files)
That mainly means we want to remove all `mozL10n.get` uses.
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → gandalf
Assignee | ||
Comment 2•9 years ago
|
||
Comment on attachment 8694109 [details] [review]
[gaia] zbraniecki:1224063-migrate-system-away-from-mozl10n-get-part1 > mozilla-b2g:master
Fernardo, can you review my patch?
Attachment #8694109 -
Flags: review?(ferjmoreno)
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8694109 [details] [review]
[gaia] zbraniecki:1224063-migrate-system-away-from-mozl10n-get-part1 > mozilla-b2g:master
Erienne, can you review this patch as well pls?
Attachment #8694109 -
Flags: review?(etienne)
Comment 4•9 years ago
|
||
Comment on attachment 8694109 [details] [review]
[gaia] zbraniecki:1224063-migrate-system-away-from-mozl10n-get-part1 > mozilla-b2g:master
r=me on the identity, payments and mobile ID parts.
Thanks!
Attachment #8694109 -
Flags: review?(ferjmoreno) → review+
Comment 5•9 years ago
|
||
Comment 6•9 years ago
|
||
Comment on attachment 8694109 [details] [review]
[gaia] zbraniecki:1224063-migrate-system-away-from-mozl10n-get-part1 > mozilla-b2g:master
Thanks! It was indeed a really manageable patch :)
r=me for everything except the migrator part which I know _nothing_ about, hoping that Sam will.
Attachment #8694109 -
Flags: review?(sfoster)
Attachment #8694109 -
Flags: review?(etienne)
Attachment #8694109 -
Flags: review+
Comment 7•9 years ago
|
||
Comment on attachment 8694109 [details] [review]
[gaia] zbraniecki:1224063-migrate-system-away-from-mozl10n-get-part1 > mozilla-b2g:master
I dont know much about settings_migrator.js, but I do know we are using the Intl api for 12/14 hour concerns now so removing these tests seems like the right thing to do, so I'll add my r+ FWIW.
Attachment #8694109 -
Flags: review?(sfoster) → review+
Assignee | ||
Comment 8•9 years ago
|
||
Thanks!
Commit of part1: https://github.com/mozilla-b2g/gaia/commit/89349eb99f91ba91973432f7a21058d8d2251075
Part2 is a bit more complex since I'm moving ValuePicker and ValueSelector and it requires a bit more serious refactor to make it work using Intl and L20n.
Comment 9•9 years ago
|
||
Comment 10•9 years ago
|
||
Comment on attachment 8698221 [details] [review]
[gaia] KevinGrandon:test_backout > mozilla-b2g:master
Oops - just testing, ignore this for now. Seeing some weirdness with the tests, and wanted to see if this caused it.
Attachment #8698221 -
Attachment is obsolete: true
Comment 11•9 years ago
|
||
Backed out in https://github.com/mozilla-b2g/gaia/commit/c58c206b43dc04c9648b0e82d784e0f375b3d1ec for Gij(21) failures like this: https://treeherder.mozilla.org/logviewer.html#?job_id=3549013&repo=b2g-inbound
Flags: needinfo?(gandalf)
Comment 12•9 years ago
|
||
Assignee | ||
Comment 13•9 years ago
|
||
Ok, it seems that there already was an intermittent bug 1192843 and this patch made it more permanent.
The way I'm fixing it is two-fold -
a) I'm making sure that elements in marionette tests are visible to screen reader
b) I'm artificially keeping 'OK' string in alert dialog
The reason for b) is that it seems that in marionette context l10n.js' MutationObserver is not running and setting data-l10n-id on okButton does not translate it. Without manually set string in the template, marionette test fails because it cannot reach to the element without value.
In real world l10n.js works and the element is properly localized.
This should also fix bug 1192843.
Flags: needinfo?(gandalf)
Assignee | ||
Updated•9 years ago
|
Attachment #8694109 -
Attachment is obsolete: true
Assignee | ||
Comment 14•9 years ago
|
||
Relanded part1: https://github.com/mozilla-b2g/gaia/commit/654089cda5844be22fc29473e78d3bfa32122fe8
Fixed the Gij intermittent test.
Assignee | ||
Comment 15•9 years ago
|
||
Comment on attachment 8699412 [details] [review]
[gaia] zbraniecki:1224063-migrate-system-away-from-mozl10n-get-part1 > mozilla-b2g:master
Ok, this is not going to be fun.
Tim, the second patch is probably the most entangled one. I'm refactoring pieces of very ancient code here - most of it dates back to 2012.
The scope of this patch:
- Make ValuePicker work with L10n IDs and raw strings
- Remove the use of properietary toLocaleFormat
- Remove the use of mozL10n.get
- Remove the reliance on values being western arabic digits (`getSelectedDisplayedText` and so on)
- Conform the InputParser to input type=time|date norms (HH:MM, not h:MM)
- Moves the hardcoded "0" padding to Intl.NumberFormat
Fred: there's a small piece of the patch that touches Settings. Hopefully nothing controversial :)
Testing completed:
- I tested Settings, Calendar event add/modify, Clock alarm set/modify, Contacts add/modify.
- I updated tests
- I tested against en-US, ar, fr, de, pl, it, and ru
- I tested on two devices
It *seems* to me that this patch works well with all tested apps without any changes to the API use so I'm hopeful it will be a smooth landing, but since it's a very old code very deep in the System I'd like to land it early in the cycle.
Attachment #8699412 -
Flags: review?(timdream)
Attachment #8699412 -
Flags: review?(gasolin)
Comment 16•9 years ago
|
||
Comment on attachment 8699412 [details] [review]
[gaia] zbraniecki:1224063-migrate-system-away-from-mozl10n-get-part1 > mozilla-b2g:master
I assume you want me to review part 2? Part 1 has already merged.
I did not work on value selector directly so my review will not be very helpful, still I tried to spot a few stuff and leave some comment there. Otherwise this looks good.
Attachment #8699412 -
Flags: review?(timdream) → review+
Comment 17•9 years ago
|
||
Comment on attachment 8697576 [details] [review]
[gaia] zbraniecki:1224063-migrate-system-away-from-mozl10n-get-part2 > mozilla-b2g:master
You should probably land this on under another bug #?
Attachment #8697576 -
Flags: review+
Comment 18•9 years ago
|
||
Comment on attachment 8699412 [details] [review]
[gaia] zbraniecki:1224063-migrate-system-away-from-mozl10n-get-part1 > mozilla-b2g:master
Looks good, thanks!
Attachment #8699412 -
Flags: review?(gasolin) → review+
Assignee | ||
Comment 19•9 years ago
|
||
Filed as bug 1235975
Assignee | ||
Comment 20•9 years ago
|
||
And this is complete now!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•