[Localization] localized status-effect.ts and translate. (#2528)

* make postposition not to dynamic for localize

* localize status-effect.ts

* added test code, modified english postposition, modifed toxic_orb test to make it always fix in English.

* Update src/locales/zh_CN/status-effect.ts

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* Update src/locales/fr/status-effect.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/de/status-effect.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/locales/de/status-effect.ts

* added test code for check message key

* remove multi-language tests (except english)

* Update src/locales/pt_BR/status-effect.ts

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* remove language and change test code to check method call and parameter

* Update src/locales/es/status-effect.ts

Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>

* Update src/locales/en/status-effect.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Apply review suggestion

* Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* add Test with empty string parameter

* Update src/locales/es/status-effect.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Update src/locales/fr/status-effect.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

---------

Co-authored-by: 송지원 <jiwsong@gmarket.com>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>
Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
This commit is contained in:
Enoch 2024-07-02 23:22:46 +09:00 committed by GitHub
parent 7f8e796fae
commit 0bc4f26b9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 999 additions and 101 deletions

View File

@ -2910,7 +2910,7 @@ export class PostTurnResetStatusAbAttr extends PostTurnAbAttr {
} }
if (this.target?.status) { if (this.target?.status) {
this.target.scene.queueMessage(getPokemonMessage(this.target, getStatusEffectHealText(this.target.status?.effect))); this.target.scene.queueMessage(getStatusEffectHealText(this.target.status?.effect, getPokemonNameWithAffix(this.target)));
this.target.resetStatus(false); this.target.resetStatus(false);
this.target.updateInfo(); this.target.updateInfo();
return true; return true;

View File

@ -1,5 +1,5 @@
import { PokemonHealPhase, StatChangePhase } from "../phases"; import { PokemonHealPhase, StatChangePhase } from "../phases";
import { getPokemonMessage } from "../messages"; import { getPokemonMessage, getPokemonNameWithAffix } from "../messages";
import Pokemon, { HitResult } from "../field/pokemon"; import Pokemon, { HitResult } from "../field/pokemon";
import { BattleStat } from "./battle-stat"; import { BattleStat } from "./battle-stat";
import { getStatusEffectHealText } from "./status-effect"; import { getStatusEffectHealText } from "./status-effect";
@ -80,7 +80,7 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc {
pokemon.battleData.berriesEaten.push(berryType); pokemon.battleData.berriesEaten.push(berryType);
} }
if (pokemon.status) { if (pokemon.status) {
pokemon.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectHealText(pokemon.status.effect))); pokemon.scene.queueMessage(getStatusEffectHealText(pokemon.status.effect, getPokemonNameWithAffix(pokemon)));
} }
pokemon.resetStatus(true, true); pokemon.resetStatus(true, true);
pokemon.updateInfo(); pokemon.updateInfo();

View File

@ -1763,7 +1763,7 @@ export class PsychoShiftEffectAttr extends MoveEffectAttr {
if (!target.status || (target.status.effect === statusToApply && move.chance < 0)) { if (!target.status || (target.status.effect === statusToApply && move.chance < 0)) {
const statusAfflictResult = target.trySetStatus(statusToApply, true, user); const statusAfflictResult = target.trySetStatus(statusToApply, true, user);
if (statusAfflictResult) { if (statusAfflictResult) {
user.scene.queueMessage(getPokemonMessage(user, getStatusEffectHealText(user.status.effect))); user.scene.queueMessage(getStatusEffectHealText(user.status.effect, getPokemonNameWithAffix(user)));
user.resetStatus(); user.resetStatus();
user.updateInfo(); user.updateInfo();
} }
@ -2037,7 +2037,7 @@ export class HealStatusEffectAttr extends MoveEffectAttr {
const pokemon = this.selfTarget ? user : target; const pokemon = this.selfTarget ? user : target;
if (pokemon.status && this.effects.includes(pokemon.status.effect)) { if (pokemon.status && this.effects.includes(pokemon.status.effect)) {
pokemon.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectHealText(pokemon.status.effect))); pokemon.scene.queueMessage(getStatusEffectHealText(pokemon.status.effect, getPokemonNameWithAffix(pokemon)));
pokemon.resetStatus(); pokemon.resetStatus();
pokemon.updateInfo(); pokemon.updateInfo();

View File

@ -1,4 +1,5 @@
import * as Utils from "../utils"; import * as Utils from "../utils";
import i18next, { ParseKeys } from "i18next";
export enum StatusEffect { export enum StatusEffect {
NONE, NONE,
@ -31,94 +32,52 @@ export class Status {
} }
} }
export function getStatusEffectObtainText(statusEffect: StatusEffect, sourceText?: string): string { function getStatusEffectMessageKey(statusEffect: StatusEffect): string {
const sourceClause = sourceText ? ` ${statusEffect !== StatusEffect.SLEEP ? "by" : "from"} ${sourceText}` : "";
switch (statusEffect) { switch (statusEffect) {
case StatusEffect.POISON: case StatusEffect.POISON:
return `\nwas poisoned${sourceClause}!`; return "statusEffect:poison";
case StatusEffect.TOXIC: case StatusEffect.TOXIC:
return `\nwas badly poisoned${sourceClause}!`; return "statusEffect:toxic";
case StatusEffect.PARALYSIS: case StatusEffect.PARALYSIS:
return ` was paralyzed${sourceClause}!\nIt may be unable to move!`; return "statusEffect:paralysis";
case StatusEffect.SLEEP: case StatusEffect.SLEEP:
return `\nfell asleep${sourceClause}!`; return "statusEffect:sleep";
case StatusEffect.FREEZE: case StatusEffect.FREEZE:
return `\nwas frozen solid${sourceClause}!`; return "statusEffect:freeze";
case StatusEffect.BURN: case StatusEffect.BURN:
return `\nwas burned${sourceClause}!`; return "statusEffect:burn";
default:
return "statusEffect:none";
} }
return "";
} }
export function getStatusEffectActivationText(statusEffect: StatusEffect): string { export function getStatusEffectObtainText(statusEffect: StatusEffect, pokemonNameWithAffix: string, sourceText?: string): string {
switch (statusEffect) { if (!sourceText) {
case StatusEffect.POISON: const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.obtain`as ParseKeys;
case StatusEffect.TOXIC: return i18next.t(i18nKey, { pokemonNameWithAffix: pokemonNameWithAffix });
return " is hurt\nby poison!";
case StatusEffect.PARALYSIS:
return " is paralyzed!\nIt can't move!";
case StatusEffect.SLEEP:
return " is fast asleep.";
case StatusEffect.FREEZE:
return " is\nfrozen solid!";
case StatusEffect.BURN:
return " is hurt\nby its burn!";
} }
const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.obtainSource`as ParseKeys;
return ""; return i18next.t(i18nKey, { pokemonNameWithAffix: pokemonNameWithAffix, sourceText: sourceText });
} }
export function getStatusEffectOverlapText(statusEffect: StatusEffect): string { export function getStatusEffectActivationText(statusEffect: StatusEffect, pokemonNameWithAffix: string): string {
switch (statusEffect) { const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.activation` as ParseKeys;
case StatusEffect.POISON: return i18next.t(i18nKey, { pokemonNameWithAffix: pokemonNameWithAffix });
case StatusEffect.TOXIC:
return " is\nalready poisoned!";
case StatusEffect.PARALYSIS:
return " is\nalready paralyzed!";
case StatusEffect.SLEEP:
return " is\nalready asleep!";
case StatusEffect.FREEZE:
return " is\nalready frozen!";
case StatusEffect.BURN:
return " is\nalready burned!";
}
return "";
} }
export function getStatusEffectHealText(statusEffect: StatusEffect): string { export function getStatusEffectOverlapText(statusEffect: StatusEffect, pokemonNameWithAffix: string): string {
switch (statusEffect) { const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.overlap` as ParseKeys;
case StatusEffect.POISON: return i18next.t(i18nKey, { pokemonNameWithAffix: pokemonNameWithAffix });
case StatusEffect.TOXIC: }
return " was\ncured of its poison!";
case StatusEffect.PARALYSIS:
return " was\nhealed of paralysis!";
case StatusEffect.SLEEP:
return " woke up!";
case StatusEffect.FREEZE:
return " was\ndefrosted!";
case StatusEffect.BURN:
return " was\nhealed of its burn!";
}
return ""; export function getStatusEffectHealText(statusEffect: StatusEffect, pokemonNameWithAffix: string): string {
const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.heal` as ParseKeys;
return i18next.t(i18nKey, { pokemonNameWithAffix: pokemonNameWithAffix });
} }
export function getStatusEffectDescriptor(statusEffect: StatusEffect): string { export function getStatusEffectDescriptor(statusEffect: StatusEffect): string {
switch (statusEffect) { const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.description` as ParseKeys;
case StatusEffect.POISON: return i18next.t(i18nKey);
case StatusEffect.TOXIC:
return "poisoning";
case StatusEffect.PARALYSIS:
return "paralysis";
case StatusEffect.SLEEP:
return "sleep";
case StatusEffect.FREEZE:
return "freezing";
case StatusEffect.BURN:
return "burn";
}
} }
export function getStatusEffectCatchRateMultiplier(statusEffect: StatusEffect): number { export function getStatusEffectCatchRateMultiplier(statusEffect: StatusEffect): number {

View File

@ -58,6 +58,20 @@ export interface BerryTranslationEntries {
[key: string]: BerryTranslationEntry [key: string]: BerryTranslationEntry
} }
export interface StatusEffectTranslationEntries {
[key: string]: StatusEffectTranslationEntry
}
export interface StatusEffectTranslationEntry {
name: string,
obtain: string,
obtainSource: string,
activation: string,
overlap: string,
heal: string
description: string,
}
export interface AchievementTranslationEntry { export interface AchievementTranslationEntry {
name?: string, name?: string,
description?: string, description?: string,

View File

@ -35,13 +35,14 @@ import { pokemonInfoContainer } from "./pokemon-info-container";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "#app/locales/de/settings.js"; import { settings } from "./settings.js";
import { common } from "#app/locales/de/common.js"; import { common } from "./common.js";
export const deConfig = { export const deConfig = {
ability: ability, ability: ability,
@ -82,6 +83,7 @@ export const deConfig = {
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,67 @@
import { StatusEffectTranslationEntries } from "#app/interfaces/locales.js";
export const statusEffect: StatusEffectTranslationEntries = {
none: {
name: "None",
description: "",
obtain: "",
obtainSource: "",
activation: "",
overlap: "",
heal: ""
},
poison: {
name: "Gift",
description: "Vergiftungen",
obtain: "{{pokemonNameWithAffix}} wurde vergiftet!",
obtainSource: "{{pokemonNameWithAffix}} wurde durch {{sourceText}} vergiftet!",
activation: "{{pokemonNameWithAffix}} wird durch Gift verletzt!",
overlap: "{{pokemonNameWithAffix}} ist bereits vergiftet!",
heal: "Die Vergiftung von {{pokemonNameWithAffix}} wurde geheilt!"
},
toxic: {
name: "Gift",
description: "Vergiftungen",
obtain: "{{pokemonNameWithAffix}} wurde schwer vergiftet!",
obtainSource: "{{pokemonNameWithAffix}} wurde durch {{sourceText}} schwer vergiftet!",
activation: "{{pokemonNameWithAffix}} wird durch Gift verletzt!",
overlap: "{{pokemonNameWithAffix}} ist bereits vergiftet!",
heal: "Die Vergiftung von {{pokemonNameWithAffix}} wurde geheilt!"
},
paralysis: {
name: "Paralyse",
description: "Paralyse",
obtain: "{{pokemonNameWithAffix}} wurde paralysiert!\nEs kann eventuell nicht handeln!",
obtainSource: "{{pokemonNameWithAffix}} wurde durch {{sourceText}} paralysiert,\nEs kann eventuell nicht handeln!",
activation: "{{pokemonNameWithAffix}}ist paralysiert!\nEs kann nicht angreifen!",
overlap: "{{pokemonNameWithAffix}} ist bereits paralysiert!",
heal: "Die Paralyse von {{pokemonNameWithAffix}} wurde aufgehoben!"
},
sleep: {
name: "Schlaf",
description: "Einschlafen",
obtain: "{{pokemonNameWithAffix}} ist eingeschlafen!",
obtainSource: "{{pokemonNameWithAffix}}ist durch {{sourceText}} eingeschlafen!",
activation: "{{pokemonNameWithAffix}} schläft tief und fest!",
overlap: "{{pokemonNameWithAffix}} schläft bereits!",
heal: "{{pokemonNameWithAffix}} ist aufgewacht!"
},
freeze: {
name: "Gefroren",
description: "Einfrieren",
obtain: "{{pokemonNameWithAffix}} erstarrt zu Eis!",
obtainSource: "{{pokemonNameWithAffix}} erstarrt durch {{sourceText}} zu Eis!",
activation: "{{pokemonNameWithAffix}} ist eingefroren und kann nicht handeln!",
overlap: "{{pokemonNameWithAffix}} ist bereits eingefroren!",
heal: "{{pokemonNameWithAffix}} wurde aufgetaut!"
},
burn: {
name: "Verbrennung ",
description: "Verbrennungen",
obtain: "{{pokemonNameWithAffix}} erleidet Verbrennungen!",
obtainSource: "{{pokemonNameWithAffix}} erleidet durch {{sourceText}} Verbrennungen!",
activation: "Die Verbrennungen schaden {{pokemonNameWithAffix}}!",
overlap: "{{pokemonNameWithAffix}} leidet bereits unter Verbrennungen!",
heal: "Die Verbrennungen von {{pokemonNameWithAffix}} wurden geheilt!"
},
} as const;

View File

@ -1,5 +1,5 @@
import { common } from "#app/locales/en/common.js"; import { common } from "./common.js";
import { settings } from "#app/locales/en/settings.js"; import { settings } from "./settings.js";
import { ability } from "./ability"; import { ability } from "./ability";
import { abilityTriggers } from "./ability-trigger"; import { abilityTriggers } from "./ability-trigger";
import { PGFachv, PGMachv } from "./achv"; import { PGFachv, PGMachv } from "./achv";
@ -38,6 +38,7 @@ import { pokemonInfoContainer } from "./pokemon-info-container";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
@ -83,6 +84,7 @@ export const enConfig = {
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,67 @@
import { StatusEffectTranslationEntries } from "#app/interfaces/locales.js";
export const statusEffect: StatusEffectTranslationEntries = {
none: {
name: "None",
description: "",
obtain: "",
obtainSource: "",
activation: "",
overlap: "",
heal: ""
},
poison: {
name: "Poison",
description: "poisoning",
obtain: "{{pokemonNameWithAffix}}\nwas poisoned!",
obtainSource: "{{pokemonNameWithAffix}}\nwas poisoned by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is hurt\nby poison!",
overlap: "{{pokemonNameWithAffix}} is\nalready poisoned!",
heal: "{{pokemonNameWithAffix}} was\ncured of its poison!"
},
toxic: {
name: "Toxic",
description: "poisoning",
obtain: "{{pokemonNameWithAffix}}\nwas badly poisoned!",
obtainSource: "{{pokemonNameWithAffix}}\nwas badly poisoned by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is hurt\nby poison!",
overlap: "{{pokemonNameWithAffix}} is\nalready poisoned!",
heal: "{{pokemonNameWithAffix}} was\ncured of its poison!"
},
paralysis: {
name: "Paralysis",
description: "paralysis",
obtain: "{{pokemonNameWithAffix}} was paralyzed,\nIt may be unable to move!",
obtainSource: "{{pokemonNameWithAffix}} was paralyzed by {{sourceText}}!\nIt may be unable to move!",
activation: "{{pokemonNameWithAffix}} is paralyzed!\nIt can't move!",
overlap: "{{pokemonNameWithAffix}} is\nalready paralyzed!",
heal: "{{pokemonNameWithAffix}} was\nhealed of paralysis!"
},
sleep: {
name: "Sleep",
description: "sleep",
obtain: "{{pokemonNameWithAffix}}\nfell asleep!",
obtainSource: "{{pokemonNameWithAffix}}\nfell asleep from {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is fast asleep.",
overlap: "{{pokemonNameWithAffix}} is\nalready asleep!",
heal: "{{pokemonNameWithAffix}} woke up!"
},
freeze: {
name: "Freeze",
description: "freezing",
obtain: "{{pokemonNameWithAffix}}\nwas frozen solid!",
obtainSource: "{{pokemonNameWithAffix}}\nwas frozen solid by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is\nfrozen solid!",
overlap: "{{pokemonNameWithAffix}} is\nalready frozen!",
heal: "{{pokemonNameWithAffix}} was\ndefrosted!"
},
burn: {
name: "Burn",
description: "burn",
obtain: "{{pokemonNameWithAffix}}\nwas burned!",
obtainSource: "{{pokemonNameWithAffix}}\nwas burned by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is hurt\nby its burn!",
overlap: "{{pokemonNameWithAffix}} is\nalready burned!",
heal: "{{pokemonNameWithAffix}} was\nhealed of its burn!"
},
} as const;

View File

@ -35,13 +35,14 @@ import { pokemonInfoContainer } from "./pokemon-info-container";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "#app/locales/es/settings.js"; import { settings } from "./settings.js";
import { common } from "#app/locales/es/common.js"; import { common } from "./common.js";
export const esConfig = { export const esConfig = {
ability: ability, ability: ability,
@ -82,6 +83,7 @@ export const esConfig = {
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,67 @@
import { StatusEffectTranslationEntries } from "#app/interfaces/locales.js";
export const statusEffect: StatusEffectTranslationEntries = {
none: {
name: "Ninguno",
description: "",
obtain: "",
obtainSource: "",
activation: "",
overlap: "",
heal: ""
},
poison: {
name: "Envenenamiento",
description: "envenenamiento",
obtain: "¡{{pokemonNameWithAffix}}\nha sido envenenado!",
obtainSource: "¡{{pokemonNameWithAffix}}\nha sido envenenado por {{sourceText}}!",
activation: "¡El veneno resta PS a {{pokemonNameWithAffix}}!",
overlap: "¡{{pokemonNameWithAffix}} ya\nestá envenenado!",
heal: "¡{{pokemonNameWithAffix}} ya no\nestá envenenado!"
},
toxic: {
name: "Envenenamiento grave",
description: "envenenamiento grave",
obtain: "¡{{pokemonNameWithAffix}}\nha sido gravemente envenenado!",
obtainSource: "¡{{pokemonNameWithAffix}}\nha sido gravemente envenenado por {{sourceText}}!",
activation: "¡El veneno resta PS a {{pokemonNameWithAffix}}!",
overlap: "¡{{pokemonNameWithAffix}} ya\nestá envenenado!",
heal: "¡{{pokemonNameWithAffix}} ya no\nestá envenenado!"
},
paralysis: {
name: "Parálisis",
description: "parálisis",
obtain: "¡{{pokemonNameWithAffix}} sufre parálisis!\nQuizás no se pueda mover.",
obtainSource: "¡{{pokemonNameWithAffix}} sufre parálisis por {{sourceText}}!\nQuizás no se pueda mover.",
activation: "¡{{pokemonNameWithAffix}} está paralizado!\n¡No se puede mover!",
overlap: "¡{{pokemonNameWithAffix}} ya\nestá paralizado!",
heal: "¡{{pokemonNameWithAffix}} ya no\nestá paralizado!"
},
sleep: {
name: "Dormir",
description: "dormir",
obtain: "¡{{pokemonNameWithAffix}}\nse ha dormido!",
obtainSource: "¡{{pokemonNameWithAffix}}\nse ha dormido\npor culpa de {{sourceText}}!",
activation: "¡{{pokemonNameWithAffix}} está/ndormido como un tronco.",
overlap: "¡{{pokemonNameWithAffix}} ya\nestá dormido!",
heal: "¡{{pokemonNameWithAffix}} se despertó!"
},
freeze: {
name: "Congelamiento",
description: "congelamiento",
obtain: "¡{{pokemonNameWithAffix}}\nha sido congelado!",
obtainSource: "¡{{pokemonNameWithAffix}}\nha sido congelado por {{sourceText}}!",
activation: "¡{{pokemonNameWithAffix}} está\ncongelado!",
overlap: "¡{{pokemonNameWithAffix}} ya\nestá congelado!",
heal: "¡{{pokemonNameWithAffix}} se\nha descongelado!"
},
burn: {
name: "Quemadura",
description: "quemadura",
obtain: "¡{{pokemonNameWithAffix}}\nse ha quemado!",
obtainSource: "¡{{pokemonNameWithAffix}}\nse ha quemado por {{sourceText}}!",
activation: "¡{{pokemonNameWithAffix}} se resiente\nde las quemaduras!",
overlap: "¡{{pokemonNameWithAffix}} ya\nestá quemado!",
heal: "¡{{pokemonNameWithAffix}} ya no\nestá quemado!"
},
} as const;

View File

@ -35,13 +35,14 @@ import { pokemonInfoContainer } from "./pokemon-info-container";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "#app/locales/fr/settings.js"; import { settings } from "./settings.js";
import { common } from "#app/locales/fr/common.js"; import { common } from "./common.js";
export const frConfig = { export const frConfig = {
ability: ability, ability: ability,
@ -82,6 +83,7 @@ export const frConfig = {
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,67 @@
import { StatusEffectTranslationEntries } from "#app/interfaces/locales.js";
export const statusEffect: StatusEffectTranslationEntries = {
none: {
name: "Aucun",
description: "",
obtain: "",
obtainSource: "",
activation: "",
overlap: "",
heal: ""
},
poison: {
name: "Empoisonnement",
description: "empoisonné",
obtain: "{{pokemonNameWithAffix}} est\nempoisonné !",
obtainSource: "{{pokemonNameWithAffix}} est\nempoisonné par {{sourceText}} !",
activation: "{{pokemonNameWithAffix}}\nsouffre du poison !",
overlap: "{{pokemonNameWithAffix}} est\ndéjà empoisonné.",
heal: "{{pokemonNameWithAffix}} nest\nplus empoisonné !"
},
toxic: {
name: "Empoisonnement grave",
description: "gravement empoisonné",
obtain: "{{pokemonNameWithAffix}} est\ngravement empoisonné !",
obtainSource: "{{pokemonNameWithAffix}} est\ngravement empoisonné par {{sourceText}} !",
activation: "{{pokemonNameWithAffix}}\nsouffre du poison !",
overlap: "{{pokemonNameWithAffix}} est\ndéjà empoisonné.",
heal: "{{pokemonNameWithAffix}} nest\nplus empoisonné !"
},
paralysis: {
name: "Paralysie",
description: "paralysé",
obtain: "{{pokemonNameWithAffix}} est paralysé !\nIl aura du mal à attaquer !",
obtainSource: "{{pokemonNameWithAffix}} est paralysé\npar {{sourceText}} ! Il aura du mal à attaquer !",
activation: "{{pokemonNameWithAffix}} est paralysé !\nIl na pas pu attaquer !",
overlap: "{{pokemonNameWithAffix}} est\ndéjà paralysé.",
heal: "{{pokemonNameWithAffix}} nest\nplus paralysé !"
},
sleep: {
name: "Sommeil",
description: "endormi",
obtain: "{{pokemonNameWithAffix}}\nsest endormi !",
obtainSource: "{{pokemonNameWithAffix}} est\nendormi par {{sourceText}} !",
activation: "{{pokemonNameWithAffix}}\ndort profondément.",
overlap: "{{pokemonNameWithAffix}}\ndort déjà.",
heal: "{{pokemonNameWithAffix}}\nse réveille !"
},
freeze: {
name: "Gelé",
description: "gelé",
obtain: "{{pokemonNameWithAffix}} est\ngelé !",
obtainSource: "{{pokemonNameWithAffix}} est\ngelé par {{sourceText}} !",
activation: "{{pokemonNameWithAffix}}est gelé !\nIl ne peut plus attaquer !",
overlap: "{{pokemonNameWithAffix}} est\ndéjà gelé.",
heal: "{{pokemonNameWithAffix}} nest\nplus gelé !"
},
burn: {
name: "Brulure",
description: "brulé",
obtain: "{{pokemonNameWithAffix}} est\nbrulé !",
obtainSource: "{{pokemonNameWithAffix}} est\nbrulé par {{sourceText}} !",
activation: "{{pokemonNameWithAffix}}\nsouffre de sa brulure !",
overlap: "{{pokemonNameWithAffix}} est\ndéjà brulé.",
heal: "{{pokemonNameWithAffix}} nest\nplus brulé !"
},
} as const;

View File

@ -35,13 +35,14 @@ import { pokemonInfoContainer } from "./pokemon-info-container";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "#app/locales/it/settings.js"; import { settings } from "./settings.js";
import { common } from "#app/locales/it/common.js"; import { common } from "./common.js";
export const itConfig = { export const itConfig = {
ability: ability, ability: ability,
@ -82,6 +83,7 @@ export const itConfig = {
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,67 @@
import { StatusEffectTranslationEntries } from "#app/interfaces/locales.js";
export const statusEffect: StatusEffectTranslationEntries = {
none: {
name: "None",
description: "",
obtain: "",
obtainSource: "",
activation: "",
overlap: "",
heal: ""
},
poison: {
name: "Poison",
description: "poisoning",
obtain: "{{pokemonNameWithAffix}}\nwas poisoned!",
obtainSource: "{{pokemonNameWithAffix}}\nwas poisoned by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is hurt\nby poison!",
overlap: "{{pokemonNameWithAffix}} is\nalready poisoned!",
heal: "{{pokemonNameWithAffix}} was\ncured of its poison!"
},
toxic: {
name: "Toxic",
description: "poisoning",
obtain: "{{pokemonNameWithAffix}}\nwas badly poisoned!",
obtainSource: "{{pokemonNameWithAffix}}\nwas badly poisoned by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is hurt\nby poison!",
overlap: "{{pokemonNameWithAffix}} is\nalready poisoned!",
heal: "{{pokemonNameWithAffix}} was\ncured of its poison!"
},
paralysis: {
name: "Paralysis",
description: "paralysis",
obtain: "{{pokemonNameWithAffix}} was paralyzed,\nIt may be unable to move!",
obtainSource: "{{pokemonNameWithAffix}} was paralyzed by {{sourceText}},\nIt may be unable to move!",
activation: "{{pokemonNameWithAffix}} is paralyzed!\nIt can't move!",
overlap: "{{pokemonNameWithAffix}} is\nalready paralyzed!",
heal: "{{pokemonNameWithAffix}} was\nhealed of paralysis!"
},
sleep: {
name: "Sleep",
description: "sleep",
obtain: "{{pokemonNameWithAffix}}\nfell asleep!",
obtainSource: "{{pokemonNameWithAffix}}\nfell asleep from {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is fast asleep.",
overlap: "{{pokemonNameWithAffix}} is\nalready asleep!",
heal: "{{pokemonNameWithAffix}} woke up!"
},
freeze: {
name: "Freeze",
description: "freezing",
obtain: "{{pokemonNameWithAffix}}\nwas frozen solid!",
obtainSource: "{{pokemonNameWithAffix}}\nwas frozen solid by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is\nfrozen solid!",
overlap: "{{pokemonNameWithAffix}} is\nalready frozen!",
heal: "{{pokemonNameWithAffix}} was\ndefrosted!"
},
burn: {
name: "Burn",
description: "burn",
obtain: "{{pokemonNameWithAffix}}\nwas burned!",
obtainSource: "{{pokemonNameWithAffix}}\nwas burned by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is hurt\nby its burn!",
overlap: "{{pokemonNameWithAffix}} is\nalready burned!",
heal: "{{pokemonNameWithAffix}} was\nhealed of its burn!"
},
} as const;

View File

@ -35,13 +35,14 @@ import { pokemonInfoContainer } from "./pokemon-info-container";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "#app/locales/ko/settings.js"; import { settings } from "./settings.js";
import { common } from "#app/locales/ko/common.js"; import { common } from "./common.js";
export const koConfig = { export const koConfig = {
ability: ability, ability: ability,
@ -82,6 +83,7 @@ export const koConfig = {
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,67 @@
import { StatusEffectTranslationEntries } from "#app/interfaces/locales.js";
export const statusEffect: StatusEffectTranslationEntries = {
none: {
name: "없음",
description: "",
obtain: "",
obtainSource: "",
activation: "",
overlap: "",
heal: ""
},
poison: {
name: "독",
description: "독",
obtain: "{{pokemonNameWithAffix}}의\n몸에 독이 퍼졌다!",
obtainSource: "{{pokemonNameWithAffix}}[[는]]\n{{sourceText}} 때문에 몸에 독이 퍼졌다!",
activation: "{{pokemonNameWithAffix}}[[는]]\n독에 의한 데미지를 입었다!",
overlap: "{{pokemonNameWithAffix}}[[는]] 이미\n몸에 독이 퍼진 상태다.",
heal: "{{pokemonNameWithAffix}}의 독은\n말끔하게 해독됐다!"
},
toxic: {
name: "맹독",
description: "독",
obtain: "{{pokemonNameWithAffix}}의\n몸에 맹독이 퍼졌다!",
obtainSource: "{{pokemonNameWithAffix}}[[는]]\n{{sourceText}} 때문에 몸에 맹독이 퍼졌다!",
activation: "{{pokemonNameWithAffix}}[[는]]\n독에 의한 데미지를 입었다!",
overlap: "{{pokemonNameWithAffix}}[[는]] 이미\n몸에 독이 퍼진 상태다.",
heal: "{{pokemonNameWithAffix}}의 독은\n말끔하게 해독됐다!"
},
paralysis: {
name: "마비",
description: "마비",
obtain: "{{pokemonNameWithAffix}}[[는]] 마비되어\n기술이 나오기 어려워졌다!",
obtainSource: "{{pokemonNameWithAffix}}[[는]] {{sourceText}} 때문에\n마비되어 기술이 나오기 어려워졌다!",
activation: "{{pokemonNameWithAffix}}[[는]]\n몸이 저려서 움직일 수 없다!",
overlap: "{{pokemonNameWithAffix}}[[는]]\n이미 마비되어 있다!",
heal: "{{pokemonNameWithAffix}}의\n몸저림이 풀렸다!"
},
sleep: {
name: "잠듦",
description: "잠듦",
obtain: "{{pokemonNameWithAffix}}[[는]]\n잠들어 버렸다!",
obtainSource: "{{pokemonNameWithAffix}}[[는]]\n{{sourceText}} 때문에 잠들어 버렸다!",
activation: "{{pokemonNameWithAffix}}[[는]]\n쿨쿨 잠들어 있다.",
overlap: "{{pokemonNameWithAffix}}[[는]]\n이미 잠들어 있다.",
heal: "{{pokemonNameWithAffix}}[[는]]\n눈을 떴다!"
},
freeze: {
name: "얼음",
description: "얼음",
obtain: "{{pokemonNameWithAffix}}[[는]]\n얼어붙었다!",
obtainSource: "{{pokemonNameWithAffix}}[[는]]\n{{sourceText}} 때문에 얼어붙었다!",
activation: "{{pokemonNameWithAffix}}[[는]]\n얼어 버려서 움직일 수 없다!",
overlap: "{{pokemonNameWithAffix}}[[는]]\n이미 얼어 있다.",
heal: "{{pokemonNameWithAffix}}의\n얼음 상태가 나았다!"
},
burn: {
name: "화상",
description: "화상",
obtain: "{{pokemonNameWithAffix}}[[는]]\n화상을 입었다!",
obtainSource: "{{pokemonNameWithAffix}}[[는]]\n{{sourceText}} 때문에 화상을 입었다!",
activation: "{{pokemonNameWithAffix}}[[는]]\n화상 데미지를 입었다!",
overlap: "{{pokemonNameWithAffix}}[[는]] 이미\n화상을 입은 상태다.",
heal: "{{pokemonNameWithAffix}}의\n화상이 나았다!"
},
} as const;

View File

@ -1,5 +1,3 @@
import { common } from "#app/locales/pt_BR/common.js";
import { settings } from "#app/locales/pt_BR/settings.js";
import { ability } from "./ability"; import { ability } from "./ability";
import { abilityTriggers } from "./ability-trigger"; import { abilityTriggers } from "./ability-trigger";
import { PGFachv, PGMachv } from "./achv"; import { PGFachv, PGMachv } from "./achv";
@ -30,7 +28,6 @@ import { menuUiHandler } from "./menu-ui-handler";
import { modifierType } from "./modifier-type"; import { modifierType } from "./modifier-type";
import { move } from "./move"; import { move } from "./move";
import { nature } from "./nature"; import { nature } from "./nature";
import { partyUiHandler } from "./party-ui-handler";
import { pokeball } from "./pokeball"; import { pokeball } from "./pokeball";
import { pokemon } from "./pokemon"; import { pokemon } from "./pokemon";
import { pokemonInfo } from "./pokemon-info"; import { pokemonInfo } from "./pokemon-info";
@ -38,10 +35,14 @@ import { pokemonInfoContainer } from "./pokemon-info-container";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler";
import { settings } from "./settings.js";
import { common } from "./common.js";
export const ptBrConfig = { export const ptBrConfig = {
ability: ability, ability: ability,
@ -80,6 +81,7 @@ export const ptBrConfig = {
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
statusEffect: statusEffect,
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,

View File

@ -0,0 +1,67 @@
import { StatusEffectTranslationEntries } from "#app/interfaces/locales.js";
export const statusEffect: StatusEffectTranslationEntries = {
none: {
name: "Nenhum",
description: "",
obtain: "",
obtainSource: "",
activation: "",
overlap: "",
heal: ""
},
poison: {
name: "Envenenamento",
description: "envenenamento",
obtain: "{{pokemonNameWithAffix}}\nfoi envenenado!",
obtainSource: "{{pokemonNameWithAffix}}\nfoi envenenado por {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} foi ferido\ncom o veneno!",
overlap: "{{pokemonNameWithAffix}} já\nestá envenenado!",
heal: "{{pokemonNameWithAffix}} se\ncurou do envenenamento!"
},
toxic: {
name: "Toxic",
description: "envenenamento",
obtain: "{{pokemonNameWithAffix}}\nfoi seriamente envenenado!",
obtainSource: "{{pokemonNameWithAffix}} foi seriamente\nenvenenado por {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} foi ferido\ncom o veneno!",
overlap: "{{pokemonNameWithAffix}} já\nestá envenenado!",
heal: "{{pokemonNameWithAffix}} se\ncurou do envenenamento!"
},
paralysis: {
name: "Paralisia",
description: "paralisia",
obtain: "{{pokemonNameWithAffix}} foi paralisado,\nTalvez ele não consiga se mover!",
obtainSource: "{{pokemonNameWithAffix}} foi paralisado por {{sourceText}},\nTalvez ele não consiga se mover!",
activation: "{{pokemonNameWithAffix}} está paralisado!\nEle não consegue se mover!",
overlap: "{{pokemonNameWithAffix}} já\nestá paralisado!",
heal: "{{pokemonNameWithAffix}} foi\ncurado da paralisia!"
},
sleep: {
name: "Dormindo",
description: "dormindo",
obtain: "{{pokemonNameWithAffix}}\nadormeceu!",
obtainSource: "{{pokemonNameWithAffix}}\ndormiu devido a {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} está dormindo profundamente.",
overlap: "{{pokemonNameWithAffix}} já\nestá dormindo!",
heal: "{{pokemonNameWithAffix}} acordou!"
},
freeze: {
name: "Congelamento",
description: "congelando",
obtain: "{{pokemonNameWithAffix}}\nfoi congelado!",
obtainSource: "{{pokemonNameWithAffix}}\nfoi congelado por {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} está\ncongelado!",
overlap: "{{pokemonNameWithAffix}} já\nestá congelado!",
heal: "{{pokemonNameWithAffix}} foi\ndescongelado!"
},
burn: {
name: "Queimadura",
description: "queimadura",
obtain: "{{pokemonNameWithAffix}}\nfoi queimado!",
obtainSource: "{{pokemonNameWithAffix}}\nfoi queimado por {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} foi ferido\npor sua queimadura!",
overlap: "{{pokemonNameWithAffix}} já\nestá queimado!",
heal: "{{pokemonNameWithAffix}} foi\ncurado de sua queimadura!"
},
} as const;

View File

@ -35,13 +35,14 @@ import { pokemonInfoContainer } from "./pokemon-info-container";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "#app/locales/zh_CN/settings.js"; import { settings } from "./settings.js";
import { common } from "#app/locales/zh_CN/common.js"; import { common } from "./common.js";
export const zhCnConfig = { export const zhCnConfig = {
ability: ability, ability: ability,
@ -82,6 +83,7 @@ export const zhCnConfig = {
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,67 @@
import { StatusEffectTranslationEntries } from "#app/interfaces/locales.js";
export const statusEffect: StatusEffectTranslationEntries = {
none: {
name: "无",
description: "",
obtain: "",
obtainSource: "",
activation: "",
overlap: "",
heal: ""
},
poison: {
name: "中毒",
description: "中毒",
obtain: "{{pokemonNameWithAffix}}中毒了!",
obtainSource: "{{pokemonNameWithAffix}}因{{sourceText}}中毒了!",
activation: "{{pokemonNameWithAffix}}受到了毒的伤害!",
overlap: "{{pokemonNameWithAffix}}已经中毒了!",
heal: "{{pokemonNameWithAffix}}中的毒彻底清除了!"
},
toxic: {
name: "剧毒",
description: "中毒",
obtain: "{{pokemonNameWithAffix}}中了剧毒!",
obtainSource: "{{pokemonNameWithAffix}}因{{sourceText}}中了剧毒!",
activation: "{{pokemonNameWithAffix}}受到了毒的伤害!",
overlap: "{{pokemonNameWithAffix}}已经中毒了!",
heal: "{{pokemonNameWithAffix}}中的毒彻底清除了!"
},
paralysis: {
name: "麻痹",
description: "麻痹",
obtain: "{{pokemonNameWithAffix}}麻痹了,很难使出招式!",
obtainSource: "{{pokemonNameWithAffix}}被{{sourceText}}麻痹了,很难使出招式!",
activation: "{{pokemonNameWithAffix}}因身体麻痹而无法行动!",
overlap: "{{pokemonNameWithAffix}}已经麻痹了!",
heal: "{{pokemonNameWithAffix}}的麻痹治愈了!"
},
sleep: {
name: "睡眠",
description: "睡眠",
obtain: "{{pokemonNameWithAffix}}睡着了!",
obtainSource: "{{pokemonNameWithAffix}}因{{sourceText}}睡着了!",
activation: "{{pokemonNameWithAffix}}正在呼呼大睡。",
overlap: "{{pokemonNameWithAffix}}已经睡着了!",
heal: "{{pokemonNameWithAffix}}醒了!"
},
freeze: {
name: "冰冻",
description: "冰冻",
obtain: "{{pokemonNameWithAffix}}冻住了!",
obtainSource: "{{pokemonNameWithAffix}}因{{sourceText}}冻住了!",
activation: "{{pokemonNameWithAffix}}因冻住了而无法行动!",
overlap: "{{pokemonNameWithAffix}}已经冻住了!",
heal: "{{pokemonNameWithAffix}}治愈了冰冻状态!"
},
burn: {
name: "灼伤",
description: "灼伤",
obtain: "{{pokemonNameWithAffix}}被灼伤了!",
obtainSource: "{{pokemonNameWithAffix}}因{{sourceText}}被灼伤了!",
activation: "{{pokemonNameWithAffix}}受到了灼伤的伤害!",
overlap: "{{pokemonNameWithAffix}}已经被灼伤了!",
heal: "{{pokemonNameWithAffix}}的灼伤治愈了!"
},
} as const;

View File

@ -35,13 +35,14 @@ import { pokemonInfoContainer } from "./pokemon-info-container";
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler"; import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
import { splashMessages } from "./splash-messages"; import { splashMessages } from "./splash-messages";
import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "#app/locales/zh_TW/settings.js"; import { settings } from "./settings.js";
import { common } from "#app/locales/zh_TW/common.js"; import { common } from "./common.js";
export const zhTwConfig = { export const zhTwConfig = {
ability: ability, ability: ability,
@ -82,6 +83,7 @@ export const zhTwConfig = {
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,67 @@
import { StatusEffectTranslationEntries } from "#app/interfaces/locales.js";
export const statusEffect: StatusEffectTranslationEntries = {
none: {
name: "None",
description: "",
obtain: "",
obtainSource: "",
activation: "",
overlap: "",
heal: ""
},
poison: {
name: "Poison",
description: "poisoning",
obtain: "{{pokemonNameWithAffix}}\nwas poisoned!",
obtainSource: "{{pokemonNameWithAffix}}\nwas poisoned by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is hurt\nby poison!",
overlap: "{{pokemonNameWithAffix}} is\nalready poisoned!",
heal: "{{pokemonNameWithAffix}} was\ncured of its poison!"
},
toxic: {
name: "Toxic",
description: "poisoning",
obtain: "{{pokemonNameWithAffix}}\nwas badly poisoned!",
obtainSource: "{{pokemonNameWithAffix}}\nwas badly poisoned by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is hurt\nby poison!",
overlap: "{{pokemonNameWithAffix}} is\nalready poisoned!",
heal: "{{pokemonNameWithAffix}} was\ncured of its poison!"
},
paralysis: {
name: "Paralysis",
description: "paralysis",
obtain: "{{pokemonNameWithAffix}} was paralyzed,\nIt may be unable to move!",
obtainSource: "{{pokemonNameWithAffix}} was paralyzed by {{sourceText}},\nIt may be unable to move!",
activation: "{{pokemonNameWithAffix}} is paralyzed!\nIt can't move!",
overlap: "{{pokemonNameWithAffix}} is\nalready paralyzed!",
heal: "{{pokemonNameWithAffix}} was\nhealed of paralysis!"
},
sleep: {
name: "Sleep",
description: "sleep",
obtain: "{{pokemonNameWithAffix}}\nfell asleep!",
obtainSource: "{{pokemonNameWithAffix}}\nfell asleep from {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is fast asleep.",
overlap: "{{pokemonNameWithAffix}} is\nalready asleep!",
heal: "{{pokemonNameWithAffix}} woke up!"
},
freeze: {
name: "Freeze",
description: "freezing",
obtain: "{{pokemonNameWithAffix}}\nwas frozen solid!",
obtainSource: "{{pokemonNameWithAffix}}\nwas frozen solid by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is\nfrozen solid!",
overlap: "{{pokemonNameWithAffix}} is\nalready frozen!",
heal: "{{pokemonNameWithAffix}} was\ndefrosted!"
},
burn: {
name: "Burn",
description: "burn",
obtain: "{{pokemonNameWithAffix}}\nwas burned!",
obtainSource: "{{pokemonNameWithAffix}}\nwas burned by {{sourceText}}!",
activation: "{{pokemonNameWithAffix}} is hurt\nby its burn!",
overlap: "{{pokemonNameWithAffix}} is\nalready burned!",
heal: "{{pokemonNameWithAffix}} was\nhealed of its burn!"
},
} as const;

View File

@ -9,7 +9,7 @@ import { addTextObject, TextStyle } from "../ui/text";
import { Type } from "../data/type"; import { Type } from "../data/type";
import { EvolutionPhase } from "../evolution-phase"; import { EvolutionPhase } from "../evolution-phase";
import { FusionSpeciesFormEvolution, pokemonEvolutions, pokemonPrevolutions } from "../data/pokemon-evolutions"; import { FusionSpeciesFormEvolution, pokemonEvolutions, pokemonPrevolutions } from "../data/pokemon-evolutions";
import { getPokemonMessage } from "../messages"; import {getPokemonMessage, getPokemonNameWithAffix} from "../messages";
import * as Utils from "../utils"; import * as Utils from "../utils";
import { TempBattleStat } from "../data/temp-battle-stat"; import { TempBattleStat } from "../data/temp-battle-stat";
import { getBerryEffectFunc, getBerryPredicate } from "../data/berry"; import { getBerryEffectFunc, getBerryPredicate } from "../data/berry";
@ -2469,7 +2469,7 @@ export class EnemyStatusEffectHealChanceModifier extends EnemyPersistentModifier
apply(args: any[]): boolean { apply(args: any[]): boolean {
const target = (args[0] as Pokemon); const target = (args[0] as Pokemon);
if (target.status && Phaser.Math.RND.realInRange(0, 1) < (this.chance * this.getStackCount())) { if (target.status && Phaser.Math.RND.realInRange(0, 1) < (this.chance * this.getStackCount())) {
target.scene.queueMessage(getPokemonMessage(target, getStatusEffectHealText(target.status.effect))); target.scene.queueMessage(getStatusEffectHealText(target.status.effect, getPokemonNameWithAffix(target)));
target.resetStatus(); target.resetStatus();
target.updateInfo(); target.updateInfo();
return true; return true;

View File

@ -2781,12 +2781,12 @@ export class MovePhase extends BattlePhase {
} }
if (activated) { if (activated) {
this.scene.queueMessage(getPokemonMessage(this.pokemon, getStatusEffectActivationText(this.pokemon.status.effect))); this.scene.queueMessage(getStatusEffectActivationText(this.pokemon.status.effect, getPokemonNameWithAffix(this.pokemon)));
this.scene.unshiftPhase(new CommonAnimPhase(this.scene, this.pokemon.getBattlerIndex(), undefined, CommonAnim.POISON + (this.pokemon.status.effect - 1))); this.scene.unshiftPhase(new CommonAnimPhase(this.scene, this.pokemon.getBattlerIndex(), undefined, CommonAnim.POISON + (this.pokemon.status.effect - 1)));
doMove(); doMove();
} else { } else {
if (healed) { if (healed) {
this.scene.queueMessage(getPokemonMessage(this.pokemon, getStatusEffectHealText(this.pokemon.status.effect))); this.scene.queueMessage(getStatusEffectHealText(this.pokemon.status.effect, getPokemonNameWithAffix(this.pokemon)));
this.pokemon.resetStatus(); this.pokemon.resetStatus();
this.pokemon.updateInfo(); this.pokemon.updateInfo();
} }
@ -3506,7 +3506,7 @@ export class ObtainStatusEffectPhase extends PokemonPhase {
} }
pokemon.updateInfo(true); pokemon.updateInfo(true);
new CommonBattleAnim(CommonAnim.POISON + (this.statusEffect - 1), pokemon).play(this.scene, () => { new CommonBattleAnim(CommonAnim.POISON + (this.statusEffect - 1), pokemon).play(this.scene, () => {
this.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectObtainText(this.statusEffect, this.sourceText))); this.scene.queueMessage(getStatusEffectObtainText(this.statusEffect, getPokemonNameWithAffix(pokemon), this.sourceText));
if (pokemon.status.isPostTurn()) { if (pokemon.status.isPostTurn()) {
this.scene.pushPhase(new PostTurnStatusEffectPhase(this.scene, this.battlerIndex)); this.scene.pushPhase(new PostTurnStatusEffectPhase(this.scene, this.battlerIndex));
} }
@ -3515,7 +3515,7 @@ export class ObtainStatusEffectPhase extends PokemonPhase {
return; return;
} }
} else if (pokemon.status.effect === this.statusEffect) { } else if (pokemon.status.effect === this.statusEffect) {
this.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectOverlapText(this.statusEffect))); this.scene.queueMessage(getStatusEffectOverlapText(this.statusEffect, getPokemonNameWithAffix(pokemon)));
} }
this.end(); this.end();
} }
@ -3535,7 +3535,7 @@ export class PostTurnStatusEffectPhase extends PokemonPhase {
applyAbAttrs(BlockStatusDamageAbAttr, pokemon, cancelled); applyAbAttrs(BlockStatusDamageAbAttr, pokemon, cancelled);
if (!cancelled.value) { if (!cancelled.value) {
this.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectActivationText(pokemon.status.effect))); this.scene.queueMessage(getStatusEffectActivationText(pokemon.status.effect, getPokemonNameWithAffix(pokemon)));
let damage: integer = 0; let damage: integer = 0;
switch (pokemon.status.effect) { switch (pokemon.status.effect) {
case StatusEffect.POISON: case StatusEffect.POISON:
@ -4757,7 +4757,7 @@ export class PokemonHealPhase extends CommonAnimPhase {
} }
if (this.healStatus && lastStatusEffect && !hasMessage) { if (this.healStatus && lastStatusEffect && !hasMessage) {
this.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectHealText(lastStatusEffect))); this.scene.queueMessage(getStatusEffectHealText(lastStatusEffect, getPokemonNameWithAffix(pokemon)));
} }
if (!healOrDamage && !lastStatusEffect) { if (!healOrDamage && !lastStatusEffect) {

View File

@ -15,6 +15,7 @@ import {StatusEffect} from "#app/data/status-effect";
import { Abilities } from "#enums/abilities"; import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import i18next, { initI18n } from "#app/plugins/i18n";
describe("Items - Toxic orb", () => { describe("Items - Toxic orb", () => {
@ -48,6 +49,8 @@ describe("Items - Toxic orb", () => {
}); });
it("TOXIC ORB", async() => { it("TOXIC ORB", async() => {
initI18n();
i18next.changeLanguage("en");
const moveToUse = Moves.GROWTH; const moveToUse = Moves.GROWTH;
await game.startBattle([ await game.startBattle([
Species.MIGHTYENA, Species.MIGHTYENA,

View File

@ -0,0 +1,301 @@
import { beforeAll, describe, expect, it, vi } from "vitest";
import {
StatusEffect,
getStatusEffectActivationText,
getStatusEffectDescriptor,
getStatusEffectHealText,
getStatusEffectObtainText,
getStatusEffectOverlapText,
} from "#app/data/status-effect";
import i18next, { ParseKeys } from "i18next";
import { afterEach } from "node:test";
const tMock = (key: ParseKeys) => key;
const pokemonName = "PKM";
const sourceText = "SOURCE";
describe("status-effect", () => {
beforeAll(() => {
i18next.init();
});
describe("NONE", () => {
const statusEffect = StatusEffect.NONE;
it("should return the obtain text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectObtainText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:none.obtain");
const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, "");
expect(emptySourceText).toBe("statusEffect:none.obtain");
});
it("should return the source-obtain text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectObtainText(statusEffect, pokemonName, sourceText);
expect(text).toBe("statusEffect:none.obtainSource");
const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, "");
expect(emptySourceText).not.toBe("statusEffect:none.obtainSource");
});
it("should return the activation text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectActivationText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:none.activation");
});
it("should return the overlap text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectOverlapText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:none.overlap");
});
it("should return the heal text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectHealText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:none.heal");
});
it("should return the descriptor", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectDescriptor(statusEffect);
expect(text).toBe("statusEffect:none.description");
});
});
describe("POISON", () => {
const statusEffect = StatusEffect.POISON;
it("should return the obtain text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectObtainText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:poison.obtain");
const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, "");
expect(emptySourceText).toBe("statusEffect:poison.obtain");
});
it("should return the activation text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectActivationText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:poison.activation");
});
it("should return the descriptor", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectDescriptor(statusEffect);
expect(text).toBe("statusEffect:poison.description");
});
it("should return the heal text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectHealText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:poison.heal");
});
it("should return the overlap text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectOverlapText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:poison.overlap");
});
});
describe("TOXIC", () => {
const statusEffect = StatusEffect.TOXIC;
it("should return the obtain text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectObtainText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:toxic.obtain");
const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, "");
expect(emptySourceText).toBe("statusEffect:toxic.obtain");
});
it("should return the activation text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectActivationText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:toxic.activation");
});
it("should return the descriptor", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectDescriptor(statusEffect);
expect(text).toBe("statusEffect:toxic.description");
});
it("should return the heal text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectHealText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:toxic.heal");
});
it("should return the overlap text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectOverlapText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:toxic.overlap");
});
});
describe("PARALYSIS", () => {
const statusEffect = StatusEffect.PARALYSIS;
it("should return the obtain text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectObtainText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:paralysis.obtain");
const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, "");
expect(emptySourceText).toBe("statusEffect:paralysis.obtain");
});
it("should return the activation text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectActivationText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:paralysis.activation");
});
it("should return the descriptor", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectDescriptor(statusEffect);
expect(text).toBe("statusEffect:paralysis.description");
});
it("should return the heal text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectHealText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:paralysis.heal");
});
it("should return the overlap text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectOverlapText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:paralysis.overlap");
});
});
describe("SLEEP", () => {
const statusEffect = StatusEffect.SLEEP;
it("should return the obtain text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectObtainText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:sleep.obtain");
const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, "");
expect(emptySourceText).toBe("statusEffect:sleep.obtain");
});
it("should return the activation text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectActivationText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:sleep.activation");
});
it("should return the descriptor", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectDescriptor(statusEffect);
expect(text).toBe("statusEffect:sleep.description");
});
it("should return the heal text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectHealText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:sleep.heal");
});
it("should return the overlap text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectOverlapText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:sleep.overlap");
});
});
describe("FREEZE", () => {
const statusEffect = StatusEffect.FREEZE;
it("should return the obtain text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectObtainText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:freeze.obtain");
const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, "");
expect(emptySourceText).toBe("statusEffect:freeze.obtain");
});
it("should return the activation text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectActivationText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:freeze.activation");
});
it("should return the descriptor", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectDescriptor(statusEffect);
expect(text).toBe("statusEffect:freeze.description");
});
it("should return the heal text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectHealText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:freeze.heal");
});
it("should return the overlap text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectOverlapText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:freeze.overlap");
});
});
describe("BURN", () => {
const statusEffect = StatusEffect.BURN;
it("should return the obtain text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectObtainText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:burn.obtain");
const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, "");
expect(emptySourceText).toBe("statusEffect:burn.obtain");
});
it("should return the activation text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectActivationText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:burn.activation");
});
it("should return the descriptor", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectDescriptor(statusEffect);
expect(text).toBe("statusEffect:burn.description");
});
it("should return the heal text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectHealText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:burn.heal");
});
it("should return the overlap text", () => {
vi.spyOn(i18next, "t").mockImplementation(tMock);
const text = getStatusEffectOverlapText(statusEffect, pokemonName);
expect(text).toBe("statusEffect:burn.overlap");
});
});
afterEach(() => {
vi.resetAllMocks();
});
});