gecko-dev/intl/locale
Zibi Braniecki 7ff88a7209 Bug 1348042 - Refactor LocaleService to operate in server-client mode. r=Ehsan,qdot
LocaleService serves two main functions. It is a central place for all code in the
engine to learn about locales, but it also does the language negotiation and selection.

The former is relevant in all processes, but the latter should only be performed
by the "main" process. In case of current Desktop Firefox, the parent process
is the one performing all the language negotiation, and content processes should
operate in the "client" mode.
In Fennec, there's a Java app on top of Gecko which should work as a "server"
and then all processes, including parent process of Gecko is merely a "client" for that.

This refactor finalizes this duality making it easily configurable to define in
which mode a given LocaleService operates.

The server-client model allows all clients to stay in sync with the server,
but operate transparently for all callers just returning the right values.

In order to initialize LocaleService in the client mode in child process with the
right locales I'm adding the list of app locales to the XPCOMInitData,
and then fire LocaleService::SetAppLocales in the child process initialization.

In order to keep the list up to date, I'm adding intl:app-locales-changed to
the list of observed topics, and when triggered, I send the updated list
to the child process, which updates LocaleService::SetAppLocales with the new
list.

MozReview-Commit-ID: K9X6berF3IO

--HG--
extra : rebase_source : ca5e502d064023fddfd63fe6fe5eccefce8dee52
2017-03-26 07:09:45 +02:00
..
android Bug 1354055 - Don't cache wrong result in OSPreferences::ReadSystemLocales on Android. r=jfkthame,rnewman 2017-04-06 13:00:02 +02:00
gtk Bug 1356718 - Query gtk settings schemas to avoid crashing when schema is missing. r=jfkthame 2017-04-16 00:13:07 -07:00
mac Bug 1351543 - Remove nsIPlatformCharset::GetDefaultCharsetForLocale. r=jfkthame 2017-03-31 10:40:19 +09:00
tests Backed out changeset 60d72c2dd49d (bug 1346616) for eslint failure in DirectoryLinksProvider.jsm. r=backout on a CLOSED TREE 2017-04-18 00:48:16 +02:00
unix Bug 1351543 - Remove nsIPlatformCharset::GetDefaultCharsetForLocale. r=jfkthame 2017-03-31 10:40:19 +09:00
windows Bug 1355308 - Use "User Locale" for ReadDateTimePattern LanguageMatch on Windows. r=jfkthame 2017-04-10 19:36:12 -07:00
DateTimeFormat.cpp Bug 1351427 - Use OSPreferences for C++ date/time formats. r=emk 2017-04-13 17:17:40 +02:00
DateTimeFormat.h Bug 1355465 - Enhance TestDateTimeFormat.cpp with non-en-US locale. r=emk 2017-04-11 11:07:00 -04:00
DateTimeFormatAndroid.cpp Bug 1343766 - Add DateTimeFomat without ICU for Android. r=emk 2017-03-10 12:58:21 +09:00
LocaleService.cpp Bug 1348042 - Refactor LocaleService to operate in server-client mode. r=Ehsan,qdot 2017-03-26 07:09:45 +02:00
LocaleService.h Bug 1348042 - Refactor LocaleService to operate in server-client mode. r=Ehsan,qdot 2017-03-26 07:09:45 +02:00
OSPreferences.cpp Merge inbound to central, a=merge 2017-04-13 17:24:01 -07:00
OSPreferences.h Bug 1351427 - Use OSPreferences for C++ date/time formats. r=emk 2017-04-13 17:17:40 +02:00
PluralForm.jsm
langGroups.properties
language.properties
moz.build bug 1351657 - Stop shipping langGroups.properties as it is unused. r=florian 2017-04-20 13:34:52 +01:00
mozILocaleService.idl Backed out changeset 60d72c2dd49d (bug 1346616) for eslint failure in DirectoryLinksProvider.jsm. r=backout on a CLOSED TREE 2017-04-18 00:48:16 +02:00
mozIOSPreferences.idl Bug 1308329 - Extend OSPreferences API to cover date/time styles. r=jfkthame 2017-02-08 17:17:51 -08:00
nsCollation.cpp Bug 943287 - Part 2. Use ICU version of nsICollation on all platform. r=hsivonen 2017-03-23 13:42:49 +09:00
nsCollation.h Bug 943287 - Part 3. nsICollation fallback version for Android. r=hsivonen 2017-03-23 13:43:38 +09:00
nsCollationAndroid.cpp Bug 943287 - Part 3. nsICollation fallback version for Android. r=hsivonen 2017-03-23 13:43:38 +09:00
nsCollationCID.h
nsCollationFactory.cpp Bug 943287 - Part 2. Use ICU version of nsICollation on all platform. r=hsivonen 2017-03-23 13:42:49 +09:00
nsCollationFactory.h Bug 943287 - Part 2. Use ICU version of nsICollation on all platform. r=hsivonen 2017-03-23 13:42:49 +09:00
nsICollation.idl Bug 1335983 - Migrate nsCollation::CreateCollection to use LocaleService::GetAppLocale. r=jfkthame 2017-02-07 12:52:03 -08:00
nsILanguageAtomService.h Bug 1351200 - Part 3: stylo: Bypass cache when fetching font size prefs from Stylo; r=emilio 2017-04-10 09:18:00 +08:00
nsILocale.idl
nsILocaleService.idl
nsIPlatformCharset.h Bug 1351543 - Remove nsIPlatformCharset::GetDefaultCharsetForLocale. r=jfkthame 2017-03-31 10:40:19 +09:00
nsIScriptableDateFormat.idl Bug 1349855 - Remove unused nsILocale. r=emk 2017-03-24 11:02:03 +09:00
nsLanguageAtomService.cpp Bug 1351200 - Part 3: stylo: Bypass cache when fetching font size prefs from Stylo; r=emilio 2017-04-10 09:18:00 +08:00
nsLanguageAtomService.h Bug 1351200 - Part 3: stylo: Bypass cache when fetching font size prefs from Stylo; r=emilio 2017-04-10 09:18:00 +08:00
nsLocale.cpp
nsLocale.h
nsLocaleConstructors.h Bug 943287 - Part 2. Use ICU version of nsICollation on all platform. r=hsivonen 2017-03-23 13:42:49 +09:00
nsLocaleService.cpp Bug 1285554 - Remove remnants of widget/qt. r=dougt,mshal. 2016-07-12 09:16:45 +10:00
nsPlatformCharset.h Bug 1351543 - Remove nsIPlatformCharset::GetDefaultCharsetForLocale. r=jfkthame 2017-03-31 10:40:19 +09:00
nsPosixLocale.h
nsScriptableDateFormat.cpp Bug 1349855 - Remove unused nsILocale. r=emk 2017-03-24 11:02:03 +09:00
nsUConvPropertySearch.cpp
nsUConvPropertySearch.h
nsWin32Locale.h Bug 1336879 - Use Vista+ API directly for nsWin32Locale. r=emk 2017-02-07 10:47:41 +09:00
props2arrays.py