Move modules/translations.ts to utils/translations.ts

This commit is contained in:
redphx 2024-04-27 10:12:34 +07:00
parent fc64f0dfa7
commit 1753a2d525
18 changed files with 17 additions and 17 deletions

View File

@ -3,7 +3,7 @@ import "./utils/global";
import { BxEvent } from "./utils/bx-event"; import { BxEvent } from "./utils/bx-event";
import { BX_FLAGS } from "./utils/bx-flags"; import { BX_FLAGS } from "./utils/bx-flags";
import { BxExposed } from "./utils/bx-exposed"; import { BxExposed } from "./utils/bx-exposed";
import { t } from "./modules/translation"; import { t } from "./utils/translation";
import { CE } from "./utils/html"; import { CE } from "./utils/html";
import { showGamepadToast } from "./utils/gamepad"; import { showGamepadToast } from "./utils/gamepad";
import { MkbHandler } from "./modules/mkb/mkb-handler"; import { MkbHandler } from "./modules/mkb/mkb-handler";

View File

@ -1,4 +1,4 @@
import { t } from "./translation"; import { t } from "../utils/translation";
import { CE, createButton, ButtonStyle, Icon } from "../utils/html"; import { CE, createButton, ButtonStyle, Icon } from "../utils/html";
type DialogOptions = { type DialogOptions = {

View File

@ -2,7 +2,7 @@ import { CE } from "../utils/html";
import { getPreferredServerRegion } from "../utils/region"; import { getPreferredServerRegion } from "../utils/region";
import { TitlesInfo } from "../utils/titles-info"; import { TitlesInfo } from "../utils/titles-info";
import { PrefKey, getPref } from "./preferences"; import { PrefKey, getPref } from "./preferences";
import { t } from "./translation"; import { t } from "../utils/translation";
export class LoadingScreen { export class LoadingScreen {
static #$bgStyle: HTMLElement; static #$bgStyle: HTMLElement;

View File

@ -4,7 +4,7 @@ import { createButton, Icon, ButtonStyle, CE } from "../../utils/html";
import { BxEvent } from "../../utils/bx-event"; import { BxEvent } from "../../utils/bx-event";
import { PrefKey, getPref } from "../preferences"; import { PrefKey, getPref } from "../preferences";
import { Toast } from "../../utils/toast"; import { Toast } from "../../utils/toast";
import { t } from "../translation"; import { t } from "../../utils/translation";
import { LocalDb } from "../../utils/local-db"; import { LocalDb } from "../../utils/local-db";
import { KeyHelper } from "./key-helper"; import { KeyHelper } from "./key-helper";
import type { MkbStoredPreset } from "../../types/mkb"; import type { MkbStoredPreset } from "../../types/mkb";

View File

@ -1,4 +1,4 @@
import { t } from "../translation"; import { t } from "../../utils/translation";
import { SettingElementType } from "../settings"; import { SettingElementType } from "../settings";
import { GamepadKey, MouseButtonCode, MouseMapTo, MkbPresetKey } from "./definitions"; import { GamepadKey, MouseButtonCode, MouseMapTo, MkbPresetKey } from "./definitions";
import { MkbHandler } from "./mkb-handler"; import { MkbHandler } from "./mkb-handler";

View File

@ -1,6 +1,6 @@
import { GamepadKey } from "./definitions"; import { GamepadKey } from "./definitions";
import { CE, createButton, ButtonStyle } from "../../utils/html"; import { CE, createButton, ButtonStyle } from "../../utils/html";
import { t } from "../translation"; import { t } from "../../utils/translation";
import { Dialog } from "../dialog"; import { Dialog } from "../dialog";
import { getPref, setPref, PrefKey } from "../preferences"; import { getPref, setPref, PrefKey } from "../preferences";
import { MkbPresetKey, GamepadKeyName } from "./definitions"; import { MkbPresetKey, GamepadKeyName } from "./definitions";

View File

@ -1,5 +1,5 @@
import { CE } from "../utils/html"; import { CE } from "../utils/html";
import { SUPPORTED_LANGUAGES, t } from "./translation"; import { SUPPORTED_LANGUAGES, t } from "../utils/translation";
import { SettingElement, SettingElementType } from "./settings"; import { SettingElement, SettingElementType } from "./settings";
import { UserAgentProfile } from "../utils/user-agent"; import { UserAgentProfile } from "../utils/user-agent";
import { StreamStat } from "./stream/stream-stats"; import { StreamStat } from "./stream/stream-stats";

View File

@ -3,7 +3,7 @@ import { CE, createButton, ButtonStyle, Icon } from "../utils/html";
import { Toast } from "../utils/toast"; import { Toast } from "../utils/toast";
import { BxEvent } from "../utils/bx-event"; import { BxEvent } from "../utils/bx-event";
import { getPref, PrefKey, setPref } from "./preferences"; import { getPref, PrefKey, setPref } from "./preferences";
import { t } from "./translation"; import { t } from "../utils/translation";
import { localRedirect } from "./ui/ui"; import { localRedirect } from "./ui/ui";
enum RemotePlayConsoleState { enum RemotePlayConsoleState {

View File

@ -1,4 +1,4 @@
import { t } from "../translation"; import { t } from "../../utils/translation";
import { BxEvent } from "../../utils/bx-event"; import { BxEvent } from "../../utils/bx-event";
import { CE } from "../../utils/html"; import { CE } from "../../utils/html";
import { STATES } from "../../utils/global"; import { STATES } from "../../utils/global";

View File

@ -3,7 +3,7 @@ import { BxEvent } from "../../utils/bx-event"
import { getPref } from "../preferences" import { getPref } from "../preferences"
import { StreamBadges } from "./stream-badges" import { StreamBadges } from "./stream-badges"
import { CE } from "../../utils/html" import { CE } from "../../utils/html"
import { t } from "../translation" import { t } from "../../utils/translation"
import { STATES } from "../../utils/global" import { STATES } from "../../utils/global"
export enum StreamStat { export enum StreamStat {

View File

@ -2,7 +2,7 @@ import { STATES } from "../../utils/global";
import { Icon } from "../../utils/html"; import { Icon } from "../../utils/html";
import { BxEvent } from "../../utils/bx-event"; import { BxEvent } from "../../utils/bx-event";
import { PrefKey, getPref } from "../preferences"; import { PrefKey, getPref } from "../preferences";
import { t } from "../translation"; import { t } from "../../utils/translation";
import { StreamBadges } from "./stream-badges"; import { StreamBadges } from "./stream-badges";
import { StreamStats } from "./stream-stats"; import { StreamStats } from "./stream-stats";

View File

@ -4,7 +4,7 @@ import { Toast } from "../utils/toast";
import { BxEvent } from "../utils/bx-event"; import { BxEvent } from "../utils/bx-event";
import { BX_FLAGS } from "../utils/bx-flags"; import { BX_FLAGS } from "../utils/bx-flags";
import { getPref, PrefKey } from "./preferences"; import { getPref, PrefKey } from "./preferences";
import { t } from "./translation"; import { t } from "../utils/translation";
export class TouchController { export class TouchController {
static readonly #EVENT_SHOW_DEFAULT_CONTROLLER = new MessageEvent('message', { static readonly #EVENT_SHOW_DEFAULT_CONTROLLER = new MessageEvent('message', {

View File

@ -3,7 +3,7 @@ import { CE, createButton, Icon, ButtonStyle } from "../../utils/html";
import { getPreferredServerRegion } from "../../utils/region"; import { getPreferredServerRegion } from "../../utils/region";
import { UserAgent, UserAgentProfile } from "../../utils/user-agent"; import { UserAgent, UserAgentProfile } from "../../utils/user-agent";
import { getPref, Preferences, PrefKey, setPref, toPrefElement } from "../preferences"; import { getPref, Preferences, PrefKey, setPref, toPrefElement } from "../preferences";
import { t, refreshCurrentLocale } from "../translation"; import { t, refreshCurrentLocale } from "../../utils/translation";
const SETTINGS_UI = { const SETTINGS_UI = {
'Better xCloud': { 'Better xCloud': {

View File

@ -3,7 +3,7 @@ import { createButton, Icon, ButtonStyle } from "../../utils/html";
import { getPreferredServerRegion } from "../../utils/region"; import { getPreferredServerRegion } from "../../utils/region";
import { PrefKey, getPref } from "../preferences"; import { PrefKey, getPref } from "../preferences";
import { RemotePlay } from "../remote-play"; import { RemotePlay } from "../remote-play";
import { t } from "../translation"; import { t } from "../../utils/translation";
import { setupSettingsUi } from "./global-settings"; import { setupSettingsUi } from "./global-settings";

View File

@ -7,7 +7,7 @@ import { getPref, PrefKey, toPrefElement } from "../preferences";
import { setupScreenshotButton } from "../screenshot"; import { setupScreenshotButton } from "../screenshot";
import { StreamStats } from "../stream/stream-stats"; import { StreamStats } from "../stream/stream-stats";
import { TouchController } from "../touch-controller"; import { TouchController } from "../touch-controller";
import { t } from "../translation"; import { t } from "../../utils/translation";
import { VibrationManager } from "../vibration-manager"; import { VibrationManager } from "../vibration-manager";

View File

@ -1,6 +1,6 @@
import { MkbHandler } from "../modules/mkb/mkb-handler"; import { MkbHandler } from "../modules/mkb/mkb-handler";
import { PrefKey, getPref } from "../modules/preferences"; import { PrefKey, getPref } from "../modules/preferences";
import { t } from "../modules/translation"; import { t } from "./translation";
import { Toast } from "./toast"; import { Toast } from "./toast";
// Show a toast when connecting/disconecting controller // Show a toast when connecting/disconecting controller

View File

@ -1,6 +1,6 @@
import { MkbPreset } from "../modules/mkb/mkb-preset"; import { MkbPreset } from "../modules/mkb/mkb-preset";
import { PrefKey, setPref } from "../modules/preferences"; import { PrefKey, setPref } from "../modules/preferences";
import { t } from "../modules/translation"; import { t } from "./translation";
import type { MkbStoredPreset, MkbStoredPresets } from "../types/mkb"; import type { MkbStoredPreset, MkbStoredPresets } from "../types/mkb";
export class LocalDb { export class LocalDb {