Closed Bug 1357240 Opened 7 years ago Closed 3 years ago

Create a LocaleService for Fennec

Categories

(Firefox for Android Graveyard :: Locale switching and selection, enhancement, P5)

enhancement

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: zbraniecki, Unassigned)

References

Details

This is a spin-off from bug 1353337 comment 9.

Once bug 1348042 lands, Gecko's LocaleService will be able to operate in client/server architecture.

In case of Fennec, Gecko should always be in the client mode, and Fennec needs to provide some equivalent of the LocaleService in the Java code.
I'm working on the Gecko side to provide the correct APIs and behavior, and need someone to write the Fennec side.

The service should:

- collect available locales from:
  - java resources
  - Gecko's ChromeRegistry
  - Gecko's L10nRegistry (bug 1333980)
- get user requested locales
- negotiate between those two lists
- feed Gecko's LocaleService with the correct list of locales via SetAppLocales
- react to changes in the requested locales or in L10nRegistry locales (DLC) by renegotiating locale list and updating Gecko's LocaleService with the new locales

The behavior and API will probably be very similar to http://searchfox.org/mozilla-central/source/intl/locale/LocaleService.cpp although probably simplified at least initially.
I'd recommend porting the language matching algorithm as we put a lot of work to design it for our needs and it would be safer to maintain the same negotiation strategy between Gecko and Fennec.
Blocks: 1347797
Depends on: 1348042
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.