Add i18n placeholders

This commit is contained in:
NightKev 2024-08-08 15:16:16 -07:00
parent 97b1c8ce54
commit 38303e6eb1
24 changed files with 84 additions and 18 deletions

View File

@ -844,30 +844,22 @@ class HappyHourTag extends ArenaTag {
} }
} }
class SafegaurdTag extends ArenaTag { class SafeguardTag extends ArenaTag {
constructor(turnCount: integer, sourceId: integer, side: ArenaTagSide) { constructor(turnCount: integer, sourceId: integer, side: ArenaTagSide) {
super(ArenaTagType.SAFEGUARD, turnCount, Moves.SAFEGUARD, sourceId, side); super(ArenaTagType.SAFEGUARD, turnCount, Moves.SAFEGUARD, sourceId, side);
} }
onAdd(arena: Arena): void { onAdd(arena: Arena): void {
if (this.side === ArenaTagSide.PLAYER) { arena.scene.queueMessage(i18next.t(`arenaTag:safeguardOnAdd${this.side === ArenaTagSide.PLAYER ? "Player" : this.side === ArenaTagSide.ENEMY ? "Enemy" : ""}`));
arena.scene.queueMessage("Your team cloaked itself in a mystical veil!");
} else {
arena.scene.queueMessage("Enemy team cloaked itself in a mystical veil!");
}
} }
onRemove(arena: Arena): void { onRemove(arena: Arena): void {
if (this.side === ArenaTagSide.PLAYER) { arena.scene.queueMessage(i18next.t(`arenaTag:safeguardOnRemove${this.side === ArenaTagSide.PLAYER ? "Player" : this.side === ArenaTagSide.ENEMY ? "Enemy" : ""}`));
arena.scene.queueMessage("Your team is not longer protected by the mystical veil!");
} else {
arena.scene.queueMessage("Enemy team is not longer protected by the mystical veil!");
}
} }
} }
export function getArenaTag(tagType: ArenaTagType, turnCount: integer, sourceMove: Moves, sourceId: integer, targetIndex?: BattlerIndex, side: ArenaTagSide = ArenaTagSide.BOTH): ArenaTag { export function getArenaTag(tagType: ArenaTagType, turnCount: integer, sourceMove: Moves | undefined, sourceId: integer, targetIndex?: BattlerIndex, side: ArenaTagSide = ArenaTagSide.BOTH): ArenaTag | null {
switch (tagType) { switch (tagType) {
case ArenaTagType.MIST: case ArenaTagType.MIST:
return new MistTag(turnCount, sourceId, side); return new MistTag(turnCount, sourceId, side);
@ -913,7 +905,7 @@ export function getArenaTag(tagType: ArenaTagType, turnCount: integer, sourceMov
case ArenaTagType.HAPPY_HOUR: case ArenaTagType.HAPPY_HOUR:
return new HappyHourTag(turnCount, sourceId, side); return new HappyHourTag(turnCount, sourceId, side);
case ArenaTagType.SAFEGUARD: case ArenaTagType.SAFEGUARD:
return new SafegaurdTag(turnCount, sourceId, side); return new SafeguardTag(turnCount, sourceId, side);
default: default:
return null; return null;
} }

View File

@ -1,5 +1,5 @@
import { ChargeAnim, MoveChargeAnim, initMoveAnim, loadMoveAnimAssets } from "./battle-anims"; import { ChargeAnim, MoveChargeAnim, initMoveAnim, loadMoveAnimAssets } from "./battle-anims";
import { BattleEndPhase, MessagePhase, MoveEndPhase, MovePhase, NewBattlePhase, PartyStatusCurePhase, PokemonHealPhase, StatChangePhase, SwitchPhase, SwitchSummonPhase } from "../phases"; import { BattleEndPhase, MoveEndPhase, MovePhase, NewBattlePhase, PartyStatusCurePhase, PokemonHealPhase, StatChangePhase, SwitchPhase, SwitchSummonPhase } from "../phases";
import { BattleStat, getBattleStatName } from "./battle-stat"; import { BattleStat, getBattleStatName } from "./battle-stat";
import { EncoreTag, GulpMissileTag, HelpingHandTag, SemiInvulnerableTag, StockpilingTag, TypeBoostTag } from "./battler-tags"; import { EncoreTag, GulpMissileTag, HelpingHandTag, SemiInvulnerableTag, StockpilingTag, TypeBoostTag } from "./battler-tags";
import { getPokemonNameWithAffix } from "../messages"; import { getPokemonNameWithAffix } from "../messages";
@ -1931,10 +1931,7 @@ export class StatusEffectAttr extends MoveEffectAttr {
if (user.scene.arena.getTagOnSide(ArenaTagType.SAFEGUARD, targetSide)) { if (user.scene.arena.getTagOnSide(ArenaTagType.SAFEGUARD, targetSide)) {
if (move.category === MoveCategory.STATUS) { if (move.category === MoveCategory.STATUS) {
user.scene.pushPhase( user.scene.queueMessage(i18next.t("moveTriggers:safeguard", { targetName: getPokemonNameWithAffix(target)}));
new MessagePhase(user.scene,
`${target.name} is protected by Safeguard!`,
0, false, 0), false);
} }
return false; return false;
} }

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!", "tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!",
"happyHourOnAdd": "Everyone is caught up in the happy atmosphere!", "happyHourOnAdd": "Everyone is caught up in the happy atmosphere!",
"happyHourOnRemove": "The atmosphere returned to normal.", "happyHourOnRemove": "The atmosphere returned to normal.",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "{{pokemonName}}'s ability\nwas suppressed!", "suppressAbilities": "{{pokemonName}}'s ability\nwas suppressed!",
"swapArenaTags": "{{pokemonName}} swapped the battle effects affecting each side of the field!", "swapArenaTags": "{{pokemonName}} swapped the battle effects affecting each side of the field!",
"exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!", "exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "Der Rückenwind auf gegnerischer Seite hat sich gelegt!", "tailwindOnRemoveEnemy": "Der Rückenwind auf gegnerischer Seite hat sich gelegt!",
"happyHourOnAdd": "Goldene Zeiten sind angebrochen!", "happyHourOnAdd": "Goldene Zeiten sind angebrochen!",
"happyHourOnRemove": "Die goldenen Zeiten sind vorbei!", "happyHourOnRemove": "Die goldenen Zeiten sind vorbei!",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "Die Fähigkeit von {{pokemonName}} wirkt nicht mehr!", "suppressAbilities": "Die Fähigkeit von {{pokemonName}} wirkt nicht mehr!",
"swapArenaTags": "{{pokemonName}} hat die Effekte, die auf den beiden Seiten des Kampffeldes wirken, miteinander getauscht!", "swapArenaTags": "{{pokemonName}} hat die Effekte, die auf den beiden Seiten des Kampffeldes wirken, miteinander getauscht!",
"exposedMove": "{{pokemonName}} erkennt {{targetPokemonName}}!", "exposedMove": "{{pokemonName}} erkennt {{targetPokemonName}}!",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!", "tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!",
"happyHourOnAdd": "Everyone is caught up in the happy atmosphere!", "happyHourOnAdd": "Everyone is caught up in the happy atmosphere!",
"happyHourOnRemove": "The atmosphere returned to normal.", "happyHourOnRemove": "The atmosphere returned to normal.",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "{{pokemonName}}'s ability\nwas suppressed!", "suppressAbilities": "{{pokemonName}}'s ability\nwas suppressed!",
"swapArenaTags": "{{pokemonName}} swapped the battle effects affecting each side of the field!", "swapArenaTags": "{{pokemonName}} swapped the battle effects affecting each side of the field!",
"exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!", "exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!", "tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!",
"happyHourOnAdd": "Everyone is caught up in the happy atmosphere!", "happyHourOnAdd": "Everyone is caught up in the happy atmosphere!",
"happyHourOnRemove": "The atmosphere returned to normal.", "happyHourOnRemove": "The atmosphere returned to normal.",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "{{pokemonName}}'s ability\nwas suppressed!", "suppressAbilities": "{{pokemonName}}'s ability\nwas suppressed!",
"swapArenaTags": "{{pokemonName}} swapped the battle effects affecting each side of the field!", "swapArenaTags": "{{pokemonName}} swapped the battle effects affecting each side of the field!",
"exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!", "exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "Le vent arrière soufflant\nsur léquipe ennemie sarrête !", "tailwindOnRemoveEnemy": "Le vent arrière soufflant\nsur léquipe ennemie sarrête !",
"happyHourOnAdd": "Lambiance est euphorique !", "happyHourOnAdd": "Lambiance est euphorique !",
"happyHourOnRemove": "Lambiance se calme !", "happyHourOnRemove": "Lambiance se calme !",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "Le talent de {{pokemonName}}\na été rendu inactif !", "suppressAbilities": "Le talent de {{pokemonName}}\na été rendu inactif !",
"swapArenaTags": "Les effets affectant chaque côté du terrain\nont été échangés par {{pokemonName}} !", "swapArenaTags": "Les effets affectant chaque côté du terrain\nont été échangés par {{pokemonName}} !",
"exposedMove": "{{targetPokemonName}} est identifié\npar {{pokemonName}} !", "exposedMove": "{{targetPokemonName}} est identifié\npar {{pokemonName}} !",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!", "tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!",
"happyHourOnAdd": "Everyone is caught up in the happy atmosphere!", "happyHourOnAdd": "Everyone is caught up in the happy atmosphere!",
"happyHourOnRemove": "The atmosphere returned to normal.", "happyHourOnRemove": "The atmosphere returned to normal.",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "Labilità di {{pokemonName}}\nperde ogni efficacia!", "suppressAbilities": "Labilità di {{pokemonName}}\nperde ogni efficacia!",
"swapArenaTags": "{{pokemonName}} ha invertito gli effetti attivi\nnelle due metà del campo!", "swapArenaTags": "{{pokemonName}} ha invertito gli effetti attivi\nnelle due metà del campo!",
"exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!", "exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!", "tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!",
"happyHourOnAdd": "Everyone is caught up in the happy atmosphere!", "happyHourOnAdd": "Everyone is caught up in the happy atmosphere!",
"happyHourOnRemove": "The atmosphere returned to normal.", "happyHourOnRemove": "The atmosphere returned to normal.",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "{{pokemonName}}の とくせいが きかなくなった!", "suppressAbilities": "{{pokemonName}}の とくせいが きかなくなった!",
"swapArenaTags": "{{pokemonName}}は\nおたがいの ばのこうかを いれかえた", "swapArenaTags": "{{pokemonName}}は\nおたがいの ばのこうかを いれかえた",
"exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!", "exposedMove": "{{pokemonName}} identified\n{{targetPokemonName}}!",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "상대의\n순풍이 멈췄다!", "tailwindOnRemoveEnemy": "상대의\n순풍이 멈췄다!",
"happyHourOnAdd": "모두 행복한 기분에\n휩싸였다!", "happyHourOnAdd": "모두 행복한 기분에\n휩싸였다!",
"happyHourOnRemove": "기분이 원래대로 돌아왔다.", "happyHourOnRemove": "기분이 원래대로 돌아왔다.",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "{{pokemonName}}의\n특성이 효과를 발휘하지 못하게 되었다!", "suppressAbilities": "{{pokemonName}}의\n특성이 효과를 발휘하지 못하게 되었다!",
"swapArenaTags": "{{pokemonName}}[[는]]\n서로의 필드 효과를 교체했다!", "swapArenaTags": "{{pokemonName}}[[는]]\n서로의 필드 효과를 교체했다!",
"exposedMove": "{{pokemonName}}[[는]]\n{{targetPokemonName}}의 정체를 꿰뚫어 보았다!", "exposedMove": "{{pokemonName}}[[는]]\n{{targetPokemonName}}의 정체를 꿰뚫어 보았다!",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "O Tailwind da equipe adversária acabou!", "tailwindOnRemoveEnemy": "O Tailwind da equipe adversária acabou!",
"happyHourOnAdd": "Todos foram envolvidos por uma atmosfera alegre!", "happyHourOnAdd": "Todos foram envolvidos por uma atmosfera alegre!",
"happyHourOnRemove": "A atmosfera retornou ao normal.", "happyHourOnRemove": "A atmosfera retornou ao normal.",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "A habilidade de {{pokemonName}}\nfoi suprimida!", "suppressAbilities": "A habilidade de {{pokemonName}}\nfoi suprimida!",
"swapArenaTags": "{{pokemonName}} trocou os efeitos de batalha que afetam cada lado do campo!", "swapArenaTags": "{{pokemonName}} trocou os efeitos de batalha que afetam cada lado do campo!",
"exposedMove": "{{pokemonName}} identificou\n{{targetPokemonName}}!", "exposedMove": "{{pokemonName}} identificou\n{{targetPokemonName}}!",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "敌方的顺风停止了!", "tailwindOnRemoveEnemy": "敌方的顺风停止了!",
"happyHourOnAdd": "大家被欢乐的\n气氛包围了", "happyHourOnAdd": "大家被欢乐的\n气氛包围了",
"happyHourOnRemove": "气氛回复到平常了。", "happyHourOnRemove": "气氛回复到平常了。",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "{{pokemonName}}的特性\n变得无效了", "suppressAbilities": "{{pokemonName}}的特性\n变得无效了",
"swapArenaTags": "{{pokemonName}}\n交换了双方的场地效果", "swapArenaTags": "{{pokemonName}}\n交换了双方的场地效果",
"exposedMove": "{{pokemonName}}识破了\n{{targetPokemonName}}的原型!", "exposedMove": "{{pokemonName}}识破了\n{{targetPokemonName}}的原型!",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;

View File

@ -50,4 +50,10 @@ export const arenaTag: SimpleTranslationEntries = {
"tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!", "tailwindOnRemoveEnemy": "The opposing team's Tailwind petered out!",
"happyHourOnAdd": "Everyone is caught up in the happy atmosphere!", "happyHourOnAdd": "Everyone is caught up in the happy atmosphere!",
"happyHourOnRemove": "The atmosphere returned to normal.", "happyHourOnRemove": "The atmosphere returned to normal.",
"safeguardOnAdd": "The whole field is cloaked in a mystical veil!",
"safeguardOnAddPlayer": "Your team cloaked itself in a mystical veil!",
"safeguardOnAddEnemy": "The opposing team cloaked itself in a mystical veil!",
"safeguardOnRemove": "The field is no longer protected by Safeguard!",
"safeguardOnRemovePlayer": "Your team is no longer protected by Safeguard!",
"safeguardOnRemoveEnemy": "The opposing team is no longer protected by Safeguard!",
} as const; } as const;

View File

@ -61,4 +61,5 @@ export const moveTriggers: SimpleTranslationEntries = {
"suppressAbilities": "{{pokemonName}}的特性\n變得無效了", "suppressAbilities": "{{pokemonName}}的特性\n變得無效了",
"swapArenaTags": "{{pokemonName}}\n交換了雙方的場地效果", "swapArenaTags": "{{pokemonName}}\n交換了雙方的場地效果",
"exposedMove": "{{pokemonName}}識破了\n{{targetPokemonName}}的原形!", "exposedMove": "{{pokemonName}}識破了\n{{targetPokemonName}}的原形!",
"safeguard": "{{targetName}} is protected by Safeguard!",
} as const; } as const;