From 6f7cc71a9b17398d7296fd24e17a80bb4be074d1 Mon Sep 17 00:00:00 2001 From: Zach Day Date: Sun, 16 Jun 2024 17:30:52 -0400 Subject: [PATCH] Localize strings --- src/data/ability.ts | 3 ++- src/locales/en/ability-trigger.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 0e580a5dfbc..981fb4020db 100755 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3313,7 +3313,8 @@ export class FieldPreventMovesAbAttr extends AbAttr { /** @param args See {@linkcode FieldPreventMovesAbAttr}. */ getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string { - return (getPokemonMessage(args[1] as Pokemon, ` cannot use ${(args[0] as Move).name}.`)); + return i18next.t("abilityTriggers:movePrevented", + { moveUser: getPokemonNameWithAffix(args[1] as Pokemon), moveName: (args[0] as Move).name }); } } diff --git a/src/locales/en/ability-trigger.ts b/src/locales/en/ability-trigger.ts index a99053785ab..52f333f69a9 100644 --- a/src/locales/en/ability-trigger.ts +++ b/src/locales/en/ability-trigger.ts @@ -6,5 +6,6 @@ export const abilityTriggers: SimpleTranslationEntries = { "windPowerCharged": "Being hit by {{moveName}} charged {{pokemonName}} with power!", "perishBody": "{{pokemonName}}'s {{abilityName}}\nwill faint both pokemon in 3 turns!", "poisonHeal": "{{pokemonName}}'s {{abilityName}}\nrestored its HP a little!", - "iceFaceAvoidedDamage": "{{pokemonName}} avoided\ndamage with {{abilityName}}!" + "iceFaceAvoidedDamage": "{{pokemonName}} avoided\ndamage with {{abilityName}}!", + "movePrevented": "{{moveUser}} cannot use {{moveName}}!" } as const;