Closed
Bug 1043615
Opened 10 years ago
Closed 10 years ago
[L10n][Settings] Clean up mozL10n.get uses in Settings app
Categories
(Firefox OS Graveyard :: Gaia::Settings, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: zbraniecki, Assigned: zbraniecki, Mentored)
References
()
Details
(Whiteboard: [good first bug])
Attachments
(1 file)
Settings use mozL10n.get in 44 places and mozL10n.localize in 31 and mozL10n.translate in one. The goal is to replace localize with setAttributes, remove the translate and minimize the amount of gets.
Assignee | ||
Updated•10 years ago
|
Whiteboard: [good first bug]
Assignee | ||
Comment 1•10 years ago
|
||
Actually, there are at least 100 more mozL10n.localize use cases. Just harder to grep. They use utils.js@localize and var l10n = navigator.mozL10n; l10n.localize
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 2•10 years ago
|
||
Oh, this is going to be fun. Arthur, the pull request cleans all mozL10n.localize and mozL10n.translate uses in Settings and moves majority of mozL10n.get to DOM l10nId based approach which makes the code retranslatable. There are no changes in logic, but a lot of files are affected. If you prefer me to somehow chunk it to make review process easier, let me know!
Attachment #8462800 -
Flags: review?(arthur.chen)
Comment 3•10 years ago
|
||
Comment on attachment 8462800 [details] [review] pull request Thank you for cleaning this up, Zibi! That was a lot of work. Overall it looks good to me. There are a few minor issues to be addressed. Please check github for details.
Attachment #8462800 -
Flags: review?(arthur.chen)
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8462800 [details] [review] pull request Cool! That was easy to update. I pushed updates to the PR and triggered new try builds.
Attachment #8462800 -
Flags: review?(arthur.chen)
Assignee | ||
Comment 5•10 years ago
|
||
Arthur, one test failed: - settings/test/unit/about_test.js | about > checkForUpdates > getting response for system update > check-error | expected 'check-error' to equal 'check-error-http-200' What should I do with the check-error vs. check-error-* ? Update the test?
Comment 6•10 years ago
|
||
I think we could change the expected value to `check-error` instead of errors[i].
Assignee | ||
Comment 7•10 years ago
|
||
makes sense. Updated the PR
Comment 8•10 years ago
|
||
Comment on attachment 8462800 [details] [review] pull request r=me with one last comment addressed, thank you!
Attachment #8462800 -
Flags: review?(arthur.chen) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Thanks Arthur the great review! Commit: https://github.com/mozilla-b2g/gaia/commit/eced8a617b6fde7962e1746f4e65336aaddd86c3 Merge: https://github.com/mozilla-b2g/gaia/commit/746dbbf5665c3ed8c4baad8474c011966e706ccd
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 10•10 years ago
|
||
Follow up patch to update L10n ID's - https://github.com/mozilla-b2g/gaia/commit/9689218473b6fc4dd927ad6aa7b06c05f0843824
You need to log in
before you can comment on or make changes to this bug.
Description
•