From c3045b58b6dca55cb6d95cfcac731dead6da39e0 Mon Sep 17 00:00:00 2001 From: Lugiad <2070109+Adri1@users.noreply.github.com> Date: Thu, 20 Feb 2025 16:06:12 +0100 Subject: [PATCH] [Localization] Localizable Lv UP pop-up bar (#5336) * Update party-exp-bar.ts localizable * Update party-exp-bar.ts --- src/ui/party-exp-bar.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/party-exp-bar.ts b/src/ui/party-exp-bar.ts index 75970a5908b..b9da9320fcb 100644 --- a/src/ui/party-exp-bar.ts +++ b/src/ui/party-exp-bar.ts @@ -1,6 +1,7 @@ import { globalScene } from "#app/global-scene"; import type Pokemon from "../field/pokemon"; import { TextStyle, addTextObject } from "./text"; +import i18next from "i18next"; export default class PartyExpBar extends Phaser.GameObjects.Container { private bg: Phaser.GameObjects.NineSlice; @@ -43,9 +44,9 @@ export default class PartyExpBar extends Phaser.GameObjects.Container { // if we want to only display the level in the small frame if (showOnlyLevelUp) { if (newLevel > 200) { // if the level is greater than 200, we only display Lv. UP - this.expText.setText("Lv. UP"); + this.expText.setText(i18next.t("battleScene:levelUp")); } else { // otherwise we display Lv. Up and the new level - this.expText.setText(`Lv. UP: ${newLevel.toString()}`); + this.expText.setText(i18next.t("battleScene:levelUpWithLevel", { level: newLevel })); } } else { // if we want to display the exp