From bd14ed640c8c11da897128ca621e5951b7cd0113 Mon Sep 17 00:00:00 2001 From: Lugiad <2070109+Adri1@users.noreply.github.com> Date: Tue, 20 May 2025 00:00:51 +0200 Subject: [PATCH] [Localization] Localizable "Cancel" text in Ball selection menu (#5836) "Cancel" text localizable --- src/ui/ball-ui-handler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/ball-ui-handler.ts b/src/ui/ball-ui-handler.ts index abb106a6553..eb7c208662a 100644 --- a/src/ui/ball-ui-handler.ts +++ b/src/ui/ball-ui-handler.ts @@ -7,6 +7,7 @@ import { addWindow } from "./ui-theme"; import { Button } from "#enums/buttons"; import type { CommandPhase } from "#app/phases/command-phase"; import { globalScene } from "#app/global-scene"; +import i18next from "i18next"; export default class BallUiHandler extends UiHandler { private pokeballSelectContainer: Phaser.GameObjects.Container; @@ -31,7 +32,7 @@ export default class BallUiHandler extends UiHandler { for (let pb = 0; pb < Object.keys(globalScene.pokeballCounts).length; pb++) { optionsTextContent += `${getPokeballName(pb)}\n`; } - optionsTextContent += "Cancel"; + optionsTextContent += i18next.t("pokeball:cancel"); const optionsText = addTextObject(0, 0, optionsTextContent, TextStyle.WINDOW, { align: "right", maxLines: 6 }); const optionsTextWidth = optionsText.displayWidth; this.pokeballSelectContainer = globalScene.add.container(