Closed
Bug 1414872
Opened 8 years ago
Closed 8 years ago
Fix handling a source locale as a fallback locale for requested list
Categories
(Core :: Internationalization, enhancement)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: zbraniecki, Assigned: zbraniecki)
References
Details
Attachments
(1 file)
we have a minor issue with how we currently workaround the limitations of `general.useragent.locale`. If the user launches a repackaged build for "it", the LocaleService::GetRequestedLocales will return ["it", "en-US"] as expected.
But if the user manually sets the locales via `LocaleService::SetRequestedLocales(["it", "en-US"]);` or `LocaleService::SetRequestedLocales(["it"]);` then GetRequestedLocales will return only ["it"].
This limits us a bit when negotiating locale fallback chains in L20n scenario, and I'd like to have the "en-US" added there, until we can start storing the fallback chain correctly.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Summary: Hardcode "en-US" as LocaleService:SourceLocale → Fix handling a source locale as a fallback locale for requested list
Assignee | ||
Comment 2•8 years ago
|
||
Jonathan - I originally planned to get all `en-US` in LocaleService and place them in a single LocaleService::mSourceLocale but decided against it to make the diff smaller and easier to review since it's close to merge day.
In 59 I'll add a SourceLocale (bug 1346877) and move us to a new pref that handles locale list instead of a single locale.
For 58, I'd just like to fix this behavior with the most minimal patch.
I hope you're ok with that!
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8925581 [details]
Bug 1414872 - Fix always adding source locale to requested locales fallback chain.
https://reviewboard.mozilla.org/r/196706/#review201934
Ah, I see... GetRequestedLocales normally adds that when initially caching mRequestedLocales, but if we then go through RequestedLocalesChanged then the cached value gets updated there but bypasses the code to add the fallback. OK, this seems fine for now.
Attachment #8925581 -
Flags: review?(jfkthame) → review+
Pushed by zbraniecki@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f993b9f8f20c
Fix always adding source locale to requested locales fallback chain. r=jfkthame
Comment 5•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•