Closed
Bug 1337551
Opened 8 years ago
Closed 8 years ago
Migrate Services.jsm to use LocaleService
Categories
(Core :: Internationalization, defect)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: zbraniecki, Assigned: zbraniecki)
References
Details
Attachments
(1 file)
No description provided.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•8 years ago
|
||
Comment on attachment 8843118 [details] Bug 1337551: Migrate Services.jsm to use LocaleService. triggered around 500 errors. Let's fix them before requesting review.
Attachment #8843118 -
Flags: review?(jfkthame)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•8 years ago
|
||
> triggered around 500 errors.
Update, triggered 500 errors with just a few mistyped characters. (didn't return from a function).
:mossop - this should work now (launched a try) and it moves Services.locale to use LocaleService which seems appropriate and is part of the unifying theme of getting all callsites that are trying to get the app locale call one API.
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8843118 [details] Bug 1337551: Migrate Services.jsm to use LocaleService. https://reviewboard.mozilla.org/r/116882/#review118870
Attachment #8843118 -
Flags: review?(dtownsend) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 9•8 years ago
|
||
I had to limit the scope of this bug because of bug 1344445. It's still fortunately possible to migrate the Services.locale.
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8843118 [details] Bug 1337551: Migrate Services.jsm to use LocaleService. https://reviewboard.mozilla.org/r/116882/#review118926 A couple of minor drive-by comments.... ::: addon-sdk/source/test/test-l10n-locale.js:113 (Diff revision 5) > - let expectedLocale = Services.locale.getLocaleComponentForUserAgent(). > + let expectedLocale = Services.locale.getAppLocale(). > toLowerCase(); Might be nice to un-wrap this line now that it's so much shorter. ::: browser/modules/DirectoryLinksProvider.jsm:212 (Diff revision 5) > this._setDefaultEnhanced(); > break; > > case this._observedPrefs.linksURL: > delete this.__linksURL; > // fallthrough There's nothing for this to "fallthrough" to any more... suggest removing this comment, and adding `break` for clarity. ::: browser/modules/DirectoryLinksProvider.jsm:214 (Diff revision 5) > - case this._observedPrefs.matchOSLocale: > - case this._observedPrefs.prefSelectedLocale: > - this._fetchAndCacheLinksIfNecessary(true); > - break; > } > + } else if (aTopic === "intl:app-locales-changed") { The previous `if (aTopic...` test used `==`, this one uses `===`. Consistency is good...
Comment hidden (mozreview-request) |
Assignee | ||
Comment 12•8 years ago
|
||
Ugh, I had to revert more of the patch because the tests for the behavior are pretty complicated. I want to just move `Services.locale` in this, bug and deal with all callsites to `general.useragent.locale` later.
Comment 13•8 years ago
|
||
Pushed by zbraniecki@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/20075fb33fc7 Migrate Services.jsm to use LocaleService. r=mossop
Assignee | ||
Comment 14•8 years ago
|
||
Ok, the try is green. It seems like many cleanups I wanted to do in this bug will require bug 1344445 to be resolved, so this is much smaller, but it does transition Services.locale to use mozILocaleService.
Comment 15•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/20075fb33fc7
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Assignee | ||
Comment 16•8 years ago
|
||
I did introduce a minor regression (in a very obscure codepath - matchOS scenario), that I'm fixing in bug 1344901.
You need to log in
before you can comment on or make changes to this bug.
Description
•