[Localization] modifier-select-ui-handler Locales (#1567)

* Update i18n.ts

* Update modifier-select-ui-handler.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update modifier-select-ui-handler.ts

* Update config.ts

* Add files via upload

* Update modifier-select-ui-handler.ts

* Update modifier-select-ui-handler.ts

* Update src/locales/ko/modifier-select-ui-handler.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Update src/locales/ko/modifier-select-ui-handler.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Update src/locales/ko/modifier-select-ui-handler.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Update src/locales/ko/modifier-select-ui-handler.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Update src/locales/ko/modifier-select-ui-handler.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Update modifier-select-ui-handler.ts

---------

Co-authored-by: returntoice <dieandbecome@gmail.com>
This commit is contained in:
Lugiad 2024-05-31 16:39:13 +02:00 committed by GitHub
parent 5182937040
commit 5c79e6258b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 148 additions and 24 deletions

View File

@ -32,6 +32,7 @@ import {
} from "./dialogue";
import { biome } from "./biome";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { modifierSelectUiHandler } from "./modifier-select-ui-handler";
export const deConfig = {
ability: ability,
@ -69,5 +70,6 @@ export const deConfig = {
PGMmiscDialogue: PGMmiscDialogue,
PGFmiscDialogue: PGFmiscDialogue,
PGMdoubleBattleDialogue: PGMdoubleBattleDialogue,
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
modifierSelectUiHandler: modifierSelectUiHandler
};

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const modifierSelectUiHandler: SimpleTranslationEntries = {
"transfer": "Transfer",
"reroll": "Reroll",
"lockRarities": "Lock Rarities",
"transferDesc": "Transfer a held item from one Pokémon to another.",
"rerollDesc": "Spend money to reroll your item options.",
"lockRaritiesDesc": "Lock item rarities on reroll (affects reroll cost).",
"rerollCost": "₽{{cost}}",
"itemCost": "₽{{cost}}"
} as const;

View File

@ -32,6 +32,7 @@ import {
} from "./dialogue";
import { biome } from "./biome";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { modifierSelectUiHandler } from "./modifier-select-ui-handler";
export const enConfig = {
ability: ability,
@ -69,5 +70,6 @@ export const enConfig = {
PGMmiscDialogue: PGMmiscDialogue,
PGFmiscDialogue: PGFmiscDialogue,
PGMdoubleBattleDialogue: PGMdoubleBattleDialogue,
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
modifierSelectUiHandler: modifierSelectUiHandler
};

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const modifierSelectUiHandler: SimpleTranslationEntries = {
"transfer": "Transfer",
"reroll": "Reroll",
"lockRarities": "Lock Rarities",
"transferDesc": "Transfer a held item from one Pokémon to another.",
"rerollDesc": "Spend money to reroll your item options.",
"lockRaritiesDesc": "Lock item rarities on reroll (affects reroll cost).",
"rerollCost": "₽{{cost}}",
"itemCost": "₽{{cost}}"
} as const;

View File

@ -32,6 +32,7 @@ import {
} from "./dialogue";
import { biome } from "./biome";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { modifierSelectUiHandler } from "./modifier-select-ui-handler";
export const esConfig = {
ability: ability,
@ -69,5 +70,6 @@ export const esConfig = {
PGMmiscDialogue: PGMmiscDialogue,
PGFmiscDialogue: PGFmiscDialogue,
PGMdoubleBattleDialogue: PGMdoubleBattleDialogue,
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
modifierSelectUiHandler: modifierSelectUiHandler
};

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const modifierSelectUiHandler: SimpleTranslationEntries = {
"transfer": "Transfer",
"reroll": "Reroll",
"lockRarities": "Lock Rarities",
"transferDesc": "Transfer a held item from one Pokémon to another.",
"rerollDesc": "Spend money to reroll your item options.",
"lockRaritiesDesc": "Lock item rarities on reroll (affects reroll cost).",
"rerollCost": "₽{{cost}}",
"itemCost": "₽{{cost}}"
} as const;

View File

@ -32,6 +32,7 @@ import {
} from "./dialogue";
import { biome } from "./biome";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { modifierSelectUiHandler } from "./modifier-select-ui-handler";
export const frConfig = {
ability: ability,
@ -69,5 +70,6 @@ export const frConfig = {
PGMmiscDialogue: PGMmiscDialogue,
PGFmiscDialogue: PGFmiscDialogue,
PGMdoubleBattleDialogue: PGMdoubleBattleDialogue,
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
modifierSelectUiHandler: modifierSelectUiHandler
};

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const modifierSelectUiHandler: SimpleTranslationEntries = {
"transfer": "Transférer",
"reroll": "Relancer",
"lockRarities": "Bloquer la rareté",
"transferDesc": "Transférer un objet tenu par un Pokémon vers un autre.",
"rerollDesc": "Payer pour relancer les objets gratuits proposés.",
"lockRaritiesDesc": "La relance proposera des objets gratuits de rareté\négale ou supérieure. Affecte le cout de relance.",
"rerollCost": "{{cost}} ₽",
"itemCost": "{{cost}} ₽"
} as const;

View File

@ -32,6 +32,7 @@ import {
} from "./dialogue";
import { biome } from "./biome";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { modifierSelectUiHandler } from "./modifier-select-ui-handler";
export const itConfig = {
ability: ability,
@ -69,5 +70,6 @@ export const itConfig = {
PGMmiscDialogue: PGMmiscDialogue,
PGFmiscDialogue: PGFmiscDialogue,
PGMdoubleBattleDialogue: PGMdoubleBattleDialogue,
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
modifierSelectUiHandler: modifierSelectUiHandler
};

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const modifierSelectUiHandler: SimpleTranslationEntries = {
"transfer": "Transfer",
"reroll": "Reroll",
"lockRarities": "Lock Rarities",
"transferDesc": "Transfer a held item from one Pokémon to another.",
"rerollDesc": "Spend money to reroll your item options.",
"lockRaritiesDesc": "Lock item rarities on reroll (affects reroll cost).",
"rerollCost": "₽{{cost}}",
"itemCost": "₽{{cost}}"
} as const;

View File

@ -32,7 +32,7 @@ import {
} from "./dialogue";
import { biome } from "./biome";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { modifierSelectUiHandler } from "./modifier-select-ui-handler";
export const koConfig = {
ability: ability,
@ -70,5 +70,6 @@ export const koConfig = {
PGMmiscDialogue: PGMmiscDialogue,
PGFmiscDialogue: PGFmiscDialogue,
PGMdoubleBattleDialogue: PGMdoubleBattleDialogue,
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
modifierSelectUiHandler: modifierSelectUiHandler
};

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const modifierSelectUiHandler: SimpleTranslationEntries = {
"transfer": "도구 이동",
"reroll": "새로고침",
"lockRarities": "레어도 고정",
"transferDesc": "포켓몬이 지닌 도구를 다른 포켓몬에게 옮깁니다.",
"rerollDesc": "소지금을 사용하여 선택 가능한 도구들을 새로고침합니다.",
"lockRaritiesDesc": "새로고침할 때 도구 레어도를 고정합니다(새로고침 비용 상승함).",
"rerollCost": "₽{{cost}}",
"itemCost": "₽{{cost}}"
} as const;

View File

@ -32,6 +32,7 @@ import {
} from "./dialogue";
import { biome } from "./biome";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { modifierSelectUiHandler } from "./modifier-select-ui-handler";
export const ptBrConfig = {
ability: ability,
@ -69,5 +70,6 @@ export const ptBrConfig = {
PGMmiscDialogue: PGMmiscDialogue,
PGFmiscDialogue: PGFmiscDialogue,
PGMdoubleBattleDialogue: PGMdoubleBattleDialogue,
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
modifierSelectUiHandler: modifierSelectUiHandler
};

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const modifierSelectUiHandler: SimpleTranslationEntries = {
"transfer": "Transfer",
"reroll": "Reroll",
"lockRarities": "Lock Rarities",
"transferDesc": "Transfer a held item from one Pokémon to another.",
"rerollDesc": "Spend money to reroll your item options.",
"lockRaritiesDesc": "Lock item rarities on reroll (affects reroll cost).",
"rerollCost": "₽{{cost}}",
"itemCost": "₽{{cost}}"
} as const;

View File

@ -32,6 +32,7 @@ import {
} from "./dialogue";
import { biome } from "./biome";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { modifierSelectUiHandler } from "./modifier-select-ui-handler";
export const zhCnConfig = {
ability: ability,
@ -69,5 +70,6 @@ export const zhCnConfig = {
PGMmiscDialogue: PGMmiscDialogue,
PGFmiscDialogue: PGFmiscDialogue,
PGMdoubleBattleDialogue: PGMdoubleBattleDialogue,
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
modifierSelectUiHandler: modifierSelectUiHandler
};

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const modifierSelectUiHandler: SimpleTranslationEntries = {
"transfer": "交换道具",
"reroll": "刷新掉落",
"lockRarities": "锁定稀有度",
"transferDesc": "将一只宝可梦所持有的道具交换给另一只。",
"rerollDesc": "花钱刷新掉落道具选项。",
"lockRaritiesDesc": "在刷新时锁定道具稀有度(影响刷新费用)。",
"rerollCost": "₽{{cost}}",
"itemCost": "₽{{cost}}"
} as const;

View File

@ -31,6 +31,7 @@ import {
} from "./dialogue";
import { biome } from "./biome";
import { pokemonInfoContainer } from "./pokemon-info-container";
import { modifierSelectUiHandler } from "./modifier-select-ui-handler";
export const zhTWConfig = {
ability: ability,
@ -67,5 +68,6 @@ export const zhTWConfig = {
PGMmiscDialogue: PGMmiscDialogue,
PGFmiscDialogue: PGFmiscDialogue,
PGMdoubleBattleDialogue: PGMdoubleBattleDialogue,
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
modifierSelectUiHandler: modifierSelectUiHandler
};

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const modifierSelectUiHandler: SimpleTranslationEntries = {
"transfer": "Transfer",
"reroll": "Reroll",
"lockRarities": "Lock Rarities",
"transferDesc": "Transfer a held item from one Pokémon to another.",
"rerollDesc": "Spend money to reroll your item options.",
"lockRaritiesDesc": "Lock item rarities on reroll (affects reroll cost).",
"rerollCost": "₽{{cost}}",
"itemCost": "₽{{cost}}"
} as const;

View File

@ -221,6 +221,7 @@ declare module "i18next" {
PGFbattleSpecDialogue: SimpleTranslationEntries;
PGFmiscDialogue: SimpleTranslationEntries;
PGFdoubleBattleDialogue: DialogueTranslationEntries;
modifierSelectUiHandler: SimpleTranslationEntries;
};
}
}

View File

@ -7,6 +7,7 @@ import { Mode } from "./ui";
import { LockModifierTiersModifier, PokemonHeldItemModifier } from "../modifier/modifier";
import { handleTutorial, Tutorial } from "../tutorial";
import {Button} from "../enums/buttons";
import i18next from "i18next";
export const SHOP_OPTIONS_ROW_LIMIT = 6;
@ -41,27 +42,22 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
ui.add(this.modifierContainer);
this.transferButtonContainer = this.scene.add.container((this.scene.game.canvas.width / 6) - 1, -64);
this.transferButtonContainer.setName("container-transfer-btn");
this.transferButtonContainer.setVisible(false);
ui.add(this.transferButtonContainer);
const transferButtonText = addTextObject(this.scene, -4, -2, "Transfer", TextStyle.PARTY);
transferButtonText.setName("text-transfer-btn");
const transferButtonText = addTextObject(this.scene, -4, -2, i18next.t("modifierSelectUiHandler:transfer"), TextStyle.PARTY);
transferButtonText.setOrigin(1, 0);
this.transferButtonContainer.add(transferButtonText);
this.rerollButtonContainer = this.scene.add.container(16, -64);
this.rerollButtonContainer.setName("container-reroll-brn");
this.rerollButtonContainer.setVisible(false);
ui.add(this.rerollButtonContainer);
const rerollButtonText = addTextObject(this.scene, -4, -2, "Reroll", TextStyle.PARTY);
rerollButtonText.setName("text-reroll-btn");
const rerollButtonText = addTextObject(this.scene, -4, -2, i18next.t("modifierSelectUiHandler:reroll"), TextStyle.PARTY);
rerollButtonText.setOrigin(0, 0);
this.rerollButtonContainer.add(rerollButtonText);
this.rerollCostText = addTextObject(this.scene, 0, 0, "", TextStyle.MONEY);
this.rerollCostText.setName("text-reroll-cost");
this.rerollCostText.setOrigin(0, 0);
this.rerollCostText.setPositionRelative(rerollButtonText, rerollButtonText.displayWidth + 5, 1);
this.rerollButtonContainer.add(this.rerollCostText);
@ -70,7 +66,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
this.lockRarityButtonContainer.setVisible(false);
ui.add(this.lockRarityButtonContainer);
this.lockRarityButtonText = addTextObject(this.scene, -4, -2, "Lock Rarities", TextStyle.PARTY);
this.lockRarityButtonText = addTextObject(this.scene, -4, -2, i18next.t("modifierSelectUiHandler:lockRarities"), TextStyle.PARTY);
this.lockRarityButtonText.setOrigin(0, 0);
this.lockRarityButtonContainer.add(this.lockRarityButtonText);
}
@ -146,7 +142,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
const maxUpgradeCount = typeOptions.map(to => to.upgradeCount).reduce((max, current) => Math.max(current, max), 0);
this.scene.showFieldOverlay(750);
this.scene.updateAndShowText(750);
this.scene.updateAndShowLuckText(750);
this.scene.updateMoneyText();
let i = 0;
@ -303,13 +299,13 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
ui.showText(options[this.cursor].modifierTypeOption.type.getDescription(this.scene));
} else if (!cursor) {
this.cursorObj.setPosition(6, this.lockRarityButtonContainer.visible ? -72 : -60);
ui.showText("Spend money to reroll your item options.");
ui.showText(i18next.t("modifierSelectUiHandler:rerollDesc"));
} else if (cursor === 1) {
this.cursorObj.setPosition((this.scene.game.canvas.width / 6) - 50, -60);
ui.showText("Transfer a held item from one Pokémon to another.");
ui.showText(i18next.t("modifierSelectUiHandler:transferDesc"));
} else {
this.cursorObj.setPosition(6, -60);
ui.showText("Lock item rarities on reroll (affects reroll cost).");
ui.showText(i18next.t("modifierSelectUiHandler:lockRaritiesDesc"));
}
return ret;
@ -362,8 +358,9 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
updateRerollCostText(): void {
const canReroll = this.scene.money >= this.rerollCost;
const rerollCostFormatted = this.rerollCost.toLocaleString(i18next.language);
this.rerollCostText.setText(`${this.rerollCost.toLocaleString("en-US")}`);
this.rerollCostText.setText(i18next.t("modifierSelectUiHandler:rerollCost", { cost: rerollCostFormatted }));
this.rerollCostText.setColor(this.getTextColor(canReroll ? TextStyle.MONEY : TextStyle.PARTY_RED));
this.rerollCostText.setShadowColor(this.getTextColor(canReroll ? TextStyle.MONEY : TextStyle.PARTY_RED, true));
}
@ -618,8 +615,9 @@ class ModifierOption extends Phaser.GameObjects.Container {
updateCostText(): void {
const scene = this.scene as BattleScene;
const textStyle = this.modifierTypeOption.cost <= scene.money ? TextStyle.MONEY : TextStyle.PARTY_RED;
const itemCostFormatted = this.modifierTypeOption.cost.toLocaleString(i18next.language);
this.itemCostText.setText(`${this.modifierTypeOption.cost.toLocaleString("en-US")}`);
this.itemCostText.setText(i18next.t("modifierSelectUiHandler:itemCost", { cost: itemCostFormatted }));
this.itemCostText.setColor(getTextColor(textStyle, false, scene.uiTheme));
this.itemCostText.setShadowColor(getTextColor(textStyle, true, scene.uiTheme));
}