[Localization] Localizable Lv UP pop-up bar (#5336)

* Update party-exp-bar.ts localizable

* Update party-exp-bar.ts
This commit is contained in:
Lugiad 2025-02-20 16:06:12 +01:00 committed by GitHub
parent a346318f9d
commit c3045b58b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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