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
This switches to using accented characters without elongation for the bidi
pseudo-locale to improve readability. We received feedback that the
flipped characters were too difficult to read.
This also updates the test expectations.
Differential Revision: https://phabricator.services.mozilla.com/D96855
This switches to using accented characters without elongation for the bidi
pseudo-locale to improve readability. We received feedback that the
flipped characters were too difficult to read.
Depends on D96854
Differential Revision: https://phabricator.services.mozilla.com/D96855
Although ICUUtils uses LocaleService, LocaleService will be shut down before
shut down observer.
DOM might use Locale Service by UnbindFromTree. So LocaleService should be
shut down by ShutdownPhase::ShutdownPostLastCycleCollection.
Differential Revision: https://phabricator.services.mozilla.com/D94944
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
Turns out we have `nsCStr` just for this already. I wrote this to
confirm it works as expected and it does, so...
The code doesn't deal with raw pointers anymore so we can remove the
helpers module and so on.
Differential Revision: https://phabricator.services.mozilla.com/D95866
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
`ClearOnShutdown` is called before shut down observer is notified. So when this
is notified, some services are already shut down.
So string bundle won't get the value since Locale service is shut down, so we
should return error like `SharedStringBundle` when shutting down status.
Differential Revision: https://phabricator.services.mozilla.com/D94922
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
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
Now that we've removed a lot of the special cases we were supporting in the date
and time format selectors, we can call GetDateTimePattern once with the two
selectors instead of calling it twice and combining the results. This will
simplifies the code and will make it easier to handle overriding patterns using
prefs.
A side effect of this change is that on OS X, you get a slightly different result
if you ask for the long format date and time all at once than if you ask for the
two separately and then combine them. The test expectations have been updated
accordingly.
Differential Revision: https://phabricator.services.mozilla.com/D94431
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
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
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
After landing bug 425915, we use NextWord instead of BreakInBetween.
NextWord is possible to return empty string (offset equals to current
position). So it shouldn't return empty string.
Differential Revision: https://phabricator.services.mozilla.com/D94266
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