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
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
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