macOS: Add support for 12/24-hour time display preferences
This commit is contained in:
parent
88858af144
commit
1143c0e9ba
17 changed files with 208 additions and 14 deletions
|
@ -6,6 +6,7 @@ import { stub } from 'sinon';
|
|||
import * as LocaleMatcher from '@formatjs/intl-localematcher';
|
||||
import { load, _getAvailableLocales } from '../../../app/locale';
|
||||
import { FAKE_DEFAULT_LOCALE } from '../../../app/spell_check';
|
||||
import { HourCyclePreference } from '../../types/I18N';
|
||||
|
||||
describe('locale', async () => {
|
||||
describe('load', () => {
|
||||
|
@ -23,7 +24,11 @@ describe('locale', async () => {
|
|||
preferredSystemLocales: Array<string>,
|
||||
expectedLocale: string
|
||||
) {
|
||||
const actualLocale = await load({ preferredSystemLocales, logger });
|
||||
const actualLocale = await load({
|
||||
preferredSystemLocales,
|
||||
hourCyclePreference: HourCyclePreference.UnknownPreference,
|
||||
logger,
|
||||
});
|
||||
assert.strictEqual(actualLocale.name, expectedLocale);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import type { CreateTemplateOptionsType } from '../../../app/menu';
|
|||
import { createTemplate } from '../../../app/menu';
|
||||
import { load as loadLocale } from '../../../app/locale';
|
||||
import type { MenuListType } from '../../types/menu';
|
||||
import { HourCyclePreference } from '../../types/I18N';
|
||||
|
||||
const forceUpdate = stub();
|
||||
const openArtCreator = stub();
|
||||
|
@ -198,6 +199,7 @@ const PLATFORMS = [
|
|||
describe('createTemplate', () => {
|
||||
const { i18n } = loadLocale({
|
||||
preferredSystemLocales: ['en'],
|
||||
hourCyclePreference: HourCyclePreference.UnknownPreference,
|
||||
logger: {
|
||||
fatal: stub().throwsArg(0),
|
||||
error: stub().throwsArg(0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue