Localize strings

This commit is contained in:
Zach Day 2024-06-16 17:30:52 -04:00
parent 36f567b627
commit 6f7cc71a9b
2 changed files with 4 additions and 2 deletions

View File

@ -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 });
}
}

View File

@ -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;