From a1ea65608246f32198184988f4bfafac1f9dd8aa Mon Sep 17 00:00:00 2001 From: Zach Day Date: Sat, 3 Aug 2024 17:44:05 -0400 Subject: [PATCH] En loc and fix message functions --- src/data/battler-tags.ts | 10 +++------- src/locales/en/battle.ts | 5 ++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 9f515ad8a77..58b94d921c1 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -196,15 +196,15 @@ export class DisabledTag extends DisablingBattlerTag { this.moveId = move.move; - pokemon.scene.queueMessage(getPokemonMessage(pokemon, `'s ${allMoves[this.moveId].name}\nwas disabled!`)); + pokemon.scene.queueMessage(i18next.t("battle:battlerTagsDisabledOnAdd", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: this.getMoveName() })); } protected override interruptedText(pokemon: Pokemon, move: Moves): string { - return getPokemonMessage(pokemon, `'s ${allMoves[this.moveId].name}\nis disabled!`); + return i18next.t("battle:disableInterruptedMove", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: this.getMoveName() }); } protected override finishedText(pokemon: Pokemon): string { - return i18next.t("battle:notDisabled", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: allMoves[this.moveId].name }); + return i18next.t("battle:battlerTagsDisabledLapse", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), moveName: this.getMoveName() }); } } @@ -1901,7 +1901,3 @@ export function loadBattlerTag(source: BattlerTag | any): BattlerTag { tag.loadTag(source); return tag; } -function getPokemonMessage(pokemon: Pokemon, arg1: string): string { - throw new Error("Function not implemented."); -} - diff --git a/src/locales/en/battle.ts b/src/locales/en/battle.ts index 12a0f2c99c6..8a8ba2f86e5 100644 --- a/src/locales/en/battle.ts +++ b/src/locales/en/battle.ts @@ -45,6 +45,7 @@ export const battle: SimpleTranslationEntries = { "moveNotImplemented": "{{moveName}} is not yet implemented and cannot be selected.", "moveNoPP": "There's no PP left for\nthis move!", "moveDisabled": "{{moveName}} is disabled!", + "disableInterruptedMove": "{{pokemonNameWithAffix}}'s {{moveName}}\nis disabled!", "noPokeballForce": "An unseen force\nprevents using Poké Balls.", "noPokeballTrainer": "You can't catch\nanother trainer's Pokémon!", "noPokeballMulti": "You can only throw a Poké Ball\nwhen there is one Pokémon remaining!", @@ -155,5 +156,7 @@ export const battle: SimpleTranslationEntries = { "battlerTagsSaltCuredLapse": "{{pokemonNameWithAffix}} is hurt by {{moveName}}!", "battlerTagsCursedOnAdd": "{{pokemonNameWithAffix}} cut its own HP and put a curse on the {{pokemonName}}!", "battlerTagsCursedLapse": "{{pokemonNameWithAffix}} is afflicted by the Curse!", - "battlerTagsStockpilingOnAdd": "{{pokemonNameWithAffix}} stockpiled {{stockpiledCount}}!" + "battlerTagsStockpilingOnAdd": "{{pokemonNameWithAffix}} stockpiled {{stockpiledCount}}!", + "battlerTagsDisabledOnAdd": "{{pokemonNameWithAffix}}'s {{moveName}}\nwas disabled!", + "battlerTagsDisabledLapse": "{{pokemonNameWithAffix}}'s {{moveName}}\nis no longer disabled.", } as const;