Граф коммитов

308 Коммитов

Автор SHA1 Сообщение Дата
Greg Tatum 852ecad7f2 Bug 1762659 - Use MozIntl for stand-alone display names in LangPackMatcher.jsm; r=Mardak,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D142730
2022-04-01 21:39:17 +00:00
Greg Tatum 4ab6ee38f3 Bug 1759577 - Create logic to check if live reloading is supported; r=platform-i18n-reviewers,dminor
Depends on D141003

Differential Revision: https://phabricator.services.mozilla.com/D141004
2022-03-22 15:26:09 +00:00
Greg Tatum 669f31b897 Bug 1755519 - Add JSM for langpack matching logic; r=platform-i18n-reviewers,nordzilla
The TestUtils file is broken out as it will be shared with the
about:welcome browser chrome tests.

Differential Revision: https://phabricator.services.mozilla.com/D138830
2022-03-02 15:52:43 +00:00
Iulian Moraru 51fd8df2e2 Backed out 2 changesets (bug 1755519) for causing node test failures (About:welcome bundle out of date). CLOSED TREE
Backed out changeset 67e6561012ad (bug 1755519)
Backed out changeset 873d83eaa24e (bug 1755519)
2022-03-02 17:08:47 +02:00
Greg Tatum 2aa7af8502 Bug 1755519 - Add JSM for langpack matching logic; r=platform-i18n-reviewers,nordzilla
The TestUtils file is broken out as it will be shared with the
about:welcome browser chrome tests.

Differential Revision: https://phabricator.services.mozilla.com/D138830
2022-03-02 13:54:16 +00:00
Greg Tatum 3839eb0a11 Bug 1715892 - Add thread safety notice and asserts for AppDateTimeFormat; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D131672
2021-12-01 17:41:38 +00:00
Greg Tatum d642b72ac3 Bug 1715892 - Unify locale/DateTimeFormat to mozilla::intl::AppDateTimeFormat; r=platform-i18n-reviewers,dminor
I considered removing this class initially, but it's actually a pretty
useful abstraction over the DateTimeFormat interface when used
specifically with Gecko. It applies the OS preferences and provides some
caching behavior.

Differential Revision: https://phabricator.services.mozilla.com/D131671
2021-12-01 17:41:37 +00:00
Marian-Vasile Laza 3bfa529b3e Backed out 6 changesets (bug 1715892, bug 1719735) for causing bc test failures. CLOSED TREE
Backed out changeset 196952bd8c9c (bug 1715892)
Backed out changeset 9105fe01c025 (bug 1715892)
Backed out changeset 4c15d1a24ccd (bug 1715892)
Backed out changeset 2c328b84285f (bug 1715892)
Backed out changeset 8fcdcdf44b62 (bug 1719735)
Backed out changeset c48f398e301f (bug 1719735)
2021-11-30 23:30:59 +02:00
Greg Tatum ca46c4a669 Bug 1715892 - Add thread safety notice and asserts for AppDateTimeFormat; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D131672
2021-11-30 19:05:58 +00:00
Greg Tatum 9b5497020e Bug 1715892 - Unify locale/DateTimeFormat to mozilla::intl::AppDateTimeFormat; r=platform-i18n-reviewers,dminor
I considered removing this class initially, but it's actually a pretty
useful abstraction over the DateTimeFormat interface when used
specifically with Gecko. It applies the OS preferences and provides some
caching behavior.

Differential Revision: https://phabricator.services.mozilla.com/D131671
2021-11-30 19:05:58 +00:00
Dan Minor e12f42285c Bug 1733659 - Clean up naming style in Locale; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D131511
2021-11-23 12:36:41 +00:00
Sandor Molnar 2594d2ac61 Backed out 2 changesets (bug 1733659) for causing build bustages. CLOSED TREE
Backed out changeset 9e23aa79fda9 (bug 1733659)
Backed out changeset e316768591c0 (bug 1733659)
2021-11-22 20:51:20 +02:00
Dan Minor bcbfdb6d73 Bug 1733659 - Clean up naming style in Locale; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D131511
2021-11-22 18:32:41 +00:00
Dan Minor 2266940c0d Bug 1736017 - Remove MozLocale; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129213
2021-11-04 16:36:05 +00:00
Dan Minor ef542a2f3b Bug 1736017 - Replace MozLocale with Locale in LocaleService.cpp; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129209
2021-11-04 16:36:04 +00:00
Noemi Erli 25dd04d4c5 Backed out 9 changesets (bug 1736017) for causing bustages in nsLineBreaker.cpp
Backed out changeset d7b7427bb29e (bug 1736017)
Backed out changeset 7249dec70600 (bug 1736017)
Backed out changeset f16572806b0c (bug 1736017)
Backed out changeset a78125c71b3e (bug 1736017)
Backed out changeset 84ba2cbd596a (bug 1736017)
Backed out changeset f771265e0930 (bug 1736017)
Backed out changeset c0cef271022d (bug 1736017)
Backed out changeset 19be73147fcc (bug 1736017)
Backed out changeset 11721cc861b0 (bug 1736017)
2021-10-28 00:06:35 +03:00
Dan Minor 739d179b38 Bug 1736017 - Remove MozLocale; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129213
2021-10-27 20:35:58 +00:00
Dan Minor 635033c165 Bug 1736017 - Replace MozLocale with Locale in LocaleService.cpp; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129209
2021-10-27 20:35:56 +00:00
Dan Minor a9e674d68d Bug 1719746 - Rename Locale to MozLocale; r=platform-i18n-reviewers,zbraniecki
There is also a mozilla::intl::Locale in intl/locale/MozLocale.h. This naming
collision was causing crashes in debug builds where the wrong destructor ended
up being called. This patch renames the intl/locale/MozLocale.h class to
MozLocale.

I've filed Bug 1736017 to move callers of the MozLocale version to the
unified intl/components/Locale version.

Differential Revision: https://phabricator.services.mozilla.com/D128593
2021-10-18 13:38:24 +00:00
Greg Tatum 45bc20f472 Bug 1734679 - Fix regression for XSLT sorting with an invalid language tag; r=platform-i18n-reviewers,dminor
This includes an integration test as well as a unit test, so hopefully
this will not regress again in the future.

Differential Revision: https://phabricator.services.mozilla.com/D127983
2021-10-08 19:10:48 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Greg Tatum 418e9b4700 Bug 1719550 - Remove nsCollation; r=platform-i18n-reviewers,nordzilla
All the call sites now use mozilla::intl::Collator

Differential Revision: https://phabricator.services.mozilla.com/D121435
2021-08-10 16:01:19 +00:00
Narcis Beleuzu daed5248e2 Backed out 12 changesets (bug 1719550) for bustages on TestCollator.cpp . CLOSED TREE
Backed out changeset 3b2735a29138 (bug 1719550)
Backed out changeset 5e2019335244 (bug 1719550)
Backed out changeset 105676dd2d6f (bug 1719550)
Backed out changeset b4b0d58778e9 (bug 1719550)
Backed out changeset 3ef5792020bb (bug 1719550)
Backed out changeset 389a77da6ddc (bug 1719550)
Backed out changeset 48f39b5ef77f (bug 1719550)
Backed out changeset bd125cc5b9b4 (bug 1719550)
Backed out changeset a8b778ca2375 (bug 1719550)
Backed out changeset b14702168fb9 (bug 1719550)
Backed out changeset 7b46b5cc7424 (bug 1719550)
Backed out changeset 6b04162618a1 (bug 1719550)
2021-08-10 17:46:34 +03:00
Greg Tatum e7657ad036 Bug 1719550 - Remove nsCollation; r=platform-i18n-reviewers,nordzilla
All the call sites now use mozilla::intl::Collator

Differential Revision: https://phabricator.services.mozilla.com/D121435
2021-08-10 11:46:38 +00:00
JMM 22f3732905 Bug 1672548 - Add weekday skeleton to DateTimeFormat::FormatDateTime(). r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D119545
2021-07-09 19:54:56 +00:00
Dan Minor db62540452 Bug 1706318 - Rename connector pattern override preference; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D112815
2021-04-26 18:11:59 +00:00
Dan Minor 05acd763f8 Bug 1676137 - Remove intl.uidirection pref; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D108789
2021-03-29 14:22:52 +00:00
Dan Minor 57ae936f38 Bug 1420335 - Make OSPreferences::ReadDateTimePattern check 12h/24h on Android; r=zbraniecki
As is the case with GTK, Android provides an OS override to display times in
AM/PM or 24 hour format. This moves the code for rewriting skeletons from the
GTK specific code to OSPreferences, and calls it from the Android OSPreferences
implementation.

This was tested manually by visiting the file:/// uri. I don't believe this is
feasible to test from automation, as it would require changing Android OS settings
from within our test code.

Differential Revision: https://phabricator.services.mozilla.com/D101641
2021-01-15 19:28:12 +00:00
Bogdan Tara 60482b14fc Backed out changeset dc9229077eaa (bug 1420335) for security/manager* and toolkit/mozapps/* xpc failures CLOSED TREE 2021-01-14 18:43:19 +02:00
Dan Minor 487bcdd4ea Bug 1420335 - Make OSPreferences::ReadDateTimePattern check 12h/24h on Android; r=zbraniecki
As is the case with GTK, Android provides an OS override to display times in
AM/PM or 24 hour format. This moves the code for rewriting skeletons from the
GTK specific code to OSPreferences, and calls it from the Android OSPreferences
implementation.

This was tested manually by visiting the file:/// uri. I don't believe this is
feasible to test from automation, as it would require changing Android OS settings
from within our test code.

Differential Revision: https://phabricator.services.mozilla.com/D101641
2021-01-14 13:45:40 +00:00
Dan Minor 1465995b22 Bug 1685804 - Use nsIGSettingsService in OSPreferences_gtk; r=zbraniecki
This switches over to using nsIGSettingsService. This makes the gtest results
on gtk based systems depend on the current OS settings, so the test expectations
are adjusted to accept both AM/PM and 24h settings.

Differential Revision: https://phabricator.services.mozilla.com/D101362
2021-01-12 14:20:07 +00:00
Dan Minor 0790cac85a Bug 1681357 - Use regional prefs locale if locale is not specified in GetDateTimePattern; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D99241
2020-12-09 16:50:14 +00:00
Dan Minor 57441aa8cc Bug 1673054 - Migrate uses of intl.uidirection to intl.l10n.pseudo; r=Gijs,zbraniecki
This also removes pref overrides from methods like LocaleService::IsLocaleRTL or
IntlService.getLocaleInfo, because it doesn't really make sense to override the
result of checking an arbitrary locale, the relevant use case is overriding the
result for the current app locale.

Removal of the intl.uidirection pref completely will be done in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D96235
2020-11-09 15:33:39 +00:00
Dan Minor 492a70088c Bug 1674212 - Add override pref for date time connector pattern; r=zbraniecki
This adds an override pref for the connector pattern used when combining dates
and times. It also fixes a test which was relying upon a hard-coded connector
pattern.

Differential Revision: https://phabricator.services.mozilla.com/D95278
2020-11-02 12:36:04 +00:00
Dan Minor 429ae74074 Bug 1426907 - Add OSPreferences::OverrideDateTimePattern method; r=zbraniecki
This new method allows for the user to override the long and short date and
time patterns by prefs. If no overrides are set or it fails while processing
the prefs, it will fallback to the existing methods for determining the patterns.
Since the user may have only overriden one of date or time, it is necessary to
be able to look up the other separately and combine the results.

This adds a prefix callback that watches the new prefs and flushes the cache if
they change. Otherwise, the user would have to restart the browser to see the
results of changing a pref, and would make testing more difficult. Unregistering
this callback required changes to the destructor, which was previously defined
separately on each operating system. A new RemoveObservers method has been added
to handle OS specific cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D94433
2020-10-27 20:41:58 +00:00
Dan Minor 686b723d0d Bug 1426907 - Update OSPreferences API to use UTF-8 rather than UTF-16; r=zbraniecki
We'll want to use UTF-8 when we switch to using ICU4x because Rust is all UTF-8. We
can switch the external facing APIs now, and update the internal implementations
later.

Differential Revision: https://phabricator.services.mozilla.com/D94850
2020-10-27 20:45:19 +00:00
Dan Minor f66c096d75 Bug 1426907 - Rework DateTimeFormat gtests to not rely on hard-coded connector patterns; r=zbraniecki
The connector patterns can change over time, we should instead check for the date time components
that we expect to be present.

Differential Revision: https://phabricator.services.mozilla.com/D94849
2020-10-27 20:39:57 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Dan Minor a67119a8ad Bug 1669573 - Replace kDateFormatYearMonth/kDateFormatYearMonthLong with FormatDateTime; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D93013
2020-10-15 12:19:42 +00:00
Dan Minor c7c8e3f274 Bug 1669573 - Rename kTimeFormatSeconds and kTimeFormatNoSeconds; r=zbraniecki
This renames kTimeFormatSeconds to kTimeFormatLong and kTimeFormatNoSeconds to
kTimeFormatShort. This is consistent with the naming used for date format
selectors.

Differential Revision: https://phabricator.services.mozilla.com/D93011
2020-10-15 12:20:15 +00:00
Dan Minor 9cd711db66 Bug 1669573 - Replace kDateFormatMonthLong/kDateFormatWeekday with GetCalendarSymbol; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D93010
2020-10-15 12:19:52 +00:00
Dan Minor da71b8a478 Bug 1669573 - Call DeleteCache when changing locale in TestDateTimeFormat; r=zbraniecki
The formatters in mFormatCache are only valid for the locale in which they were
created. Currently the tests change mLocale directly but leave the cache in
place which can lead to incorrect test results depending upon which tests are
executed. This is not a problem outside of the tests because mLocale is normally
only set once during the call to Initialize() which will not change the current
locale once it is set.

Differential Revision: https://phabricator.services.mozilla.com/D93009
2020-10-15 12:19:47 +00:00
Zibi Braniecki 51dd2eebad Bug 1662309 - Update fluent-rs to 0.12. r=kamidphish
Differential Revision: https://phabricator.services.mozilla.com/D88942
2020-09-02 20:06:41 +00:00
Makoto Kato 7472376d24 Bug 1650698 - Convert test_collation.js to gtest. r=jfkthame
test_collation.js uses nsICollation and nsICollationFactory from script, but
I would like to make it non-scriptable. Actually, it is only used from
xpcshell tests.

Differential Revision: https://phabricator.services.mozilla.com/D82310
2020-07-06 07:55:32 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Zibi Braniecki 1722cb0755 Bug 1645045 - Don`t assume the last fallback is the last locale in gtest. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D79313
2020-06-11 18:40:35 +00:00