Fix timestamps/spellcheck to use locale override
This commit is contained in:
parent
59fa75c309
commit
fd8691b871
11 changed files with 45 additions and 11 deletions
|
@ -67,7 +67,11 @@ const formatterCache = new Map<string, Intl.DateTimeFormat>();
|
|||
export function getDateTimeFormatter(
|
||||
options: Intl.DateTimeFormatOptions
|
||||
): Intl.DateTimeFormat {
|
||||
const locales = window.SignalContext.getPreferredSystemLocales();
|
||||
const preferredSystemLocales =
|
||||
window.SignalContext.getPreferredSystemLocales();
|
||||
const localeOverride = window.SignalContext.getLocaleOverride();
|
||||
const locales =
|
||||
localeOverride != null ? [localeOverride] : preferredSystemLocales;
|
||||
const optionsWithPreferences = getOptionsWithPreferences(options);
|
||||
const cacheKey = getCacheKey(locales, optionsWithPreferences);
|
||||
const cachedFormatter = formatterCache.get(cacheKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue