chore: move i18n.tsx into utils folder (#30400)

This commit is contained in:
Florian Duros 2025-07-25 10:14:48 +02:00 committed by GitHub
parent 3af8273d6b
commit b5160c47b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ import "../res/css/shared.pcss";
import "./preview.css";
import React, { useLayoutEffect } from "react";
import { FORCE_RE_RENDER } from "storybook/internal/core-events";
import { setLanguage } from "../src/shared-components/i18n";
import { setLanguage } from "../src/shared-components/utils/i18n";
import { TooltipProvider } from "@vector-im/compound-web";
export const globalTypes = {

View File

@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
*/
// Import i18n.tsx instead of languageHandler to avoid circular deps
import { _td, type TranslationKey } from "../shared-components/i18n";
import { _td, type TranslationKey } from "../shared-components/utils/i18n";
import { IS_MAC, IS_ELECTRON, Key } from "../Keyboard";
import { type IBaseSetting } from "../settings/Settings";
import { type KeyCombo } from "../KeyBindingsManager";

View File

@ -25,7 +25,7 @@ import {
type IVariables,
KEY_SEPARATOR,
getLangsJson,
} from "./shared-components/i18n";
} from "./shared-components/utils/i18n";
export {
_t,
@ -40,7 +40,7 @@ export {
normalizeLanguageKey,
getNormalizedLanguageKeys,
substitute,
} from "./shared-components/i18n";
} from "./shared-components/utils/i18n";
const i18nFolder = "i18n/";

View File

@ -12,7 +12,7 @@ import { UNSTABLE_MSC4133_EXTENDED_PROFILES } from "matrix-js-sdk/src/matrix";
import { type MediaPreviewConfig } from "../@types/media_preview.ts";
// Import i18n.tsx instead of languageHandler to avoid circular deps
import { _t, _td, type TranslationKey } from "../shared-components/i18n";
import { _t, _td, type TranslationKey } from "../shared-components/utils/i18n";
import DeviceIsolationModeController from "./controllers/DeviceIsolationModeController.ts";
import {
NotificationBodyEnabledController,

View File

@ -25,7 +25,7 @@ import React from "react";
import { type TranslationKey as _TranslationKey, KEY_SEPARATOR } from "matrix-web-i18n";
import counterpart from "counterpart";
import type Translations from "../i18n/strings/en_EN.json";
import type Translations from "../../i18n/strings/en_EN.json";
// @ts-ignore - $webapp is a webpack resolve alias pointing to the output directory, see webpack config
import webpackLangJsonUrl from "$webapp/i18n/languages.json";