mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-26 03:18:17 +01:00
Remove window.i18n in favor of SignalContext.i18n
This commit is contained in:
@@ -43,11 +43,8 @@ const { groupBy, mapValues } = lodash;
|
||||
|
||||
const log = createLogger('phase1-ipc');
|
||||
|
||||
// It is important to call this as early as possible
|
||||
window.i18n = SignalContext.i18n;
|
||||
|
||||
// We are comfortable doing this because we verified the type on the other side!
|
||||
const { config } = window.SignalContext;
|
||||
const { config } = SignalContext;
|
||||
|
||||
// Flags for testing
|
||||
const Flags = {
|
||||
|
||||
@@ -20,16 +20,16 @@ initializeLogging();
|
||||
|
||||
window.nodeSetImmediate = setImmediate;
|
||||
|
||||
const { config } = window.SignalContext;
|
||||
const { config, i18n } = window.SignalContext;
|
||||
|
||||
const { resolvedTranslationsLocale, preferredSystemLocales, localeOverride } =
|
||||
config;
|
||||
|
||||
moment.updateLocale(localeOverride ?? resolvedTranslationsLocale, {
|
||||
relativeTime: {
|
||||
s: window.i18n('icu:timestamp_s'),
|
||||
m: window.i18n('icu:timestamp_m'),
|
||||
h: window.i18n('icu:timestamp_h'),
|
||||
s: i18n('icu:timestamp_s'),
|
||||
m: i18n('icu:timestamp_m'),
|
||||
h: i18n('icu:timestamp_h'),
|
||||
},
|
||||
});
|
||||
moment.locale(
|
||||
|
||||
Reference in New Issue
Block a user