diff --git a/src/ui/settings/move-touch-controls-handler.ts b/src/ui/settings/move-touch-controls-handler.ts index 6128f5954e8..da7ac7f0514 100644 --- a/src/ui/settings/move-touch-controls-handler.ts +++ b/src/ui/settings/move-touch-controls-handler.ts @@ -1,6 +1,7 @@ import { globalScene } from "#app/global-scene"; import type TouchControl from "#app/touch-controls"; import type UI from "#app/ui/ui"; +import i18next from "i18next"; export const TOUCH_CONTROL_POSITIONS_LANDSCAPE = "touchControlPositionsLandscape"; export const TOUCH_CONTROL_POSITIONS_PORTRAIT = "touchControlPositionsPortrait"; @@ -71,7 +72,7 @@ export default class MoveTouchControlsHandler { if (this.inConfigurationMode) { const orientation = document.querySelector("#touchControls #orientation"); if (orientation) { - orientation.textContent = this.isLandscapeMode ? "Landscape" : "Portrait"; + orientation.textContent = this.isLandscapeMode ? i18next.t("settings:landscape") : i18next.t("settings:portrait"); } } const positions = this.getSavedPositionsOfCurrentOrientation() ?? []; @@ -90,19 +91,22 @@ export default class MoveTouchControlsHandler { const toolbar = document.createElement("div"); toolbar.id = "configToolbar"; toolbar.innerHTML = ` -
-
-
Reset
-
Save & close
-
Cancel
-
-
-
- Orientation: ${this.isLandscapeMode ? "Landscape" : "Portrait"} -
+
+
+
${i18next.t("settings:reset")}
+
${i18next.t("settings:saveClose")}
+
${i18next.t("settings:cancel")}
+
+
+
+ ${i18next.t("settings:orientation")} + + ${this.isLandscapeMode ? i18next.t("settings:landscape") : i18next.t("settings:portrait")} +
- `; +
+ `; return toolbar; }