Commit Graph

86 Commits

Author SHA1 Message Date
Zibi Braniecki
739a75a9f8 Bug 1616999 - Move LocaleService::IsLocaleRTL to use unic_langid. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D63562

--HG--
extra : moz-landing-system : lando
2020-02-22 00:19:35 +00:00
Zibi Braniecki
9d26727a4e Bug 1607052 - Unify language identifier canonicalization in LocaleService and OSPreferences to use unic_langid, and extend GTK's RegionalPrefs reading to fallback on SystemLocales. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D63393

--HG--
extra : moz-landing-system : lando
2020-02-21 00:39:18 +00:00
Noemi Erli
04fcf27147 Backed out changeset 4f406ca4f899 (bug 1607052) for causing xpcshell failures in test_localeService.js CLOSED TREE
--HG--
extra : rebase_source : c91f40748db91ac3563bd0215f4e707912553502
2020-02-21 02:19:32 +02:00
Zibi Braniecki
374e0856d0 Bug 1607052 - Unify language identifier canonicalization in LocaleService and OSPreferences to use unic_langid, and extend GTK's RegionalPrefs reading to fallback on SystemLocales. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D63393

--HG--
extra : moz-landing-system : lando
2020-02-20 22:19:42 +00:00
Noemi Erli
27e963773a Backed out changeset c3e43b7b1376 (bug 1607052) for causing leaks CLOSED TREE 2020-02-20 20:17:46 +02:00
Zibi Braniecki
c7b7faf558 Bug 1607052 - Unify language identifier canonicalization in LocaleService and OSPreferences to use unic_langid, and extend GTK's RegionalPrefs reading to fallback on SystemLocales. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D63393

--HG--
extra : moz-landing-system : lando
2020-02-20 17:35:06 +00:00
Zibi Braniecki
47a052741f Bug 1607052 - Cut out the POSIX encoding part from the locale during sanitization. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D60177

--HG--
extra : moz-landing-system : lando
2020-01-22 13:52:23 +00:00
Gabriele Svelto
69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55443

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Zibi Braniecki
d50efd5781 Bug 1597822 - Hook up intl.l10n.pseudo in DOM/chrome. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D53892

--HG--
extra : moz-landing-system : lando
2019-11-26 16:41:55 +00:00
Zibi Braniecki
85728020f5 Bug 1581960 - Use fluent-locale-rs for LocaleService::NegotiateLanguages. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D49991

--HG--
extra : moz-landing-system : lando
2019-11-19 23:07:08 +00:00
Zibi Braniecki
39cfaa9784 Bug 1571915 - Switch MozLocale to use unic-langid. r=emilio,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D49668

--HG--
extra : moz-landing-system : lando
2019-11-19 23:04:06 +00:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Liang-Heng Chen
624de11cb1 Bug 1492587 - spoof date picker to en-US when pref is set; r=zbraniecki,baku
spoof locale on datepicker to English when privacy.spoof_english == 2

Differential Revision: https://phabricator.services.mozilla.com/D19148

--HG--
extra : moz-landing-system : lando
2019-03-29 10:49:58 +00:00
Tooru Fujisawa
7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Zibi Braniecki
70411b2b33 Bug 1493625 - Make LocaleService::IsAppLocaleRTL react to pseudo. r=flod,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D6689

--HG--
extra : moz-landing-system : lando
2018-09-25 16:48:16 +00:00
Zibi Braniecki
c2634d4438 Bug 1493220 - Migrate mozIOSPreferences to use Array<> interface. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D6524

--HG--
extra : moz-landing-system : lando
2018-09-22 07:49:05 +00:00
Zibi Braniecki
8fdbb6d26b Bug 1491394 - Migrate mozILocaleService to use Array<> interface. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D5924

--HG--
extra : moz-landing-system : lando
2018-09-21 15:30:24 +00:00
Zibi Braniecki
7775d0c9c9 Bug 1491654 - Add lastFallbackLocale at the end of AppLocales. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D5985

--HG--
extra : moz-landing-system : lando
2018-09-18 08:44:47 +00:00
Zibi Braniecki
3a3372304e Bug 1491209 - Do not inject last fallback locale into requested locales. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D5839

--HG--
extra : moz-landing-system : lando
2018-09-14 10:15:40 +00:00
Zibi Braniecki
e689296a8d Bug 1465042 - Rename Locale::IsValid to ::IsWellFormed. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D4025

--HG--
extra : moz-landing-system : lando
2018-08-23 18:21:38 +00:00
Zibi Braniecki
a0c2cfd168 Bug 1479606 - Sync BCP47 language tags between processes, not lang tags. r=jfkthame
Sync BCP47 language tags between processes, not lang tags.

Differential Revision: https://phabricator.services.mozilla.com/D2579

--HG--
extra : moz-landing-system : lando
2018-07-31 21:42:37 +00:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Zibi Braniecki
4d776835e7 Bug 1450656 - Canonicalize ja-JP-mac to ja-JP-macos and use BCP47 version in Fluent. r=jfkthame
MozReview-Commit-ID: 2UbD2T8yyGm

--HG--
extra : rebase_source : 1e9f9c4ab8c97240edb3eb8e2e9d611fff907d7f
2018-04-10 14:19:05 -07:00
Zibi Braniecki
bb82a08086 Bug 1345957 - Tighten LocaleService::NegotiateLanguages input handling. r=jfkthame
MozReview-Commit-ID: 9ZxHI0RpYpi

--HG--
extra : rebase_source : 1db7f4b41f62acfd8e654fa2bdf9bfabb7350f0a
2018-03-06 18:54:57 -08:00
Dorel Luca
6ad641c5c4 Merge mozilla-inboud to mozilla-central. a=merge 2018-02-22 11:59:54 +02:00
Jason Orendorff
a48654929c Bug 1439665 - Part 1: #include some headers directly in files that use them. r=sfink.
"Include what you use."

--HG--
extra : rebase_source : 2239a380029e0efbc9dd3042459222a67c38d70f
extra : amend_source : 4453c32cc469caa592049167205666997f1a1e7b
extra : histedit_source : a533edd4a4d3d0642b08989e93674661d27baa6a%2C37d27eeef9580381ccc0de8507f60166dabf1730
2018-02-20 11:28:12 -06:00
Zibi Braniecki
5849ff1145 Bug 1431260 - Migrate LocaleService::AvailableLocales from ChromeRegistry to multilocale.txt. r=jfkthame
MozReview-Commit-ID: 6S4VaAvDako

--HG--
extra : rebase_source : ea6ae09971a7cbf617081836079cb875ffe4cb18
2018-02-13 23:41:39 -08:00
Jonathan Kew
12930d0cf2 Bug 1434169 - LocaleService::NegotiateLanguages should return locales in exactly the form they were provided in the availableLocales list, not case-normalized. r=gandalf 2018-01-31 20:28:51 +00:00
Zibi Braniecki
4bdf6bf95e Bug 1428698 - Align intl::locale::Locale with BCP47. r=jfkthame
MozReview-Commit-ID: AT9MPppx99p

--HG--
extra : rebase_source : ef98f45c430822de0eb400d1256d61988e9cc1f9
2018-01-25 14:50:32 -08:00
Dorel Luca
f0dfa23b9e Backed out changeset 804f26b2c6b8 (bug 1428698) for xpcshell failure on toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js on a CLOSED TREE
--HG--
extra : amend_source : 0a86497ef3fed6c36a638ccc640d1eccbe14bce6
2018-01-26 03:43:51 +02:00
Zibi Braniecki
2f307daaf1 Bug 1428698 - Align intl::locale::Locale with BCP47. r=jfkthame
MozReview-Commit-ID: AT9MPppx99p

--HG--
extra : rebase_source : 5086b899f50f29785cfa8c07c6df03bc281e8529
2018-01-25 14:50:32 -08:00
Zibi Braniecki
0d01f18858 Bug 1428530 - Separate out mozilla::intl::Locale. r=jfkthame
MozReview-Commit-ID: IELFjNCoJEo

--HG--
extra : rebase_source : 305dfb77cfa071c699ab4a9af38f59bb37c94711
2018-01-06 00:23:09 -08:00
Andreea Pavel
9c23902d5f Backed out changeset 994e33a96d17 (bug 1428530) for build bustage at z:\build\build\src\intl\locale\locale.h on a CLOSED TREE 2018-01-23 20:43:43 +02:00
Zibi Braniecki
9ca3cdc5a5 Bug 1428530 - Separate out mozilla::intl::Locale. r=jfkthame
MozReview-Commit-ID: IELFjNCoJEo

--HG--
extra : rebase_source : a735a893e93669af5b91951519ea9dadeb8123ad
2018-01-06 00:23:09 -08:00
Zibi Braniecki
013a1dfb6b Bug 1423463 - Update the LocaleService to handle ja-JP-mac better. r=jfkthame
MozReview-Commit-ID: 9LzDgbIHnhW

--HG--
extra : rebase_source : d007274d6fed77ddb0b53765bb0f2a3abc689185
2017-12-07 11:51:31 -08:00
Bogdan Tara
8c4a5326da Backed out 1 changesets (bug 1423463) for failing due to syntax errors in /builds/worker/workspace/build/src/intl/locale/LocaleService.cpp r=backout on a CLOSED TREE
Backed out changeset 97f4bb99a1a9 (bug 1423463)
2017-12-07 19:43:03 +02:00
Zibi Braniecki
402ccab870 Bug 1423463 - Update the LocaleService to handle ja-JP-mac better. r=jfkthame
MozReview-Commit-ID: FdwMLcgdcvx

--HG--
extra : rebase_source : 07cb7739cd189ce49cbbc2520a7e8c2fc10a7b86
2017-12-05 23:10:37 -08:00
Zibi Braniecki
a5600cdb98 Bug 1414390 - Add intl.locale.requested locale list to replace general.useragent.locale. r=jfkthame,mossop
This patch moves us from using an old pref `general.useragent.locale`combined
with `intl.locale.matchOS` for retrieving user requested locale, to use a new
preference `intl.locale.requested` which stores a list of well-formed BCP47
language tags. If set to empty, the OS locales are used. If not set at all,
default locale is used.

We are also adding a piece of code to migrate from old to new system.


MozReview-Commit-ID: 854yQ1kC6Ee

--HG--
extra : rebase_source : c4a7171bc026f857f7878ee83d973ec01b536a84
2017-11-01 20:16:21 -07:00
Zibi Braniecki
fb1208b237 Bug 1418771 - Introduce LocaleService::LastFallbackLocale. r=jfkthame
MozReview-Commit-ID: 852mUquHOtW

--HG--
extra : rebase_source : f0ee91283a4a80001049d99d8b203f9c241136be
2017-11-16 00:09:15 -03:00
Dylan Roeh
ebd39f9ce0 Bug 1337078 - Improve the use of Android API in OSPreferences r=snorp
Add BrowserLocaleManager.refreshLocales, a native function which calls OSPreferences::Refresh, and BrowserLocaleManager.getLocale, which returns the current locale string. Use these in place of observing modification of the intl.locale.os pref.
2017-11-10 09:20:04 -06:00
Zibi Braniecki
73ec17fff9 Bug 1414872 - Fix always adding source locale to requested locales fallback chain. r=jfkthame
MozReview-Commit-ID: CwvBkEJqQRi

--HG--
extra : rebase_source : 13274b1a6dbe0a7d1538ae42c0c1a2a40af11efa
2017-11-06 09:01:35 -08:00
Zibi Braniecki
f50ce10902 Bug 1410733 - Add an en-US locale as a hard fallback for LocaleService::RequestedLocales. r=jfkthame
MozReview-Commit-ID: LPS3PaeykEh

--HG--
extra : rebase_source : 5ab83371ccfad13f02bf276055fdf9cba7e80a9e
2017-10-22 11:00:09 -07:00
Sebastian Hengst
3beb11d7e8 Backed out changeset 84f325dfaa00 (bug 1410733) for failing xpcshell's intl/l10n/test/test_localization.js on debug. r=backout
--HG--
extra : amend_source : 1567ed5f595a3e725d4003e7897c11ca78d03ee1
2017-10-24 18:57:39 +02:00
Zibi Braniecki
63fc064db9 Bug 1410733 - Add an en-US locale as a hard fallback for LocaleService::RequestedLocales. r=jfkthame
MozReview-Commit-ID: LPS3PaeykEh

--HG--
extra : rebase_source : fd2ef3aaa10c809e93d4fe1bf9f962689c1bb9aa
2017-10-22 11:00:09 -07:00
Zibi Braniecki
891932b111 Bug 1409185 - Generalize language-matching for date/time patterns in OSPreferences. r=jfkthame
MozReview-Commit-ID: LF98Avi6egj

--HG--
extra : rebase_source : b5e4963685a5e67db460783da304a81e9832ea33
2017-10-16 14:32:29 -07:00
Zibi Braniecki
fffc0479b7 Bug 1352343 - Bind LocaleService to react to OSPreferences intl:system-locales-changed. r=jfkthame
MozReview-Commit-ID: Hnhun0bAVSr

--HG--
extra : rebase_source : bbd12e0eca463948bcc7e3cc02d830b83053094a
2017-10-05 18:43:38 +02:00
Sebastian Hengst
512032ece4 Backed out changeset 0699fcfd990f (bug 1352343) for build bustage. r=backout on a CLOSED TREE 2017-10-10 22:05:58 +02:00
Sebastian Hengst
4ae6666726 Backed out changeset 279dc744683e (bug 1352343) 2017-10-10 22:05:03 +02:00
Zibi Braniecki
cfe1556078 Bug 1352343 - Rename LocaleService::On* methods to LocaleService::*. r=jfkthame
MozReview-Commit-ID: LvEW9GcOodb

--HG--
extra : rebase_source : dab3af0ef01aeedad9faed4c0999492eef97e684
2017-10-10 10:39:12 -07:00