Create a LocaleService for Fennec

NEW
Unassigned

Status

()

Firefox for Android
Locale switching and selection
a year ago
4 months ago

People

(Reporter: gandalf, Unassigned)

Tracking

(Blocks: 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
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.
(Reporter)

Updated

a year ago
Blocks: 1353337
(Reporter)

Updated

a year ago
Blocks: 1347797
Depends on: 1348042
(Reporter)

Updated

4 months ago
Blocks: 1425712
You need to log in before you can comment on or make changes to this bug.