Commit Graph

4053 Commits

Author SHA1 Message Date
Zibi Braniecki
3d91da8726 Bug 1347314 - Migrate calls to ChromeRegistry::GetSelectedLocale to use LocaleService::GetAppLocale. r=jfkthame,Pike
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.

This allows us to remove a lot of calls for the app locale.

The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.

MozReview-Commit-ID: DzmFEUvMq3N

--HG--
extra : rebase_source : 513ed31d995864939aa893e73c81ffdf591a6617
2017-03-14 16:09:54 -07:00
Sebastian Hengst
0a04f3b9e2 Backed out changeset cc308a73ad05 (bug 1347314) for eslint failure in test_device.html. r=backout 2017-03-22 18:20:26 +01:00
Zibi Braniecki
cb77ac3b2d Bug 1347002 - Add LocaleService::GetAvailableLocales. r=jfkthame
MozReview-Commit-ID: 99I5WgdzXlb

--HG--
extra : rebase_source : 44e1316fd90b5f28fca6feb23dfdf112e74ed7c0
2017-03-13 17:33:24 -07:00
Zibi Braniecki
c2cd68a689 Bug 1347314 - Migrate calls to ChromeRegistry::GetSelectedLocale to use LocaleService::GetAppLocale. r=jfkthame,Pike
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.

This allows us to remove a lot of calls for the app locale.

The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.

MozReview-Commit-ID: DzmFEUvMq3N

--HG--
extra : rebase_source : 13fa4c397ba4c79303a2cd76684b5b8c4bd17331
2017-03-14 16:09:54 -07:00
Zibi Braniecki
9a76e90f11 Bug 1348259 - Switch nsLanguageAtomService to use OSPreferences::GetSystemLocale. r=m_kato
MozReview-Commit-ID: DvKbtrpfNJe

--HG--
extra : rebase_source : 7a62729ce4251c7cd046449c84f5072ed66cf7c9
2017-03-21 16:20:07 -07:00
Zibi Braniecki
b17d737c5b Bug 1348797 - Add null-check to validTagChars test in LocaleService::NegotiateLanguages. r=jfkthame
--HG--
extra : amend_source : f6dde0867a6cf10b5b2f50c3cfcf3f383d708d28
2017-03-20 15:14:58 -04:00
Zibi Braniecki
71e93b5c82 Bug 1346611 - Introduce LocaleService::GetDefaultLocale. r=jfkthame
MozReview-Commit-ID: 8aMkbrh0SqI

--HG--
extra : rebase_source : fd05894d2fa613385bc236a0aee6ad9265e9d581
2017-03-14 13:04:59 -07:00
Makoto Kato
20cb071f24 Bug 1347431 - Skip some xpcshell tests that is failure on Android without ENABLE_INTL_API. r=snorp
Sicne some tests doesn't work with --with-intl-api=no, we should skip it on Android

MozReview-Commit-ID: IjlH3aQdiqb

--HG--
extra : rebase_source : ac6d91bf291f6268ea29bcb29180b2f5197e012c
2017-03-16 12:54:25 +09:00
Carsten "Tomcat" Book
dba578960e merge mozilla-inbound to mozilla-central a=merge 2017-03-14 14:23:03 +01:00
Zibi Braniecki
7cb5e257c7 Bug 1346617 - Add LocaleService::SetRequestedLocales. r=jfkthame
MozReview-Commit-ID: FrziO9fOs3R

--HG--
extra : rebase_source : a2f1b5c31317c80666fbda334ea7bfcef28397b6
2017-03-12 12:34:56 -07:00
Zibi Braniecki
fbfa4998fa Bug 1346819 - Port SanitizeAsBCP47 to LocaleService. r=baku,jfkthame
MozReview-Commit-ID: 2SXD5HaJPXr

--HG--
extra : rebase_source : 44404dfd577f13fde722ef5c13a29f853766786d
2017-03-13 08:31:43 -07:00
Makoto Kato
831b62ec11 Bug 1345336 - Part 1. Remove empty zoneStrings entries. r=Waldo
MozReview-Commit-ID: EuVZ5sgHoBH
2017-03-13 13:37:47 +09:00
Carsten "Tomcat" Book
c1edc7067d merge mozilla-inbound to mozilla-central a=merge 2017-03-13 15:22:26 +01:00
Sebastian Hengst
1c387c432b Backed out changeset da332b097c16 (bug 1345336) for failing jsreftest.html?test=Intl/DateTimeFormat/format.js on Windows 7 VM pgo. r=backout 2017-03-13 10:47:30 +01:00
Makoto Kato
f65c413250 Bug 1345336 - Part 1. Remove empty zoneStrings entries. r=Waldo
MozReview-Commit-ID: EuVZ5sgHoBH

--HG--
extra : rebase_source : d8341641ef4dcb01701f3cac8f1537f9278fac92
2017-03-13 13:37:47 +09:00
Zibi Braniecki
f096c9aab9 Bug 1346674 - Migrate all uses of nsILocaleService::GetApplicationLocale to mozILocaleService::GetAppLocale. r=jfkthame
MozReview-Commit-ID: 2E7mj3yQnxB

--HG--
extra : rebase_source : 97ba5b1738b2f116ec75830ed1b23f279680035e
2017-03-12 20:39:22 -07:00
Makoto Kato
3cb0726c57 Bug 1345762 - Rename OSPreferences_unix.cpp to OSPreferences_android.cpp. r=gandalf
OSPreferences_unix.cpp is used on Android only.  So we should rename it to OSPreferences_android.cpp
Also, we should create android directory into intl/locale, then move OSPreferences_android.cpp and nsAndroidCharset.cpp into it.

MozReview-Commit-ID: 2CUbV1Yc2fu

--HG--
rename : intl/locale/unix/OSPreferences_unix.cpp => intl/locale/android/OSPreferences_android.cpp
rename : intl/locale/unix/nsAndroidCharset.cpp => intl/locale/android/nsAndroidCharset.cpp
extra : rebase_source : f677428cc899c767e784b9f2c793b84e3fd95c11
2017-03-09 16:35:27 +09:00
Makoto Kato
e07ff992fd Bug 1343766 - Add DateTimeFomat without ICU for Android. r=emk
MozReview-Commit-ID: FWeBliqlXv3
2017-03-10 12:58:21 +09:00
Zibi Braniecki
76830b8830 Bug 1337694 - Add language negotiation heuristics to LocaleService. r=jfkthame
MozReview-Commit-ID: 1WjJiKgyaWA

--HG--
extra : rebase_source : 7baac37cf78599605ed274d7165ad8746626828c
2017-02-24 17:23:39 -08:00
Makoto Kato
989d78dec8 Bug 1344596 - Allow OSPreferences API without ENABLE_INTL_API. r=gandalf
Since we have to keep --with-intl-api=no setting, we allow OSPrefrences API wiout ENABLE_INTL_API.

MozReview-Commit-ID: 8sQHW6iq9Ss

--HG--
extra : rebase_source : 94e2efbeeb70f3edc519ffc9bfeaf7416ea1dc0e
2017-03-06 11:03:46 +09:00
David Major
ed0b8f8653 Bug 1344615: Remove nsXPCOMStrings.{h,cpp} r=bsmedberg
These are now dead code.

MozReview-Commit-ID: AClU0Qx3kmN

--HG--
extra : rebase_source : df83cf89292da1519bb26027c11e14923d5c54a0
2017-03-06 17:52:54 +13:00
David Major
058a3a25a4 Bug 1344615: Rewrite a few straggling users of NS_String* APIs. r=bsmedberg
I've moved the body of the APIs into the few remaining callers.

MozReview-Commit-ID: 9ALoSmQHkGM

--HG--
extra : rebase_source : e0e747dec23424446b18d53ab65e4fa262e16554
2017-03-06 17:52:09 +13:00
Zibi Braniecki
d0bfa17fb3 Bug 1344141 - Do not BCP47 canonicalize languages from ChromeRegistry in LocaleService. r=jfkthame
MozReview-Commit-ID: I6xMPhZRUUv

--HG--
extra : rebase_source : 3ce24ccbaba2e51715c121e343b682cd6088bda4
2017-03-03 13:31:26 -08:00
Zibi Braniecki
1618c4af60 Bug 1342753 - Use app locale in DateTimeFormat.cpp, instead of OS locale. r=m_kato
MozReview-Commit-ID: SPsNYxe493

--HG--
extra : rebase_source : b611ad61c83577ac1d42adce504ceb1b3731f59e
2017-02-27 09:36:50 -08:00
Makoto Kato
3e05da0dfa Bug 1225401 - Part 2. Update ICU source in tree after removing cities data. r=Waldo
MozReview-Commit-ID: 2LNAmneh2ew
2017-03-03 13:56:26 +09:00
Makoto Kato
d42aa067c3 Bug 1225401 - Part 1. Remove cities when syncing ICU source code. r=Waldo
MozReview-Commit-ID: ilVREadiJc
2017-03-03 13:56:24 +09:00
Makoto Kato
953af69fee Backed out changeset 292d9e369264 (bug 1225401) due to conflict updating with Bug 1343493
MozReview-Commit-ID: yx1Zc42GGC
2017-03-03 14:17:16 +09:00
Makoto Kato
c131f38038 Backed out changeset 6696016a0198 (bug 1225401)
MozReview-Commit-ID: 3cpusAJRqTg
2017-03-03 14:16:09 +09:00
Makoto Kato
50bc417b49 Bug 1225401 - Part 2. Update ICU source in tree after removing cities data. r=Waldo
MozReview-Commit-ID: 2LNAmneh2ew
2017-03-03 13:56:26 +09:00
Makoto Kato
1730f1d75e Bug 1225401 - Part 1. Remove cities when syncing ICU source code. r=Waldo
MozReview-Commit-ID: ilVREadiJc
2017-03-03 13:56:24 +09:00
André Bargull
e10fb026e9 Bug 1343493 - Update tzdata in ICU data files to 2017a. r=Waldo 2017-03-02 02:11:16 -08:00
Daniel Holbert
95a650ec1b Bug 1343975: Get rid of all dos/windows linebreaks in Mozilla C++ code. r=ehsan
This is an automated patch, generated by the following command:
find . -name "*.h" -exec fromdos {} \; && \
  find . -name "*.cpp" -exec fromdos {} \; && \
  hg revert -C gfx/angle \
               gfx/sfntly \
               media/webrtc \
               media/libstagefright \
               media/openmax_il \
               other-licenses

MozReview-Commit-ID: Gunlz3vE3h6
2017-03-02 13:08:29 -08:00
Carsten "Tomcat" Book
4a4777d1aa merge mozilla-inbound to mozilla-central a=merge 2017-03-02 14:02:48 +01:00
Zibi Braniecki
fbabbc6c00 Bug 1308329 - Extend OSPreferences API to cover date/time styles. r=jfkthame
MozReview-Commit-ID: HnuWfS8UEDH

--HG--
extra : rebase_source : 6e09bb36c1d4fe89ed22c2fc5ef8de3ff8ed484d
2017-02-08 17:17:51 -08:00
Jonathan Kew
3c29d13703 Bug 1342686 - Fix up the handling of surrogates in nsJISx4051LineBreaker. r=emk 2017-03-01 22:47:56 +00:00
Jonathan Kew
fa483cbc9c Bug 809020 - Use a shorter "conservative breaking" range at word edges when dealing with letters rather than punctuation etc., and adjust existing tests accordingly. r=masayuki 2017-03-01 22:47:56 +00:00
Benjamin Smedberg
3d381083df Bug 1332639 - Remove the external unicharutil library which isn't used and is now unlinkable, r=emk
MozReview-Commit-ID: UOPsyIOB8O

--HG--
extra : rebase_source : 38c986684710f54565ad6c99bdb9865205ce0255
2017-02-27 13:38:39 -05:00
Zibi Braniecki
eb0f2e4c51 Bug 1344445 - Add LocaleService::GetRequestedLocales. r=jfkthame
MozReview-Commit-ID: 76xYTKk6OHh

--HG--
extra : rebase_source : 867dd72ad280ba0ec3ffe50bd254226436d76eea
2017-03-06 13:24:45 -08:00
Sebastian Hengst
67b7f2faa5 Backed out changeset 288bc41a2ffe (bug 1344445) for bustage due to unused variable rv at LocaleService.cpp:70:14. r=backout 2017-03-11 18:58:55 +01:00
Zibi Braniecki
fb5ca0e430 Bug 1344445 - Add LocaleService::GetRequestedLocales. r=jfkthame
MozReview-Commit-ID: 76xYTKk6OHh

--HG--
extra : rebase_source : 497cb0474ef414bb2690444bfa590b8f817f7392
2017-03-06 13:24:45 -08:00
Ryan VanderMeulen
4fe12e81b5 Bug 1341653 - Add NEWS to the local hyphen checkout to more easily track future updates. r=tjr 2017-02-27 14:25:27 -05:00
Makoto Kato
797b5df988 Bug 1225696 - Part 3. Revert the order of kDateFormat. r=jorgk
MozReview-Commit-ID: A1gWYkHi28v
2017-02-24 20:33:53 +09:00
Tooru Fujisawa
8abf3f1675 Bug 1340924 - Remove Iterator consumer from intl/. r=Pike 2017-02-22 16:11:34 +09:00
Jonathan Kew
041dc3257f Bug 1341094 - Update mozILocaleService.getAppLocales to avoid use of jsapi. r=smaug 2017-02-20 21:14:25 +00:00
Makoto Kato
5ad41e1593 Bug 1225696 - Part 1. Add kDateFormatMonthLong and kDateFormatYearMonthLong to DateTimeFormat. r=emk
MozReview-Commit-ID: CT2Gzd0AEXb

--HG--
extra : rebase_source : 6b98c53f5a88e38cd19081b8a2559685a69ecc36
2017-02-20 12:47:18 +09:00
Henri Sivonen
26a8c610e5 Bug 1336836 - Null-check mEncoder for XPCOM shutdown. r=emk.
MozReview-Commit-ID: G6UeBdUbK85
2017-02-16 08:40:30 +02:00
David Major
773fd87a6b Bug 1338928: Add constexpr to static data under intl/ for better codegen on Windows. r=emk
MozReview-Commit-ID: I47OgjC0K5F
2017-02-15 15:08:31 +13:00
Wes Kocher
252dae269a Merge inbound to central, a=merge
MozReview-Commit-ID: Gx7IszkCDZ4
2017-02-13 17:04:20 -08:00
Masatoshi Kimura
968e163fb5 Bug 1338758 - Handle success codes from nsIUnicodeDecoder in nsTextToSubURI::UnEscapeNonAsciiURI. r=m_kato
MozReview-Commit-ID: 43jAOFPYMeT

--HG--
rename : intl/uconv/tests/unit/test_bug699673.js => intl/uconv/tests/unit/test_unEscapeNonAsciiURI.js
extra : rebase_source : a8ae93c2209ed1285c7ec59bfdcadb1729e1587b
2017-02-11 20:40:58 +09:00
Gregory Moore
65e4e6d86d Bug 1329841 - Added support into DateTimeFormat*.cpp for kDateFormatYearMonth and kDateFormatWeekday date format selectors. r=emk
MozReview-Commit-ID: 5LpCbpTUMKw

--HG--
rename : intl/locale/DateTimeFormatICU.cpp => intl/locale/DateTimeFormat.cpp
extra : rebase_source : e1f49db15578be0e3578da7c0b44898befc3dfae
2017-02-08 14:08:30 -08:00