Remove window.i18n in favor of SignalContext.i18n

This commit is contained in:
Fedor Indutny
2025-10-10 13:48:40 -07:00
committed by GitHub
parent 40c31e138b
commit 41a6cfaf63
46 changed files with 201 additions and 213 deletions

View File

@@ -35,6 +35,7 @@ export type MinimalSignalContextType = {
getI18nAvailableLocales: () => ReadonlyArray<string>;
getI18nLocale: LocalizerType['getLocale'];
getI18nLocaleMessages: LocalizerType['getLocaleMessages'];
i18n: LocalizerType;
getLocaleDisplayNames: () => Record<string, Record<string, string>>;
getCountryDisplayNames: () => Record<string, Record<string, string>>;
getResolvedMessagesLocaleDirection: () => LocaleDirection;
@@ -65,8 +66,6 @@ export type MinimalSignalContextType = {
export type SignalContextType = {
bytes: Bytes;
crypto: Crypto;
i18n: LocalizerType;
renderWindow?: () => void;
setIsCallActive: (isCallActive: boolean) => unknown;
timers: Timers;
} & MinimalSignalContextType;
@@ -83,4 +82,3 @@ export const SignalContext: SignalContextType = {
};
window.SignalContext = SignalContext;
window.i18n = SignalContext.i18n;