mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
Implement i18n keys
This commit is contained in:
parent
a0e97618b4
commit
4e9f670cf4
@ -68,7 +68,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
|
|||||||
|
|
||||||
if (context) {
|
if (context) {
|
||||||
context.font = styleOptions.fontSize + "px " + styleOptions.fontFamily;
|
context.font = styleOptions.fontSize + "px " + styleOptions.fontFamily;
|
||||||
this.transferButtonWidth = context.measureText("Manage Items").width; // Missing "Manage Items" call from locales.
|
this.transferButtonWidth = context.measureText(i18next.t("modifierSelectUiHandler:manageItems")).width;
|
||||||
this.checkButtonWidth = context.measureText(i18next.t("modifierSelectUiHandler:checkTeam")).width;
|
this.checkButtonWidth = context.measureText(i18next.t("modifierSelectUiHandler:checkTeam")).width;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
|
|||||||
this.transferButtonContainer.setVisible(false);
|
this.transferButtonContainer.setVisible(false);
|
||||||
ui.add(this.transferButtonContainer);
|
ui.add(this.transferButtonContainer);
|
||||||
|
|
||||||
const transferButtonText = addTextObject(-4, -2, "Manage Items", TextStyle.PARTY); // Missing "Manage Items" call from locales.
|
const transferButtonText = addTextObject(-4, -2, i18next.t("modifierSelectUiHandler:manageItems"), TextStyle.PARTY);
|
||||||
transferButtonText.setName("text-transfer-btn");
|
transferButtonText.setName("text-transfer-btn");
|
||||||
transferButtonText.setOrigin(1, 0);
|
transferButtonText.setOrigin(1, 0);
|
||||||
this.transferButtonContainer.add(transferButtonText);
|
this.transferButtonContainer.add(transferButtonText);
|
||||||
@ -557,7 +557,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
|
|||||||
(globalScene.game.canvas.width - this.transferButtonWidth - this.checkButtonWidth) / 6 - 30,
|
(globalScene.game.canvas.width - this.transferButtonWidth - this.checkButtonWidth) / 6 - 30,
|
||||||
OPTION_BUTTON_YPOSITION + 4,
|
OPTION_BUTTON_YPOSITION + 4,
|
||||||
);
|
);
|
||||||
ui.showText(i18next.t("modifierSelectUiHandler:transferDesc"));
|
ui.showText(i18next.t("modifierSelectUiHandler:manageItemsDesc"));
|
||||||
} else if (cursor === 2) {
|
} else if (cursor === 2) {
|
||||||
this.cursorObj.setPosition(
|
this.cursorObj.setPosition(
|
||||||
(globalScene.game.canvas.width - this.checkButtonWidth) / 6 - 10,
|
(globalScene.game.canvas.width - this.checkButtonWidth) / 6 - 10,
|
||||||
|
@ -675,7 +675,13 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
this.showText("Item has been discarded.", undefined, () => this.showText("", 0), null, true); // missing confirm message call from i18next.t.
|
this.showText(
|
||||||
|
i18next.t("partyUiHandler:discardItemConfirmation", { pokemonName: getPokemonNameWithAffix(pokemon) }),
|
||||||
|
undefined,
|
||||||
|
() => this.showText("", 0),
|
||||||
|
null,
|
||||||
|
true,
|
||||||
|
);
|
||||||
ui.playSelect();
|
ui.playSelect();
|
||||||
} else {
|
} else {
|
||||||
ui.playError();
|
ui.playError();
|
||||||
@ -1267,7 +1273,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PartyUiMode.DISCARD:
|
case PartyUiMode.DISCARD:
|
||||||
optionsMessage = "Select a held item to discard.\nUse < and > to change quantity."; //Missing discard i18next.t call message
|
optionsMessage = i18next.t("partyUiHandler:changeQuantityDiscard");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.showText(optionsMessage, 0);
|
this.showText(optionsMessage, 0);
|
||||||
@ -2165,7 +2171,7 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container {
|
|||||||
this.discardIcon.setVisible(true);
|
this.discardIcon.setVisible(true);
|
||||||
this.partyDiscardPb.setVisible(true);
|
this.partyDiscardPb.setVisible(true);
|
||||||
this.textBox.setVisible(true);
|
this.textBox.setVisible(true);
|
||||||
this.textBox.setText("Discard");
|
this.textBox.setText(i18next.t("partyUiHandler:DISCARD"));
|
||||||
this.setPosition(
|
this.setPosition(
|
||||||
globalScene.currentBattle.double ? 64 : 60,
|
globalScene.currentBattle.double ? 64 : 60,
|
||||||
globalScene.currentBattle.double ? -48 : -globalScene.game.canvas.height / 15 - 1,
|
globalScene.currentBattle.double ? -48 : -globalScene.game.canvas.height / 15 - 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user