From 3d07428fbf269dd712a717088588d7bbf8fe56e7 Mon Sep 17 00:00:00 2001 From: Laeticia PIERRE Date: Thu, 23 May 2024 10:03:54 +0200 Subject: [PATCH 01/13] useMove + pokemonPrefix localization --- src/locales/de/battle.ts | 5 ++++- src/locales/en/battle.ts | 5 ++++- src/locales/es/battle.ts | 5 ++++- src/locales/fr/battle.ts | 5 ++++- src/locales/it/battle.ts | 5 ++++- src/locales/pt_BR/battle.ts | 5 ++++- src/locales/zh_CN/battle.ts | 5 ++++- src/messages.ts | 9 +++++++-- src/phases.ts | 12 ++++++++++-- 9 files changed, 45 insertions(+), 11 deletions(-) diff --git a/src/locales/de/battle.ts b/src/locales/de/battle.ts index 5504e541be06..f793dcad9c04 100644 --- a/src/locales/de/battle.ts +++ b/src/locales/de/battle.ts @@ -52,5 +52,8 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "Bist du sicher, dass du kein Item nehmen willst?", "notDisabled": "{{pokemonName}}'s {{moveName}} ist\nnicht mehr deaktiviert!", "eggHatching": "Oh?", - "ivScannerUseQuestion": "IV-Scanner auf {{pokemonName}} benutzen?" + "ivScannerUseQuestion": "IV-Scanner auf {{pokemonName}} benutzen?", + "wildPokemonPrefix": "Wild", + "foePokemonPrefix": "Foe", + "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; diff --git a/src/locales/en/battle.ts b/src/locales/en/battle.ts index a6ed2fabc644..fd84efb96805 100644 --- a/src/locales/en/battle.ts +++ b/src/locales/en/battle.ts @@ -52,5 +52,8 @@ export const battle: SimpleTranslationEntries = { "notDisabled": "{{pokemonName}}'s {{moveName}} is disabled\nno more!", "skipItemQuestion": "Are you sure you want to skip taking an item?", "eggHatching": "Oh?", - "ivScannerUseQuestion": "Use IV Scanner on {{pokemonName}}?" + "ivScannerUseQuestion": "Use IV Scanner on {{pokemonName}}?", + "wildPokemonPrefix": "Wild", + "foePokemonPrefix": "Foe", + "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; \ No newline at end of file diff --git a/src/locales/es/battle.ts b/src/locales/es/battle.ts index 5715c58ece0b..ceb28d06b0db 100644 --- a/src/locales/es/battle.ts +++ b/src/locales/es/battle.ts @@ -52,5 +52,8 @@ export const battle: SimpleTranslationEntries = { "notDisabled": "¡El movimiento {{moveName}} de {{pokemonName}}\nya no está anulado!", "skipItemQuestion": "¿Estás seguro de que no quieres coger un objeto?", "eggHatching": "¿Y esto?", - "ivScannerUseQuestion": "¿Quieres usar el Escáner de IVs en {{pokemonName}}?" + "ivScannerUseQuestion": "¿Quieres usar el Escáner de IVs en {{pokemonName}}?", + "wildPokemonPrefix": "Wild", + "foePokemonPrefix": "Foe", + "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; \ No newline at end of file diff --git a/src/locales/fr/battle.ts b/src/locales/fr/battle.ts index 827cea6b2d75..287efad4775d 100644 --- a/src/locales/fr/battle.ts +++ b/src/locales/fr/battle.ts @@ -52,5 +52,8 @@ export const battle: SimpleTranslationEntries = { "notDisabled": "La capacité {{moveName}}\nde {{pokemonName}} n’est plus sous entrave !", "skipItemQuestion": "Êtes-vous sûr·e de ne pas vouloir prendre d’objet ?", "eggHatching": "Oh ?", - "ivScannerUseQuestion": "Utiliser le Scanner d’IV sur {{pokemonName}} ?" + "ivScannerUseQuestion": "Utiliser le Scanner d’IV sur {{pokemonName}} ?", + "wildPokemonPrefix": "Sauvage", + "foePokemonPrefix": "Ennemi", + "useMove": "{{pokemonName}} {{pokemonPrefix}}utilise {{moveName}} !" } as const; diff --git a/src/locales/it/battle.ts b/src/locales/it/battle.ts index c9cf46554c02..89cb20aa2921 100644 --- a/src/locales/it/battle.ts +++ b/src/locales/it/battle.ts @@ -52,5 +52,8 @@ export const battle: SimpleTranslationEntries = { "notDisabled": "{{pokemonName}}'s {{moveName}} non è più\ndisabilitata!", "skipItemQuestion": "Sei sicuro di non voler prendere nessun oggetto?", "eggHatching": "Oh!", - "ivScannerUseQuestion": "Vuoi usare lo scanner di IV su {{pokemonName}}?" + "ivScannerUseQuestion": "Vuoi usare lo scanner di IV su {{pokemonName}}?", + "wildPokemonPrefix": "Wild", + "foePokemonPrefix": "Foe", + "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; \ No newline at end of file diff --git a/src/locales/pt_BR/battle.ts b/src/locales/pt_BR/battle.ts index cc49abc7a7ca..5cf6231b8d33 100644 --- a/src/locales/pt_BR/battle.ts +++ b/src/locales/pt_BR/battle.ts @@ -52,5 +52,8 @@ export const battle: SimpleTranslationEntries = { "notDisabled": "O movimento {{moveName}}\nnão está mais desabilitado!", "skipItemQuestion": "Tem certeza de que não quer escolher um item?", "eggHatching": "Opa?", - "ivScannerUseQuestion": "Quer usar o Scanner de IVs em {{pokemonName}}?" + "ivScannerUseQuestion": "Quer usar o Scanner de IVs em {{pokemonName}}?", + "wildPokemonPrefix": "Wild", + "foePokemonPrefix": "Foe", + "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; \ No newline at end of file diff --git a/src/locales/zh_CN/battle.ts b/src/locales/zh_CN/battle.ts index f698fcc32ab2..3bbe8ee8f499 100644 --- a/src/locales/zh_CN/battle.ts +++ b/src/locales/zh_CN/battle.ts @@ -52,5 +52,8 @@ export const battle: SimpleTranslationEntries = { "notDisabled": "{{moveName}} 不再被禁用!", "skipItemQuestion": "你确定要跳过拾取道具吗?", "eggHatching": "咦?", - "ivScannerUseQuestion": "对 {{pokemonName}} 使用个体值扫描仪?" + "ivScannerUseQuestion": "对 {{pokemonName}} 使用个体值扫描仪?", + "wildPokemonPrefix": "Wild", + "foePokemonPrefix": "Foe", + "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; \ No newline at end of file diff --git a/src/messages.ts b/src/messages.ts index ffd9aa6efea9..93223f2b97f2 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -1,5 +1,6 @@ import { BattleSpec } from "./enums/battle-spec"; import Pokemon from "./field/pokemon"; +import i18next from "./plugins/i18n"; export function getPokemonMessage(pokemon: Pokemon, content: string): string { return `${getPokemonPrefix(pokemon)}${pokemon.name}${content}`; @@ -9,10 +10,14 @@ export function getPokemonPrefix(pokemon: Pokemon): string { let prefix: string; switch (pokemon.scene.currentBattle.battleSpec) { case BattleSpec.DEFAULT: - prefix = !pokemon.isPlayer() ? pokemon.hasTrainer() ? 'Foe ' : 'Wild ' : ''; + prefix = !pokemon.isPlayer() + ? pokemon.hasTrainer() + ? `${i18next.t('battle:foePokemonPrefix')} ` + : `${i18next.t('battle:wildPokemonPrefix')} ` + : ''; break; case BattleSpec.FINAL_BOSS: - prefix = !pokemon.isPlayer() ? 'Foe ' : ''; + prefix = !pokemon.isPlayer() ? `${i18next.t('battle:foePokemonPrefix')} ` : ''; break; } return prefix; diff --git a/src/phases.ts b/src/phases.ts index bec02390c725..9c6c6cbd8735 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2465,7 +2465,11 @@ export class MovePhase extends BattlePhase { if (this.move.getMove().getAttrs(ChargeAttr).length) { const lastMove = this.pokemon.getLastXMoves() as TurnMove[]; if (!lastMove.length || lastMove[0].move !== this.move.getMove().id || lastMove[0].result !== MoveResult.OTHER){ - this.scene.queueMessage(getPokemonMessage(this.pokemon, ` used\n${this.move.getName()}!`), 500); + this.scene.queueMessage(i18next.t('battle:useMove', { + pokemonPrefix: getPokemonPrefix(this.pokemon), + pokemonName: this.pokemon.name, + moveName: this.move.getName() + }), 500); return; } } @@ -2473,7 +2477,11 @@ export class MovePhase extends BattlePhase { if (this.pokemon.getTag(BattlerTagType.RECHARGING || BattlerTagType.INTERRUPTED)) return; - this.scene.queueMessage(getPokemonMessage(this.pokemon, ` used\n${this.move.getName()}!`), 500); + this.scene.queueMessage(i18next.t('battle:useMove', { + pokemonPrefix: getPokemonPrefix(this.pokemon), + pokemonName: this.pokemon.name, + moveName: this.move.getName() + }), 500); applyMoveAttrs(PreMoveMessageAttr, this.pokemon, this.pokemon.getOpponents().find(() => true), this.move.getMove()); } From 779664364cc20bbdc68a03783ec4671a5b1d0de1 Mon Sep 17 00:00:00 2001 From: Laeticia PIERRE Date: Mon, 27 May 2024 16:10:23 +0200 Subject: [PATCH 02/13] Rename prefix to affix + line break fr --- src/data/ability.ts | 6 +++--- src/data/battler-tags.ts | 2 +- src/data/weather.ts | 6 +++--- src/locales/de/battle.ts | 4 ++-- src/locales/en/battle.ts | 4 ++-- src/locales/es/battle.ts | 4 ++-- src/locales/fr/battle.ts | 6 +++--- src/locales/it/battle.ts | 4 ++-- src/locales/pt_BR/battle.ts | 4 ++-- src/locales/zh_CN/battle.ts | 4 ++-- src/messages.ts | 10 +++++----- src/phases.ts | 8 ++++---- 12 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 0e1a1d1f0f50..bc0ceff62368 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3,7 +3,7 @@ import { Type } from "./type"; import * as Utils from "../utils"; import { BattleStat, getBattleStatName } from "./battle-stat"; import { MovePhase, PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "../phases"; -import { getPokemonMessage, getPokemonPrefix } from "../messages"; +import { getPokemonMessage, getPokemonAffix } from "../messages"; import { Weather, WeatherType } from "./weather"; import { BattlerTag } from "./battler-tags"; import { BattlerTagType } from "./enums/battler-tag-type"; @@ -146,7 +146,7 @@ export class BlockRecoilDamageAttr extends AbAttr { } getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]) { - return i18next.t("abilityTriggers:blockRecoilDamage", {pokemonName: `${getPokemonPrefix(pokemon)}${pokemon.name}`, abilityName: abilityName}); + return i18next.t("abilityTriggers:blockRecoilDamage", {pokemonName: `${getPokemonAffix(pokemon)}${pokemon.name}`, abilityName: abilityName}); } } @@ -2451,7 +2451,7 @@ export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr { for (const opp of pokemon.getOpponents()) { if (opp.status?.effect === StatusEffect.SLEEP || opp.hasAbility(Abilities.COMATOSE)) { opp.damageAndUpdate(Math.floor(Math.max(1, opp.getMaxHp() / 8)), HitResult.OTHER); - pokemon.scene.queueMessage(i18next.t("abilityTriggers:badDreams", {pokemonName: `${getPokemonPrefix(opp)}${opp.name}`})); + pokemon.scene.queueMessage(i18next.t("abilityTriggers:badDreams", {pokemonName: `${getPokemonAffix(opp)}${opp.name}`})); hadEffect = true; } diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 2cf1c6eff647..86504f9b8716 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1,6 +1,6 @@ import { CommonAnim, CommonBattleAnim } from "./battle-anims"; import { CommonAnimPhase, MoveEffectPhase, MovePhase, PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "../phases"; -import { getPokemonMessage, getPokemonPrefix } from "../messages"; +import { getPokemonMessage } from "../messages"; import Pokemon, { MoveResult, HitResult } from "../field/pokemon"; import { Stat, getStatName } from "./pokemon-stat"; import { StatusEffect } from "./status-effect"; diff --git a/src/data/weather.ts b/src/data/weather.ts index 87500e69697d..647f64492bd7 100644 --- a/src/data/weather.ts +++ b/src/data/weather.ts @@ -1,5 +1,5 @@ import { Biome } from "./enums/biome"; -import { getPokemonMessage, getPokemonPrefix } from "../messages"; +import { getPokemonMessage, getPokemonAffix } from "../messages"; import Pokemon from "../field/pokemon"; import { Type } from "./type"; import Move, { AttackMove } from "./move"; @@ -180,9 +180,9 @@ export function getWeatherLapseMessage(weatherType: WeatherType): string { export function getWeatherDamageMessage(weatherType: WeatherType, pokemon: Pokemon): string { switch (weatherType) { case WeatherType.SANDSTORM: - return i18next.t("weather:sandstormDamageMessage", {pokemonPrefix: getPokemonPrefix(pokemon), pokemonName: pokemon.name}); + return i18next.t("weather:sandstormDamageMessage", {pokemonPrefix: getPokemonAffix(pokemon), pokemonName: pokemon.name}); case WeatherType.HAIL: - return i18next.t("weather:hailDamageMessage", {pokemonPrefix: getPokemonPrefix(pokemon), pokemonName: pokemon.name}); + return i18next.t("weather:hailDamageMessage", {pokemonPrefix: getPokemonAffix(pokemon), pokemonName: pokemon.name}); } return null; diff --git a/src/locales/de/battle.ts b/src/locales/de/battle.ts index d3eb3a32efc6..268f7d6e4344 100644 --- a/src/locales/de/battle.ts +++ b/src/locales/de/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "notDisabled": "{{pokemonName}}'s {{moveName}} ist\nnicht mehr deaktiviert!", "eggHatching": "Oh?", "ivScannerUseQuestion": "IV-Scanner auf {{pokemonName}} benutzen?", - "wildPokemonPrefix": "Wild", - "foePokemonPrefix": "Foe", + "wildPokemonAffix": "Wild", + "foePokemonAffix": "Foe", "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; diff --git a/src/locales/en/battle.ts b/src/locales/en/battle.ts index fa58a72ffb69..088e2b0ef846 100644 --- a/src/locales/en/battle.ts +++ b/src/locales/en/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "Are you sure you want to skip taking an item?", "eggHatching": "Oh?", "ivScannerUseQuestion": "Use IV Scanner on {{pokemonName}}?", - "wildPokemonPrefix": "Wild", - "foePokemonPrefix": "Foe", + "wildPokemonAffix": "Wild", + "foePokemonAffix": "Foe", "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; diff --git a/src/locales/es/battle.ts b/src/locales/es/battle.ts index 8045882c0015..dc93f73daab3 100644 --- a/src/locales/es/battle.ts +++ b/src/locales/es/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "¿Estás seguro de que no quieres coger un objeto?", "eggHatching": "¿Y esto?", "ivScannerUseQuestion": "¿Quieres usar el Escáner de IVs en {{pokemonName}}?", - "wildPokemonPrefix": "Wild", - "foePokemonPrefix": "Foe", + "wildPokemonAffix": "Wild", + "foePokemonAffix": "Foe", "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; diff --git a/src/locales/fr/battle.ts b/src/locales/fr/battle.ts index 97158cfc68d5..075c60105bef 100644 --- a/src/locales/fr/battle.ts +++ b/src/locales/fr/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "Êtes-vous sûr·e de ne pas vouloir prendre d’objet ?", "eggHatching": "Oh ?", "ivScannerUseQuestion": "Utiliser le Scanner d’IV sur {{pokemonName}} ?", - "wildPokemonPrefix": "Sauvage", - "foePokemonPrefix": "Ennemi", - "useMove": "{{pokemonName}} {{pokemonPrefix}}utilise {{moveName}} !" + "wildPokemonAffix": "Sauvage", + "foePokemonAffix": "Ennemi", + "useMove": "{{pokemonName}} {{pokemonPrefix}}utilise\n {{moveName}} !" } as const; diff --git a/src/locales/it/battle.ts b/src/locales/it/battle.ts index 6d73f228be7d..99d8d644acbf 100644 --- a/src/locales/it/battle.ts +++ b/src/locales/it/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "Sei sicuro di non voler prendere nessun oggetto?", "eggHatching": "Oh!", "ivScannerUseQuestion": "Vuoi usare lo scanner di IV su {{pokemonName}}?", - "wildPokemonPrefix": "Wild", - "foePokemonPrefix": "Foe", + "wildPokemonAffix": "Wild", + "foePokemonAffix": "Foe", "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; diff --git a/src/locales/pt_BR/battle.ts b/src/locales/pt_BR/battle.ts index 983d86fb4afa..e7af18912004 100644 --- a/src/locales/pt_BR/battle.ts +++ b/src/locales/pt_BR/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "Tem certeza de que não quer escolher um item?", "eggHatching": "Opa?", "ivScannerUseQuestion": "Quer usar o Scanner de IVs em {{pokemonName}}?", - "wildPokemonPrefix": "Wild", - "foePokemonPrefix": "Foe", + "wildPokemonAffix": "Wild", + "foePokemonAffix": "Foe", "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; diff --git a/src/locales/zh_CN/battle.ts b/src/locales/zh_CN/battle.ts index 4b9a946dd5ad..cdd730cf95e6 100644 --- a/src/locales/zh_CN/battle.ts +++ b/src/locales/zh_CN/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "你确定要跳过拾取道具吗?", "eggHatching": "咦?", "ivScannerUseQuestion": "对 {{pokemonName}} 使用个体值扫描仪?", - "wildPokemonPrefix": "Wild", - "foePokemonPrefix": "Foe", + "wildPokemonAffix": "Wild", + "foePokemonAffix": "Foe", "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" } as const; diff --git a/src/messages.ts b/src/messages.ts index 8bcff31e298f..eaa0808ec153 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -3,21 +3,21 @@ import Pokemon from "./field/pokemon"; import i18next from "./plugins/i18n"; export function getPokemonMessage(pokemon: Pokemon, content: string): string { - return `${getPokemonPrefix(pokemon)}${pokemon.name}${content}`; + return `${getPokemonAffix(pokemon)}${pokemon.name}${content}`; } -export function getPokemonPrefix(pokemon: Pokemon): string { +export function getPokemonAffix(pokemon: Pokemon): string { let prefix: string; switch (pokemon.scene.currentBattle.battleSpec) { case BattleSpec.DEFAULT: prefix = !pokemon.isPlayer() ? pokemon.hasTrainer() - ? `${i18next.t("battle:foePokemonPrefix")} ` - : `${i18next.t("battle:wildPokemonPrefix")} ` + ? `${i18next.t("battle:foePokemonAffix")} ` + : `${i18next.t("battle:wildPokemonAffix")} ` : ""; break; case BattleSpec.FINAL_BOSS: - prefix = !pokemon.isPlayer() ? `${i18next.t("battle:foePokemonPrefix")} ` : ""; + prefix = !pokemon.isPlayer() ? `${i18next.t("battle:foePokemonAffix")} ` : ""; break; } return prefix; diff --git a/src/phases.ts b/src/phases.ts index e9383f1bf448..7819ee2b5776 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -23,7 +23,7 @@ import { FusePokemonModifierType, ModifierPoolType, ModifierType, ModifierTypeFu import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; import { BattlerTagLapseType, EncoreTag, HideSpriteTag as HiddenTag, ProtectedTag, TrappedTag } from "./data/battler-tags"; import { BattlerTagType } from "./data/enums/battler-tag-type"; -import { getPokemonMessage, getPokemonPrefix } from "./messages"; +import { getPokemonMessage, getPokemonAffix } from "./messages"; import { Starter } from "./ui/starter-select-ui-handler"; import { Gender } from "./data/gender"; import { Weather, WeatherType, getRandomWeatherType, getTerrainBlockMessage, getWeatherDamageMessage, getWeatherLapseMessage } from "./data/weather"; @@ -2262,7 +2262,7 @@ export class TurnEndPhase extends FieldPhase { pokemon.lapseTags(BattlerTagLapseType.TURN_END); if (pokemon.summonData.disabledMove && !--pokemon.summonData.disabledTurns) { - this.scene.pushPhase(new MessagePhase(this.scene, i18next.t("battle:notDisabled", { pokemonName: `${getPokemonPrefix(pokemon)}${pokemon.name}`, moveName: allMoves[pokemon.summonData.disabledMove].name }))); + this.scene.pushPhase(new MessagePhase(this.scene, i18next.t("battle:notDisabled", { pokemonName: `${getPokemonAffix(pokemon)}${pokemon.name}`, moveName: allMoves[pokemon.summonData.disabledMove].name }))); pokemon.summonData.disabledMove = Moves.NONE; } @@ -2618,7 +2618,7 @@ export class MovePhase extends BattlePhase { const lastMove = this.pokemon.getLastXMoves() as TurnMove[]; if (!lastMove.length || lastMove[0].move !== this.move.getMove().id || lastMove[0].result !== MoveResult.OTHER) { this.scene.queueMessage(i18next.t("battle:useMove", { - pokemonPrefix: getPokemonPrefix(this.pokemon), + pokemonPrefix: getPokemonAffix(this.pokemon), pokemonName: this.pokemon.name, moveName: this.move.getName() }), 500); @@ -2631,7 +2631,7 @@ export class MovePhase extends BattlePhase { } this.scene.queueMessage(i18next.t("battle:useMove", { - pokemonPrefix: getPokemonPrefix(this.pokemon), + pokemonPrefix: getPokemonAffix(this.pokemon), pokemonName: this.pokemon.name, moveName: this.move.getName() }), 500); From 44adc71f7aac1f4e55aadb5c2611ecd5deac9861 Mon Sep 17 00:00:00 2001 From: Laeticia PIERRE Date: Mon, 27 May 2024 17:12:20 +0200 Subject: [PATCH 03/13] getPokemonAffix to getPokemonNameWithAffix + remove space + replace --- src/data/ability.ts | 6 +++--- src/data/weather.ts | 6 +++--- src/locales/de/battle.ts | 6 +++--- src/locales/de/weather.ts | 4 ++-- src/locales/en/battle.ts | 6 +++--- src/locales/en/weather.ts | 4 ++-- src/locales/es/battle.ts | 2 +- src/locales/es/weather.ts | 4 ++-- src/locales/fr/battle.ts | 6 +++--- src/locales/fr/weather.ts | 4 ++-- src/locales/it/battle.ts | 6 +++--- src/locales/it/weather.ts | 4 ++-- src/locales/pt_BR/battle.ts | 6 +++--- src/locales/pt_BR/weather.ts | 4 ++-- src/locales/zh_CN/battle.ts | 6 +++--- src/locales/zh_CN/weather.ts | 4 ++-- src/locales/zh_TW/battle.ts | 5 ++++- src/locales/zh_TW/weather.ts | 4 ++-- src/messages.ts | 12 ++++++------ src/phases.ts | 10 ++++------ 20 files changed, 55 insertions(+), 54 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index bc0ceff62368..1fd9945adc70 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3,7 +3,7 @@ import { Type } from "./type"; import * as Utils from "../utils"; import { BattleStat, getBattleStatName } from "./battle-stat"; import { MovePhase, PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "../phases"; -import { getPokemonMessage, getPokemonAffix } from "../messages"; +import { getPokemonMessage, getPokemonNameWithAffix } from "../messages"; import { Weather, WeatherType } from "./weather"; import { BattlerTag } from "./battler-tags"; import { BattlerTagType } from "./enums/battler-tag-type"; @@ -146,7 +146,7 @@ export class BlockRecoilDamageAttr extends AbAttr { } getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]) { - return i18next.t("abilityTriggers:blockRecoilDamage", {pokemonName: `${getPokemonAffix(pokemon)}${pokemon.name}`, abilityName: abilityName}); + return i18next.t("abilityTriggers:blockRecoilDamage", {pokemonName: getPokemonNameWithAffix(pokemon), abilityName: abilityName}); } } @@ -2451,7 +2451,7 @@ export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr { for (const opp of pokemon.getOpponents()) { if (opp.status?.effect === StatusEffect.SLEEP || opp.hasAbility(Abilities.COMATOSE)) { opp.damageAndUpdate(Math.floor(Math.max(1, opp.getMaxHp() / 8)), HitResult.OTHER); - pokemon.scene.queueMessage(i18next.t("abilityTriggers:badDreams", {pokemonName: `${getPokemonAffix(opp)}${opp.name}`})); + pokemon.scene.queueMessage(i18next.t("abilityTriggers:badDreams", {pokemonName: getPokemonNameWithAffix(opp)})); hadEffect = true; } diff --git a/src/data/weather.ts b/src/data/weather.ts index 647f64492bd7..14bb34d7d67e 100644 --- a/src/data/weather.ts +++ b/src/data/weather.ts @@ -1,5 +1,5 @@ import { Biome } from "./enums/biome"; -import { getPokemonMessage, getPokemonAffix } from "../messages"; +import { getPokemonMessage, getPokemonNameWithAffix } from "../messages"; import Pokemon from "../field/pokemon"; import { Type } from "./type"; import Move, { AttackMove } from "./move"; @@ -180,9 +180,9 @@ export function getWeatherLapseMessage(weatherType: WeatherType): string { export function getWeatherDamageMessage(weatherType: WeatherType, pokemon: Pokemon): string { switch (weatherType) { case WeatherType.SANDSTORM: - return i18next.t("weather:sandstormDamageMessage", {pokemonPrefix: getPokemonAffix(pokemon), pokemonName: pokemon.name}); + return i18next.t("weather:sandstormDamageMessage", {pokemonNameWithAffix: getPokemonNameWithAffix(pokemon)}); case WeatherType.HAIL: - return i18next.t("weather:hailDamageMessage", {pokemonPrefix: getPokemonAffix(pokemon), pokemonName: pokemon.name}); + return i18next.t("weather:hailDamageMessage", {pokemonNameWithAffix: getPokemonNameWithAffix(pokemon)}); } return null; diff --git a/src/locales/de/battle.ts b/src/locales/de/battle.ts index 268f7d6e4344..e47e96eb3b00 100644 --- a/src/locales/de/battle.ts +++ b/src/locales/de/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "notDisabled": "{{pokemonName}}'s {{moveName}} ist\nnicht mehr deaktiviert!", "eggHatching": "Oh?", "ivScannerUseQuestion": "IV-Scanner auf {{pokemonName}} benutzen?", - "wildPokemonAffix": "Wild", - "foePokemonAffix": "Foe", - "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" + "wildPokemonWithAffix": "{{pokemonName}} (wild)", + "foePokemonWithAffix": "{{pokemonName}} (Gegner)", + "useMove": "{{pokemonNameWithAffix}} setzt {{moveName}} ein!" } as const; diff --git a/src/locales/de/weather.ts b/src/locales/de/weather.ts index f6a6864bec7d..ab1dde976399 100644 --- a/src/locales/de/weather.ts +++ b/src/locales/de/weather.ts @@ -15,12 +15,12 @@ export const weather: SimpleTranslationEntries = { "sandstormStartMessage": "Ein Sandsturm kommt auf!", "sandstormLapseMessage": "Der Sandsturm tobt.", "sandstormClearMessage": "Der Sandsturm legt sich.", - "sandstormDamageMessage": " Der Sandsturm fügt {{pokemonPrefix}}{{pokemonName}} Schaden zu!", + "sandstormDamageMessage": " Der Sandsturm fügt {{pokemonNameWithAffix}} Schaden zu!", "hailStartMessage": "Es fängt an zu hageln!", "hailLapseMessage": "Der Hagelsturm tobt.", "hailClearMessage": "Der Hagelsturm legt sich.", - "hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} wird von Hagelkörnern getroffen!", + "hailDamageMessage": "{{pokemonNameWithAffix}} wird von Hagelkörnern getroffen!", "snowStartMessage": "Es fängt an zu schneien!", "snowLapseMessage": "Der Schneesturm tobt.", diff --git a/src/locales/en/battle.ts b/src/locales/en/battle.ts index 088e2b0ef846..60724a6a798f 100644 --- a/src/locales/en/battle.ts +++ b/src/locales/en/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "Are you sure you want to skip taking an item?", "eggHatching": "Oh?", "ivScannerUseQuestion": "Use IV Scanner on {{pokemonName}}?", - "wildPokemonAffix": "Wild", - "foePokemonAffix": "Foe", - "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" + "wildPokemonWithAffix": "Wild {{pokemonName}}", + "foePokemonWithAffix": "Foe {{pokemonName}}", + "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!" } as const; diff --git a/src/locales/en/weather.ts b/src/locales/en/weather.ts index 1e4602f362c2..513c2181b008 100644 --- a/src/locales/en/weather.ts +++ b/src/locales/en/weather.ts @@ -15,12 +15,12 @@ export const weather: SimpleTranslationEntries = { "sandstormStartMessage": "A sandstorm brewed!", "sandstormLapseMessage": "The sandstorm rages.", "sandstormClearMessage": "The sandstorm subsided.", - "sandstormDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is buffeted\nby the sandstorm!", + "sandstormDamageMessage": "{{pokemonNameWithAffix}} is buffeted\nby the sandstorm!", "hailStartMessage": "It started to hail!", "hailLapseMessage": "Hail continues to fall.", "hailClearMessage": "The hail stopped.", - "hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is pelted\nby the hail!", + "hailDamageMessage": "{{pokemonNameWithAffix}} is pelted\nby the hail!", "snowStartMessage": "It started to snow!", "snowLapseMessage": "The snow is falling down.", diff --git a/src/locales/es/battle.ts b/src/locales/es/battle.ts index dc93f73daab3..9a90f7f5c7f8 100644 --- a/src/locales/es/battle.ts +++ b/src/locales/es/battle.ts @@ -58,5 +58,5 @@ export const battle: SimpleTranslationEntries = { "ivScannerUseQuestion": "¿Quieres usar el Escáner de IVs en {{pokemonName}}?", "wildPokemonAffix": "Wild", "foePokemonAffix": "Foe", - "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" + "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!" } as const; diff --git a/src/locales/es/weather.ts b/src/locales/es/weather.ts index 1e4602f362c2..513c2181b008 100644 --- a/src/locales/es/weather.ts +++ b/src/locales/es/weather.ts @@ -15,12 +15,12 @@ export const weather: SimpleTranslationEntries = { "sandstormStartMessage": "A sandstorm brewed!", "sandstormLapseMessage": "The sandstorm rages.", "sandstormClearMessage": "The sandstorm subsided.", - "sandstormDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is buffeted\nby the sandstorm!", + "sandstormDamageMessage": "{{pokemonNameWithAffix}} is buffeted\nby the sandstorm!", "hailStartMessage": "It started to hail!", "hailLapseMessage": "Hail continues to fall.", "hailClearMessage": "The hail stopped.", - "hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is pelted\nby the hail!", + "hailDamageMessage": "{{pokemonNameWithAffix}} is pelted\nby the hail!", "snowStartMessage": "It started to snow!", "snowLapseMessage": "The snow is falling down.", diff --git a/src/locales/fr/battle.ts b/src/locales/fr/battle.ts index 075c60105bef..36fa7c8995b5 100644 --- a/src/locales/fr/battle.ts +++ b/src/locales/fr/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "Êtes-vous sûr·e de ne pas vouloir prendre d’objet ?", "eggHatching": "Oh ?", "ivScannerUseQuestion": "Utiliser le Scanner d’IV sur {{pokemonName}} ?", - "wildPokemonAffix": "Sauvage", - "foePokemonAffix": "Ennemi", - "useMove": "{{pokemonName}} {{pokemonPrefix}}utilise\n {{moveName}} !" + "wildPokemonWithAffix": "{{pokemonName}} sauvage", + "foePokemonWithAffix": "{{pokemonName}} ennemi", + "useMove": "{{pokemonNameWithAffix}} utilise\n{{moveName}} !" } as const; diff --git a/src/locales/fr/weather.ts b/src/locales/fr/weather.ts index 76d56887578c..5c483d71b44f 100644 --- a/src/locales/fr/weather.ts +++ b/src/locales/fr/weather.ts @@ -15,12 +15,12 @@ export const weather: SimpleTranslationEntries = { "sandstormStartMessage": "Une tempête de sable se prépare !", "sandstormLapseMessage": "La tempête de sable fait rage !", "sandstormClearMessage": "La tempête de sable se calme !", - "sandstormDamageMessage": "La tempête de sable inflige des dégâts\nà {{pokemonPrefix}}{{pokemonName}} !", + "sandstormDamageMessage": "La tempête de sable inflige des dégâts\nà {{pokemonNameWithAffix}} !", "hailStartMessage": "Il commence à grêler !", "hailLapseMessage": "La grêle continue de tomber !", "hailClearMessage": "La grêle s’est arrêtée !", - "hailDamageMessage": "La grêle inflige des dégâts\nà {{pokemonPrefix}}{{pokemonName}} !", + "hailDamageMessage": "La grêle inflige des dégâts\nà {{pokemonNameWithAffix}} !", "snowStartMessage": "Il commence à neiger !", "snowLapseMessage": "Il y a une tempête de neige !", diff --git a/src/locales/it/battle.ts b/src/locales/it/battle.ts index 99d8d644acbf..361a17188b42 100644 --- a/src/locales/it/battle.ts +++ b/src/locales/it/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "Sei sicuro di non voler prendere nessun oggetto?", "eggHatching": "Oh!", "ivScannerUseQuestion": "Vuoi usare lo scanner di IV su {{pokemonName}}?", - "wildPokemonAffix": "Wild", - "foePokemonAffix": "Foe", - "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" + "wildPokemonWithAffix": "Wild {{pokemonName}}", + "foePokemonWithAffix": "Foe {{pokemonName}}", + "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!" } as const; diff --git a/src/locales/it/weather.ts b/src/locales/it/weather.ts index 3895fcebc465..ed5d41a80afb 100644 --- a/src/locales/it/weather.ts +++ b/src/locales/it/weather.ts @@ -15,12 +15,12 @@ export const weather: SimpleTranslationEntries = { "sandstormStartMessage": "Si è scatenata una tempesta di sabbia!", "sandstormLapseMessage": "La tempesta di sabbia infuria.", "sandstormClearMessage": "La tempesta di sabbia si è placata.", - "sandstormDamageMessage": "{{pokemonPrefix}}{{pokemonName}} è stato colpito\ndalla tempesta di sabbia!", + "sandstormDamageMessage": "{{pokemonNameWithAffix}} è stato colpito\ndalla tempesta di sabbia!", "hailStartMessage": "Ha iniziato a grandinare!", "hailLapseMessage": "La grandine continua a cadere.", "hailClearMessage": "Ha smesso di grandinare.", - "hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} è stato colpito\ndalla grandine!", + "hailDamageMessage": "{{pokemonNameWithAffix}} è stato colpito\ndalla grandine!", "snowStartMessage": "Ha iniziato a nevicare!", "snowLapseMessage": "La neve sta continuando a cadere.", diff --git a/src/locales/pt_BR/battle.ts b/src/locales/pt_BR/battle.ts index e7af18912004..2e7bb4df0e1d 100644 --- a/src/locales/pt_BR/battle.ts +++ b/src/locales/pt_BR/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "Tem certeza de que não quer escolher um item?", "eggHatching": "Opa?", "ivScannerUseQuestion": "Quer usar o Scanner de IVs em {{pokemonName}}?", - "wildPokemonAffix": "Wild", - "foePokemonAffix": "Foe", - "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" + "wildPokemonWithAffix": "Wild {{pokemonName}}", + "foePokemonWithAffix": "Foe {{pokemonName}}", + "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!" } as const; diff --git a/src/locales/pt_BR/weather.ts b/src/locales/pt_BR/weather.ts index 269ba0e3726a..07854512fdcf 100644 --- a/src/locales/pt_BR/weather.ts +++ b/src/locales/pt_BR/weather.ts @@ -15,12 +15,12 @@ export const weather: SimpleTranslationEntries = { "sandstormStartMessage": "Uma tempestade de areia se formou!", "sandstormLapseMessage": "A tempestade de areia é violenta.", "sandstormClearMessage": "A tempestade de areia diminuiu.", - "sandstormDamageMessage": "{{pokemonPrefix}}{{pokemonName}} é atingido\npela tempestade de areia!", + "sandstormDamageMessage": "{{pokemonNameWithAffix}} é atingido\npela tempestade de areia!", "hailStartMessage": "Começou a chover granizo!", "hailLapseMessage": "Granizo cai do céu.", "hailClearMessage": "O granizo parou.", - "hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} é atingido\npelo granizo!", + "hailDamageMessage": "{{pokemonNameWithAffix}} é atingido\npelo granizo!", "snowStartMessage": "Começou a nevar!", "snowLapseMessage": "A neve continua caindo.", diff --git a/src/locales/zh_CN/battle.ts b/src/locales/zh_CN/battle.ts index cdd730cf95e6..706ba718578e 100644 --- a/src/locales/zh_CN/battle.ts +++ b/src/locales/zh_CN/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "你确定要跳过拾取道具吗?", "eggHatching": "咦?", "ivScannerUseQuestion": "对 {{pokemonName}} 使用个体值扫描仪?", - "wildPokemonAffix": "Wild", - "foePokemonAffix": "Foe", - "useMove": "{{pokemonPrefix}}{{pokemonName}} used {{moveName}}!" + "wildPokemonWithAffix": "Wild {{pokemonName}}", + "foePokemonWithAffix": "Foe {{pokemonName}}", + "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!" } as const; diff --git a/src/locales/zh_CN/weather.ts b/src/locales/zh_CN/weather.ts index 2049b8a429cc..874b17f8fe8b 100644 --- a/src/locales/zh_CN/weather.ts +++ b/src/locales/zh_CN/weather.ts @@ -15,12 +15,12 @@ export const weather: SimpleTranslationEntries = { "sandstormStartMessage": "开始刮沙暴了!", "sandstormLapseMessage": "沙暴肆虐。", "sandstormClearMessage": "沙暴停止了!", - "sandstormDamageMessage": "沙暴袭击了{{pokemonPrefix}}{{pokemonName}}!", + "sandstormDamageMessage": "沙暴袭击了{{pokemonNameWithAffix}}!", "hailStartMessage": "开始下冰雹了!", "hailLapseMessage": "冰雹继续肆虐。", "hailClearMessage": "冰雹不再下了。", - "hailDamageMessage": "冰雹袭击了{{pokemonPrefix}}{{pokemonName}}!", + "hailDamageMessage": "冰雹袭击了{{pokemonNameWithAffix}}!", "snowStartMessage": "开始下雪了!", "snowLapseMessage": "雪继续下。", diff --git a/src/locales/zh_TW/battle.ts b/src/locales/zh_TW/battle.ts index c1fd9155daef..55244ac391ca 100644 --- a/src/locales/zh_TW/battle.ts +++ b/src/locales/zh_TW/battle.ts @@ -52,5 +52,8 @@ export const battle: SimpleTranslationEntries = { "notDisabled": "{{moveName}} 不再被禁用!", "skipItemQuestion": "你要跳過拾取道具嗎?", "eggHatching": "咦?", - "ivScannerUseQuestion": "對 {{pokemonName}} 使用個體值掃描?" + "ivScannerUseQuestion": "對 {{pokemonName}} 使用個體值掃描?", + "wildPokemonWithAffix": "Wild {{pokemonName}}", + "foePokemonWithAffix": "Foe {{pokemonName}}", + "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!" } as const; diff --git a/src/locales/zh_TW/weather.ts b/src/locales/zh_TW/weather.ts index 0a235b3b10c5..03f3425aa43d 100644 --- a/src/locales/zh_TW/weather.ts +++ b/src/locales/zh_TW/weather.ts @@ -15,12 +15,12 @@ export const weather: SimpleTranslationEntries = { "sandstormStartMessage": "開始刮沙暴了!", "sandstormLapseMessage": "沙暴肆虐。", "sandstormClearMessage": "沙暴停止了。", - "sandstormDamageMessage": "沙暴襲擊了{{pokemonPrefix}}{{pokemonName}}!", + "sandstormDamageMessage": "沙暴襲擊了{{pokemonNameWithAffix}}!", "hailStartMessage": "開始下冰雹了!", "hailLapseMessage": "冰雹繼續肆虐。", "hailClearMessage": "冰雹不再下了。", - "hailDamageMessage": "冰雹襲擊了{{pokemonPrefix}}{{pokemonName}}!", + "hailDamageMessage": "冰雹襲擊了{{pokemonNameWithAffix}}!", "snowStartMessage": "開始下雪了!", "snowLapseMessage": "雪繼續下。", diff --git a/src/messages.ts b/src/messages.ts index eaa0808ec153..59c3075f3e41 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -3,21 +3,21 @@ import Pokemon from "./field/pokemon"; import i18next from "./plugins/i18n"; export function getPokemonMessage(pokemon: Pokemon, content: string): string { - return `${getPokemonAffix(pokemon)}${pokemon.name}${content}`; + return `${getPokemonNameWithAffix(pokemon)} ${content}`; } -export function getPokemonAffix(pokemon: Pokemon): string { +export function getPokemonNameWithAffix(pokemon: Pokemon): string { let prefix: string; switch (pokemon.scene.currentBattle.battleSpec) { case BattleSpec.DEFAULT: prefix = !pokemon.isPlayer() ? pokemon.hasTrainer() - ? `${i18next.t("battle:foePokemonAffix")} ` - : `${i18next.t("battle:wildPokemonAffix")} ` - : ""; + ? i18next.t("battle:foePokemonWithAffix", { pokemonName: pokemon.name }) + : i18next.t("battle:wildPokemonWithAffix", { pokemonName: pokemon.name }) + : pokemon.name; break; case BattleSpec.FINAL_BOSS: - prefix = !pokemon.isPlayer() ? `${i18next.t("battle:foePokemonAffix")} ` : ""; + prefix = !pokemon.isPlayer() ? i18next.t("battle:foePokemonWithAffix", { pokemonName: pokemon.name }) : pokemon.name; break; } return prefix; diff --git a/src/phases.ts b/src/phases.ts index 7819ee2b5776..aadd5e27cf4b 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -23,7 +23,7 @@ import { FusePokemonModifierType, ModifierPoolType, ModifierType, ModifierTypeFu import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; import { BattlerTagLapseType, EncoreTag, HideSpriteTag as HiddenTag, ProtectedTag, TrappedTag } from "./data/battler-tags"; import { BattlerTagType } from "./data/enums/battler-tag-type"; -import { getPokemonMessage, getPokemonAffix } from "./messages"; +import { getPokemonMessage, getPokemonNameWithAffix } from "./messages"; import { Starter } from "./ui/starter-select-ui-handler"; import { Gender } from "./data/gender"; import { Weather, WeatherType, getRandomWeatherType, getTerrainBlockMessage, getWeatherDamageMessage, getWeatherLapseMessage } from "./data/weather"; @@ -2262,7 +2262,7 @@ export class TurnEndPhase extends FieldPhase { pokemon.lapseTags(BattlerTagLapseType.TURN_END); if (pokemon.summonData.disabledMove && !--pokemon.summonData.disabledTurns) { - this.scene.pushPhase(new MessagePhase(this.scene, i18next.t("battle:notDisabled", { pokemonName: `${getPokemonAffix(pokemon)}${pokemon.name}`, moveName: allMoves[pokemon.summonData.disabledMove].name }))); + this.scene.pushPhase(new MessagePhase(this.scene, i18next.t("battle:notDisabled", { pokemonName: getPokemonNameWithAffix(pokemon), moveName: allMoves[pokemon.summonData.disabledMove].name }))); pokemon.summonData.disabledMove = Moves.NONE; } @@ -2618,8 +2618,7 @@ export class MovePhase extends BattlePhase { const lastMove = this.pokemon.getLastXMoves() as TurnMove[]; if (!lastMove.length || lastMove[0].move !== this.move.getMove().id || lastMove[0].result !== MoveResult.OTHER) { this.scene.queueMessage(i18next.t("battle:useMove", { - pokemonPrefix: getPokemonAffix(this.pokemon), - pokemonName: this.pokemon.name, + pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), moveName: this.move.getName() }), 500); return; @@ -2631,8 +2630,7 @@ export class MovePhase extends BattlePhase { } this.scene.queueMessage(i18next.t("battle:useMove", { - pokemonPrefix: getPokemonAffix(this.pokemon), - pokemonName: this.pokemon.name, + pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), moveName: this.move.getName() }), 500); applyMoveAttrs(PreMoveMessageAttr, this.pokemon, this.pokemon.getOpponents().find(() => true), this.move.getMove()); From 8dd4e0b121c6acd7b5d05bfa471ea2f2f30ff366 Mon Sep 17 00:00:00 2001 From: Laeticia PIERRE Date: Tue, 28 May 2024 09:34:08 +0200 Subject: [PATCH 04/13] Better getPokemonNameWithAffix switch --- src/messages.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/messages.ts b/src/messages.ts index 59c3075f3e41..bc75c46af3bd 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -7,18 +7,22 @@ export function getPokemonMessage(pokemon: Pokemon, content: string): string { } export function getPokemonNameWithAffix(pokemon: Pokemon): string { - let prefix: string; switch (pokemon.scene.currentBattle.battleSpec) { case BattleSpec.DEFAULT: - prefix = !pokemon.isPlayer() + return !pokemon.isPlayer() ? pokemon.hasTrainer() - ? i18next.t("battle:foePokemonWithAffix", { pokemonName: pokemon.name }) - : i18next.t("battle:wildPokemonWithAffix", { pokemonName: pokemon.name }) + ? i18next.t("battle:foePokemonWithAffix", { + pokemonName: pokemon.name, + }) + : i18next.t("battle:wildPokemonWithAffix", { + pokemonName: pokemon.name, + }) : pokemon.name; - break; case BattleSpec.FINAL_BOSS: - prefix = !pokemon.isPlayer() ? i18next.t("battle:foePokemonWithAffix", { pokemonName: pokemon.name }) : pokemon.name; - break; + return !pokemon.isPlayer() + ? i18next.t("battle:foePokemonWithAffix", { pokemonName: pokemon.name }) + : pokemon.name; + default: + pokemon.name; } - return prefix; } From b17fc397e8c34f48d8e90c53d486184948670eb2 Mon Sep 17 00:00:00 2001 From: Laeticia PIERRE Date: Fri, 31 May 2024 14:39:02 +0200 Subject: [PATCH 05/13] Ko locale + fix es locale --- src/locales/es/battle.ts | 4 ++-- src/locales/ko/battle.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/locales/es/battle.ts b/src/locales/es/battle.ts index 64a748a3f1c5..3566c7718012 100644 --- a/src/locales/es/battle.ts +++ b/src/locales/es/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "¿Estás seguro de que no quieres coger un objeto?", "eggHatching": "¿Y esto?", "ivScannerUseQuestion": "¿Quieres usar el Escáner de IVs en {{pokemonName}}?", - "wildPokemonAffix": "Wild", - "foePokemonAffix": "Foe", + "wildPokemonWithAffix": "Wild {{pokemonName}}", + "foePokemonWithAffix": "Foe {{pokemonName}}", "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!" } as const; diff --git a/src/locales/ko/battle.ts b/src/locales/ko/battle.ts index 589ab51580e1..e78f8d0604ed 100644 --- a/src/locales/ko/battle.ts +++ b/src/locales/ko/battle.ts @@ -55,5 +55,8 @@ export const battle: SimpleTranslationEntries = { "notDisabled": "{{pokemonName}}의\n{{moveName}} 사슬묶기가 풀렸다!", "skipItemQuestion": "아이템을 받지 않고 넘어가시겠습니까?", "eggHatching": "어라…?", - "ivScannerUseQuestion": "{{pokemonName}}에게 개체값탐지기를 사용하시겠습니까?" + "ivScannerUseQuestion": "{{pokemonName}}에게 개체값탐지기를 사용하시겠습니까?", + "wildPokemonWithAffix": "Wild {{pokemonName}}", + "foePokemonWithAffix": "Foe {{pokemonName}}", + "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!" } as const; From 03a7888c7ae583c3b11852881ccfa6281a39b37e Mon Sep 17 00:00:00 2001 From: Laeticia PIERRE Date: Fri, 31 May 2024 15:16:28 +0200 Subject: [PATCH 06/13] Doc getPokemonNameWithAffix + getPokemonMessage + fix --- src/messages.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/messages.ts b/src/messages.ts index bc75c46af3bd..e23870945029 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -2,10 +2,22 @@ import { BattleSpec } from "./enums/battle-spec"; import Pokemon from "./field/pokemon"; import i18next from "./plugins/i18n"; +/** + * Builds a message by concatenating the Pokemon name with its potential affix and the given text + * @param pokemon {@linkcode Pokemon} name and battle context will be retrieved from this instance for {@linkcode getPokemonNameWithAffix} + * @param {string} content any text + * @returns {string} ex: "Wild Gengar fainted!", "Ectoplasma sauvage est K.O!" + * @see {@linkcode getPokemonNameWithAffix} for the Pokemon's name and potentiel affix + */ export function getPokemonMessage(pokemon: Pokemon, content: string): string { - return `${getPokemonNameWithAffix(pokemon)} ${content}`; + return `${getPokemonNameWithAffix(pokemon)}${content}`; } +/** + * Retrieves the Pokemon's name, potentially with an affix indicating its role (wild or foe) in the current battle context, translated + * @param pokemon {@linkcode Pokemon} name and battle context will be retrieved from this instance + * @returns {string} ex: "Wild Gengar", "Ectoplasma sauvage" + */ export function getPokemonNameWithAffix(pokemon: Pokemon): string { switch (pokemon.scene.currentBattle.battleSpec) { case BattleSpec.DEFAULT: @@ -23,6 +35,6 @@ export function getPokemonNameWithAffix(pokemon: Pokemon): string { ? i18next.t("battle:foePokemonWithAffix", { pokemonName: pokemon.name }) : pokemon.name; default: - pokemon.name; + return pokemon.name; } } From 08796065f5d882bbd3d12a2fa2a8859af612abaa Mon Sep 17 00:00:00 2001 From: Laeticia PIERRE Date: Fri, 31 May 2024 15:51:50 +0200 Subject: [PATCH 07/13] Ko translate / missing weather changes --- src/locales/ko/battle.ts | 6 +++--- src/locales/ko/weather.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/locales/ko/battle.ts b/src/locales/ko/battle.ts index e78f8d0604ed..04d6f075be8a 100644 --- a/src/locales/ko/battle.ts +++ b/src/locales/ko/battle.ts @@ -56,7 +56,7 @@ export const battle: SimpleTranslationEntries = { "skipItemQuestion": "아이템을 받지 않고 넘어가시겠습니까?", "eggHatching": "어라…?", "ivScannerUseQuestion": "{{pokemonName}}에게 개체값탐지기를 사용하시겠습니까?", - "wildPokemonWithAffix": "Wild {{pokemonName}}", - "foePokemonWithAffix": "Foe {{pokemonName}}", - "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!" + "wildPokemonWithAffix": "야생 {{pokemonName}}", + "foePokemonWithAffix": "상대 {{pokemonName}}", + "useMove": "{{pokemonNameWithAffix}}의 {{moveName}}!" } as const; diff --git a/src/locales/ko/weather.ts b/src/locales/ko/weather.ts index 6bfc6552b505..152921bf74af 100644 --- a/src/locales/ko/weather.ts +++ b/src/locales/ko/weather.ts @@ -15,12 +15,12 @@ export const weather: SimpleTranslationEntries = { "sandstormStartMessage": "모래바람이 불기 시작했다!", "sandstormLapseMessage": "모래바람이 세차게 분다", "sandstormClearMessage": "모래바람이 가라앉았다!", - "sandstormDamageMessage": "모래바람이\n{{pokemonPrefix}}{{pokemonName}}를(을) 덮쳤다!", + "sandstormDamageMessage": "모래바람이\n{{pokemonNameWithAffix}}를(을) 덮쳤다!", "hailStartMessage": "싸라기눈이 내리기 시작했다!", "hailLapseMessage": "싸라기눈이 계속 내리고 있다", "hailClearMessage": "싸라기눈이 그쳤다!", - "hailDamageMessage": "싸라기눈이\n{{pokemonPrefix}}{{pokemonName}}를(을) 덮쳤다!", + "hailDamageMessage": "싸라기눈이\n{{pokemonNameWithAffix}}를(을) 덮쳤다!", "snowStartMessage": "눈이 내리기 시작했다!", "snowLapseMessage": "눈이 계속 내리고 있다", From 76fe685b7fd8eb93af8f73a6122fbed4797c1274 Mon Sep 17 00:00:00 2001 From: Laeticia PIERRE Date: Sat, 1 Jun 2024 23:38:59 +0200 Subject: [PATCH 08/13] Fix conflicts getPokemonPrefix --- src/data/ability.ts | 2 +- src/data/battler-tags.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 4ebdd43fdbc8..a0416185b01c 100755 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -878,7 +878,7 @@ export class PostDefendPerishSongAbAttr extends PostDefendAbAttr { } getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string { - return i18next.t("abilityTriggers:perishBody", {pokemonName: `${getPokemonPrefix(pokemon)}${pokemon.name}`, abilityName: abilityName}); + return i18next.t("abilityTriggers:perishBody", {pokemonName: getPokemonNameWithAffix(pokemon), abilityName: abilityName}); } } diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 4e21d2210ce1..0a86b885a482 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1,6 +1,6 @@ import { CommonAnim, CommonBattleAnim } from "./battle-anims"; import { CommonAnimPhase, MoveEffectPhase, MovePhase, PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "../phases"; -import { getPokemonMessage } from "../messages"; +import { getPokemonMessage, getPokemonNameWithAffix } from "../messages"; import Pokemon, { MoveResult, HitResult } from "../field/pokemon"; import { Stat, getStatName } from "./pokemon-stat"; import { StatusEffect } from "./status-effect"; @@ -799,7 +799,7 @@ export class ThunderCageTag extends DamagingTrapTag { } getTrapMessage(pokemon: Pokemon): string { - return getPokemonMessage(pokemon.scene.getPokemonById(this.sourceId), ` trapped\n${getPokemonPrefix(pokemon).toLowerCase()}${pokemon.name}!`); + return getPokemonMessage(pokemon.scene.getPokemonById(this.sourceId), ` trapped\n${getPokemonNameWithAffix(pokemon)}!`); } } @@ -809,7 +809,7 @@ export class InfestationTag extends DamagingTrapTag { } getTrapMessage(pokemon: Pokemon): string { - return getPokemonMessage(pokemon, ` has been afflicted \nwith an infestation by ${getPokemonPrefix(pokemon.scene.getPokemonById(this.sourceId))}${pokemon.scene.getPokemonById(this.sourceId).name}!`); + return getPokemonMessage(pokemon, ` has been afflicted \nwith an infestation by ${getPokemonNameWithAffix(pokemon.scene.getPokemonById(this.sourceId))}!`); } } From 2d2807f8b0b835f806b77c28bd611c140839399c Mon Sep 17 00:00:00 2001 From: Ohmry Date: Sun, 2 Jun 2024 07:26:29 +0900 Subject: [PATCH 09/13] [Localization] Add localization of pokemon painted (Addition of #1276) --- src/locales/de/battle.ts | 3 ++- src/locales/en/battle.ts | 3 ++- src/locales/es/battle.ts | 3 ++- src/locales/fr/battle.ts | 3 ++- src/locales/it/battle.ts | 3 ++- src/locales/ko/battle.ts | 3 ++- src/locales/pt_BR/battle.ts | 3 ++- src/locales/zh_CN/battle.ts | 3 ++- src/locales/zh_TW/battle.ts | 3 ++- src/phases.ts | 5 +++-- 10 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/locales/de/battle.ts b/src/locales/de/battle.ts index d588fb327c6b..7b09a4d454a5 100644 --- a/src/locales/de/battle.ts +++ b/src/locales/de/battle.ts @@ -60,5 +60,6 @@ export const battle: SimpleTranslationEntries = { "foePokemonWithAffix": "{{pokemonName}} (Gegner)", "useMove": "{{pokemonNameWithAffix}} setzt {{moveName}} ein!", "drainMessage": "{{pokemonName}} wurde Energie abgesaugt", - "regainHealth": "KP von {{pokemonName}} wurden wieder aufgefrischt!" + "regainHealth": "KP von {{pokemonName}} wurden wieder aufgefrischt!", + "fainted": "{{pokemonNameWithAffix}} fainted!" } as const; diff --git a/src/locales/en/battle.ts b/src/locales/en/battle.ts index 083de0899616..52b64b8b6146 100644 --- a/src/locales/en/battle.ts +++ b/src/locales/en/battle.ts @@ -60,5 +60,6 @@ export const battle: SimpleTranslationEntries = { "foePokemonWithAffix": "Foe {{pokemonName}}", "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!", "drainMessage": "{{pokemonName}} had its\nenergy drained!", - "regainHealth": "{{pokemonName}} regained\nhealth!" + "regainHealth": "{{pokemonName}} regained\nhealth!", + "fainted": "{{pokemonNameWithAffix}} fainted!" } as const; diff --git a/src/locales/es/battle.ts b/src/locales/es/battle.ts index c4d79cfdb937..771d372718ef 100644 --- a/src/locales/es/battle.ts +++ b/src/locales/es/battle.ts @@ -60,5 +60,6 @@ export const battle: SimpleTranslationEntries = { "foePokemonWithAffix": "Foe {{pokemonName}}", "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!", "drainMessage": "{{pokemonName}} had its\nenergy drained!", - "regainHealth": "{{pokemonName}} regained\nhealth!" + "regainHealth": "{{pokemonName}} regained\nhealth!", + "fainted": "{{pokemonNameWithAffix}} fainted!" } as const; diff --git a/src/locales/fr/battle.ts b/src/locales/fr/battle.ts index 181b85f7cc8f..1593bd3b21f7 100644 --- a/src/locales/fr/battle.ts +++ b/src/locales/fr/battle.ts @@ -60,5 +60,6 @@ export const battle: SimpleTranslationEntries = { "foePokemonWithAffix": "{{pokemonName}} ennemi", "useMove": "{{pokemonNameWithAffix}} utilise\n{{moveName}} !", "drainMessage": "{{pokemonName}} had its\nenergy drained!", - "regainHealth": "{{pokemonName}} regained\nhealth!" + "regainHealth": "{{pokemonName}} regained\nhealth!", + "fainted": "{{pokemonNameWithAffix}} fainted!" } as const; diff --git a/src/locales/it/battle.ts b/src/locales/it/battle.ts index 3ea527339f0a..7ef606e11cc7 100644 --- a/src/locales/it/battle.ts +++ b/src/locales/it/battle.ts @@ -60,5 +60,6 @@ export const battle: SimpleTranslationEntries = { "foePokemonWithAffix": "Foe {{pokemonName}}", "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!", "drainMessage": "{{pokemonName}} had its\nenergy drained!", - "regainHealth": "{{pokemonName}} regained\nhealth!" + "regainHealth": "{{pokemonName}} regained\nhealth!", + "fainted": "{{pokemonNameWithAffix}} fainted!" } as const; diff --git a/src/locales/ko/battle.ts b/src/locales/ko/battle.ts index bc232a2b6da0..b8db81094623 100644 --- a/src/locales/ko/battle.ts +++ b/src/locales/ko/battle.ts @@ -58,5 +58,6 @@ export const battle: SimpleTranslationEntries = { "ivScannerUseQuestion": "{{pokemonName}}에게 개체값탐지기를 사용하시겠습니까?", "wildPokemonWithAffix": "야생 {{pokemonName}}", "foePokemonWithAffix": "상대 {{pokemonName}}", - "useMove": "{{pokemonNameWithAffix}}의 {{moveName}}!" + "useMove": "{{pokemonNameWithAffix}}의 {{moveName}}!", + "fainted": "{{pokemonNameWithAffix}}은(는) 쓰러졌다!" } as const; diff --git a/src/locales/pt_BR/battle.ts b/src/locales/pt_BR/battle.ts index 7d47182edd69..8c2b391a62c2 100644 --- a/src/locales/pt_BR/battle.ts +++ b/src/locales/pt_BR/battle.ts @@ -60,5 +60,6 @@ export const battle: SimpleTranslationEntries = { "foePokemonWithAffix": "Foe {{pokemonName}}", "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!", "drainMessage": "{{pokemonName}} had its\nenergy drained!", - "regainHealth": "{{pokemonName}} regained\nhealth!" + "regainHealth": "{{pokemonName}} regained\nhealth!", + "fainted": "{{pokemonNameWithAffix}} fainted!" } as const; diff --git a/src/locales/zh_CN/battle.ts b/src/locales/zh_CN/battle.ts index 0fdb962c6798..3b7451f5cde3 100644 --- a/src/locales/zh_CN/battle.ts +++ b/src/locales/zh_CN/battle.ts @@ -60,5 +60,6 @@ export const battle: SimpleTranslationEntries = { "foePokemonWithAffix": "Foe {{pokemonName}}", "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!", "drainMessage": "{{pokemonName}} had its\nenergy drained!", - "regainHealth": "{{pokemonName}} regained\nhealth!" + "regainHealth": "{{pokemonName}} regained\nhealth!", + "fainted": "{{pokemonNameWithAffix}} fainted!" } as const; diff --git a/src/locales/zh_TW/battle.ts b/src/locales/zh_TW/battle.ts index 4255aeaef99e..d2533be6139b 100644 --- a/src/locales/zh_TW/battle.ts +++ b/src/locales/zh_TW/battle.ts @@ -57,5 +57,6 @@ export const battle: SimpleTranslationEntries = { "foePokemonWithAffix": "Foe {{pokemonName}}", "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!", "drainMessage": "{{pokemonName}} had its\nenergy drained!", - "regainHealth": "{{pokemonName}} regained\nhealth!" + "regainHealth": "{{pokemonName}} regained\nhealth!", + "fainted": "{{pokemonNameWithAffix}} fainted!" } as const; diff --git a/src/phases.ts b/src/phases.ts index 25018fc0bafc..cc8d4288664e 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -3525,8 +3525,9 @@ export class FaintPhase extends PokemonPhase { } else { this.scene.currentBattle.enemyFaints += 1; } - - this.scene.queueMessage(getPokemonMessage(pokemon, " fainted!"), null, true); + this.scene.queueMessage(i18next.t("battle:fainted", { + pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) + }), null, true); if (pokemon.turnData?.attacksReceived?.length) { const lastAttack = pokemon.turnData.attacksReceived[0]; From 25135a0eeac811211ca23d14e976d055326b5ca1 Mon Sep 17 00:00:00 2001 From: Ohmry Date: Sun, 2 Jun 2024 07:44:54 +0900 Subject: [PATCH 10/13] [Localization] Add deutsch localization for situation of pokemon fainted --- src/locales/de/battle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/de/battle.ts b/src/locales/de/battle.ts index 7b09a4d454a5..4f88cbddb629 100644 --- a/src/locales/de/battle.ts +++ b/src/locales/de/battle.ts @@ -61,5 +61,5 @@ export const battle: SimpleTranslationEntries = { "useMove": "{{pokemonNameWithAffix}} setzt {{moveName}} ein!", "drainMessage": "{{pokemonName}} wurde Energie abgesaugt", "regainHealth": "KP von {{pokemonName}} wurden wieder aufgefrischt!", - "fainted": "{{pokemonNameWithAffix}} fainted!" + "fainted": "{{pokemonNameWithAffix}} kampfunfähig!" } as const; From 7ebdf90222299b719c0b478997e35d445ad2e03d Mon Sep 17 00:00:00 2001 From: Ohmry Date: Mon, 3 Jun 2024 06:55:58 +0900 Subject: [PATCH 11/13] [Localization] Modify Deutsch localization when pokemon is fainted --- src/locales/de/battle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/de/battle.ts b/src/locales/de/battle.ts index 4f88cbddb629..811f117736d2 100644 --- a/src/locales/de/battle.ts +++ b/src/locales/de/battle.ts @@ -61,5 +61,5 @@ export const battle: SimpleTranslationEntries = { "useMove": "{{pokemonNameWithAffix}} setzt {{moveName}} ein!", "drainMessage": "{{pokemonName}} wurde Energie abgesaugt", "regainHealth": "KP von {{pokemonName}} wurden wieder aufgefrischt!", - "fainted": "{{pokemonNameWithAffix}} kampfunfähig!" + "fainted": "{{pokemonNameWithAffix}} wurde besiegt." } as const; From 9e5f4d5ce6364fb2b3e3e88cbecf40227f65b097 Mon Sep 17 00:00:00 2001 From: Ohmry Date: Thu, 6 Jun 2024 23:06:35 +0900 Subject: [PATCH 12/13] Reflect lint results in code --- src/locales/ko/battle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/ko/battle.ts b/src/locales/ko/battle.ts index 6dbda225a1fc..673eb9e87012 100644 --- a/src/locales/ko/battle.ts +++ b/src/locales/ko/battle.ts @@ -58,6 +58,6 @@ export const battle: SimpleTranslationEntries = { "ivScannerUseQuestion": "{{pokemonName}}에게 개체값탐지기를 사용하시겠습니까?", "wildPokemonWithAffix": "야생 {{pokemonName}}", "foePokemonWithAffix": "상대 {{pokemonName}}", - "useMove": "{{pokemonNameWithAffix}}의 {{moveName}}!", + "useMove": "{{pokemonNameWithAffix}}의 {{moveName}}!", "fainted": "{{pokemonNameWithAffix}}은(는) 쓰러졌다!" } as const; From b605bcde205cf3af6e43ef5ae4ca1238360fd461 Mon Sep 17 00:00:00 2001 From: Ohmry Date: Thu, 6 Jun 2024 23:15:47 +0900 Subject: [PATCH 13/13] Fixed error TS1117. --- src/locales/pt_BR/battle.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/locales/pt_BR/battle.ts b/src/locales/pt_BR/battle.ts index aedbd219bbeb..313eb5da7be0 100644 --- a/src/locales/pt_BR/battle.ts +++ b/src/locales/pt_BR/battle.ts @@ -61,8 +61,5 @@ export const battle: SimpleTranslationEntries = { "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!", "drainMessage": "{{pokemonName}} teve sua\nenergia drenada!", "regainHealth": "{{pokemonName}} recuperou\npontos de saúde!", - "wildPokemonWithAffix": "Wild {{pokemonName}}", - "foePokemonWithAffix": "Foe {{pokemonName}}", - "useMove": "{{pokemonNameWithAffix}} used {{moveName}}!", "fainted": "{{pokemonNameWithAffix}} fainted!" } as const;