mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 13:59:27 +02:00
chnage party ui locales use
This commit is contained in:
parent
1b57ee0959
commit
c884de339a
@ -31,14 +31,14 @@ export class ConfirmUiHandler extends AbstractOptionSelectUiHandler {
|
||||
const config: OptionSelectConfig = {
|
||||
options: [
|
||||
{
|
||||
label: i18next.t("partyUiHandler:SUMMARY"),
|
||||
label: i18next.t("partyUiHandler:summary"),
|
||||
handler: () => {
|
||||
args[0]();
|
||||
return true;
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18next.t("partyUiHandler:POKEDEX"),
|
||||
label: i18next.t("partyUiHandler:pokedex"),
|
||||
handler: () => {
|
||||
args[1]();
|
||||
return true;
|
||||
|
@ -27,7 +27,7 @@ import { addBBCodeTextObject, addTextObject, getTextColor } from "#ui/text";
|
||||
import { addWindow } from "#ui/ui-theme";
|
||||
import { applyChallenges } from "#utils/challenge-utils";
|
||||
import { BooleanHolder, getLocalizedSpriteKey, randInt } from "#utils/common";
|
||||
import { toTitleCase } from "#utils/strings";
|
||||
import { toCamelCase, toTitleCase } from "#utils/strings";
|
||||
import i18next from "i18next";
|
||||
import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
||||
|
||||
@ -1573,12 +1573,12 @@ export class PartyUiHandler extends MessageUiHandler {
|
||||
const formChangeItemModifiers = this.getFormChangeItemsModifiers(pokemon);
|
||||
if (formChangeItemModifiers && option >= PartyOption.FORM_CHANGE_ITEM) {
|
||||
const modifier = formChangeItemModifiers[option - PartyOption.FORM_CHANGE_ITEM];
|
||||
optionName = `${modifier.active ? i18next.t("partyUiHandler:DEACTIVATE") : i18next.t("partyUiHandler:ACTIVATE")} ${modifier.type.name}`;
|
||||
optionName = `${modifier.active ? i18next.t("partyUiHandler:deactivate") : i18next.t("partyUiHandler:activate")} ${modifier.type.name}`;
|
||||
} else if (option === PartyOption.UNPAUSE_EVOLUTION) {
|
||||
optionName = `${pokemon.pauseEvolutions ? i18next.t("partyUiHandler:UNPAUSE_EVOLUTION") : i18next.t("partyUiHandler:PAUSE_EVOLUTION")}`;
|
||||
optionName = `${pokemon.pauseEvolutions ? i18next.t("partyUiHandler:unpausedEvolution") : i18next.t("partyUiHandler:pauseEvolution")}`;
|
||||
} else {
|
||||
if (this.localizedOptions.includes(option)) {
|
||||
optionName = i18next.t(`partyUiHandler:${PartyOption[option]}`);
|
||||
optionName = i18next.t(`partyUiHandler:${toCamelCase(PartyOption[option])}`);
|
||||
} else {
|
||||
optionName = toTitleCase(PartyOption[option]);
|
||||
}
|
||||
@ -1595,7 +1595,7 @@ export class PartyUiHandler extends MessageUiHandler {
|
||||
.getLevelMoves()
|
||||
.find(plm => plm[1] === move);
|
||||
} else if (option === PartyOption.ALL) {
|
||||
optionName = i18next.t("partyUiHandler:ALL");
|
||||
optionName = i18next.t("partyUiHandler:all");
|
||||
} else {
|
||||
const itemModifiers = this.getItemModifiers(pokemon);
|
||||
const itemModifier = itemModifiers[option];
|
||||
@ -2142,7 +2142,12 @@ class PartyCancelButton extends Phaser.GameObjects.Container {
|
||||
|
||||
this.partyCancelPb = partyCancelPb;
|
||||
|
||||
const partyCancelText = addTextObject(-10, -7, i18next.t("partyUiHandler:cancel"), TextStyle.PARTY_CANCEL_BUTTON);
|
||||
const partyCancelText = addTextObject(
|
||||
-10,
|
||||
-7,
|
||||
i18next.t("partyUiHandler:cancelButton"),
|
||||
TextStyle.PARTY_CANCEL_BUTTON,
|
||||
);
|
||||
this.add(partyCancelText);
|
||||
}
|
||||
|
||||
@ -2185,7 +2190,7 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container {
|
||||
setup(party: PartyUiHandler) {
|
||||
this.transferIcon = globalScene.add.sprite(0, 0, "party_transfer");
|
||||
this.discardIcon = globalScene.add.sprite(0, 0, "party_discard");
|
||||
this.textBox = addTextObject(-8, -7, i18next.t("partyUiHandler:TRANSFER"), TextStyle.PARTY);
|
||||
this.textBox = addTextObject(-8, -7, i18next.t("partyUiHandler:transfer"), TextStyle.PARTY);
|
||||
this.party = party;
|
||||
|
||||
this.add(this.transferIcon);
|
||||
@ -2233,14 +2238,14 @@ class PartyDiscardModeButton extends Phaser.GameObjects.Container {
|
||||
this.transferIcon.setVisible(true);
|
||||
this.discardIcon.setVisible(false);
|
||||
this.textBox.setVisible(true);
|
||||
this.textBox.setText(i18next.t("partyUiHandler:TRANSFER"));
|
||||
this.textBox.setText(i18next.t("partyUiHandler:transfer"));
|
||||
this.transferIcon.displayWidth = this.textBox.text.length * 9 + 3;
|
||||
break;
|
||||
case PartyUiMode.DISCARD:
|
||||
this.transferIcon.setVisible(false);
|
||||
this.discardIcon.setVisible(true);
|
||||
this.textBox.setVisible(true);
|
||||
this.textBox.setText(i18next.t("partyUiHandler:DISCARD"));
|
||||
this.textBox.setText(i18next.t("partyUiHandler:discard"));
|
||||
this.discardIcon.displayWidth = this.textBox.text.length * 9 + 3;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user