⚙️ refactor: Lazy load locale resources (#13640)

This commit is contained in:
Ravi Kumar L 2026-06-10 08:48:58 -04:00 • committed by GitHub
parent 56608739f8
commit db863e75e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 651 additions and 167 deletions

View file

@ -1,9 +1,8 @@
import { useCallback } from 'react';
import { TOptions } from 'i18next';
import { useTranslation } from 'react-i18next';
import { resources } from '~/locales/i18n';
export type TranslationKeys = keyof typeof resources.en.translation;
export type TranslationKeys = string;
/** Language lifecycle is managed by the host app — do not add i18n.changeLanguage() calls here. */
export default function useLocalize(): (phraseKey: TranslationKeys, options?: TOptions) => string {