mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-04-27 03:56:16 +01:00
[Localization] Localizable Lv UP pop-up bar (#5336)
* Update party-exp-bar.ts localizable * Update party-exp-bar.ts
This commit is contained in:
parent
a346318f9d
commit
c3045b58b6
@ -1,6 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type Pokemon from "../field/pokemon";
|
import type Pokemon from "../field/pokemon";
|
||||||
import { TextStyle, addTextObject } from "./text";
|
import { TextStyle, addTextObject } from "./text";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export default class PartyExpBar extends Phaser.GameObjects.Container {
|
export default class PartyExpBar extends Phaser.GameObjects.Container {
|
||||||
private bg: Phaser.GameObjects.NineSlice;
|
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 we want to only display the level in the small frame
|
||||||
if (showOnlyLevelUp) {
|
if (showOnlyLevelUp) {
|
||||||
if (newLevel > 200) { // if the level is greater than 200, we only display Lv. UP
|
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
|
} 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 {
|
} else {
|
||||||
// if we want to display the exp
|
// if we want to display the exp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user