Closed Bug 1493306 Opened Last year Closed 11 months ago

Update GeckoView Locale handling to use LocaleList

Categories

(GeckoView :: General, enhancement, P2)

Unspecified
Android
enhancement

Tracking

(geckoview62 wontfix, geckoview64 wontfix, firefox62 wontfix, firefox63 wontfix, firefox64 wontfix, firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
geckoview62 --- wontfix
geckoview64 --- wontfix
firefox62 --- wontfix
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- fixed

People

(Reporter: zbraniecki, Assigned: mbrubeck)

References

Details

Attachments

(1 file)

In bug 1486552 we added basic handling of system locales to GeckoView.

In bug 1486552 comment 28 I documented a proposed change to handle locale list in line with our Gecko intl model[0]:

```
It is always better to use a locale fallback chain over a single locale. In case there’s only one locale available, a list with one element will work while allowing for future extensions without a costly refactor.
```

I'd like to request to switch that new API to use OSPreferences to handle system locale management and use lists. It should follow the same logic that Fennnec's model uses with reacting to events and updating system locales in result.

Then, the only setting needed is to set `intl.locale.requested` to an empty list which is used to indicate that the user wants OS locales to be their requested locales as per [1]

This is how this is done for Fennec:
https://searchfox.org/mozilla-central/source/mobile/android/installer/mobile-l10n.js#6


[0] https://firefox-source-docs.mozilla.org/intl/locale.html#locale-fallback-chains
[1] https://firefox-source-docs.mozilla.org/intl/locale.html#requested-locales
Assignee: nobody → mbrubeck
OS: Unspecified → Android
Priority: -- → P2
Depends on: 1496190
Pushed by mbrubeck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/35920033f3d6
Make GeckoView setLocale API accept a locale list. r=snorp
Backout by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b750cfc5a0fc
Backed out changeset 35920033f3d6 for android build bustages on a CLOSED TREE
Pushed to try with fix for build bustage:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6ac2999b53482ea6da13aab4b6beeec715fc9d72
Flags: needinfo?(mbrubeck)
Pushed by mbrubeck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ebf1f69c10ca
Make GeckoView setLocale API accept a locale list. r=snorp
https://hg.mozilla.org/mozilla-central/rev/ebf1f69c10ca
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
64=wontfix because this bug doesn't block Focus 8.0.
status-geckoview64=wontfix
Depends on: 1513870
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 65 → mozilla65
You need to log in before you can comment on or make changes to this bug.