From 2ccb48093009af37b2d263c892b743a9f38ac8fd Mon Sep 17 00:00:00 2001 From: Enoch Date: Mon, 8 Jul 2024 23:21:50 +0900 Subject: [PATCH] [Localization] localize modifier.ts apply event message & translate in Korean (#2882) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * localize modifier apply event message * modify korean postposition * Update src/locales/pt_BR/modifier.ts Co-authored-by: José Ricardo Fleury Oliveira * Update src/locales/zh_CN/modifier.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_TW/modifier.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/de/modifier.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * aUpdate src/locales/fr/modifier.ts Co-authored-by: Lugiad' * Update src/locales/fr/modifier.ts Co-authored-by: Lugiad' * Update src/locales/pt_BR/modifier.ts Co-authored-by: José Ricardo Fleury Oliveira * Update src/locales/pt_BR/modifier.ts Co-authored-by: José Ricardo Fleury Oliveira * Update src/locales/pt_BR/modifier.ts Co-authored-by: José Ricardo Fleury Oliveira * Update src/locales/fr/modifier.ts Co-authored-by: Lugiad' --------- Co-authored-by: José Ricardo Fleury Oliveira Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' --- src/locales/de/config.ts | 2 ++ src/locales/de/modifier.ts | 12 ++++++++++++ src/locales/en/config.ts | 2 ++ src/locales/en/modifier.ts | 12 ++++++++++++ src/locales/es/config.ts | 2 ++ src/locales/es/modifier.ts | 12 ++++++++++++ src/locales/fr/config.ts | 2 ++ src/locales/fr/modifier.ts | 12 ++++++++++++ src/locales/it/config.ts | 2 ++ src/locales/it/modifier.ts | 12 ++++++++++++ src/locales/ko/config.ts | 2 ++ src/locales/ko/modifier.ts | 12 ++++++++++++ src/locales/pt_BR/config.ts | 2 ++ src/locales/pt_BR/modifier.ts | 12 ++++++++++++ src/locales/zh_CN/config.ts | 2 ++ src/locales/zh_CN/modifier.ts | 12 ++++++++++++ src/locales/zh_TW/config.ts | 2 ++ src/locales/zh_TW/modifier.ts | 12 ++++++++++++ src/modifier/modifier.ts | 20 ++++++++++++-------- 19 files changed, 138 insertions(+), 8 deletions(-) create mode 100644 src/locales/de/modifier.ts create mode 100644 src/locales/en/modifier.ts create mode 100644 src/locales/es/modifier.ts create mode 100644 src/locales/fr/modifier.ts create mode 100644 src/locales/it/modifier.ts create mode 100644 src/locales/ko/modifier.ts create mode 100644 src/locales/pt_BR/modifier.ts create mode 100644 src/locales/zh_CN/modifier.ts create mode 100644 src/locales/zh_TW/modifier.ts diff --git a/src/locales/de/config.ts b/src/locales/de/config.ts index 3c16f81270d..ffbb2733205 100644 --- a/src/locales/de/config.ts +++ b/src/locales/de/config.ts @@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler"; import { growth } from "./growth"; import { menu } from "./menu"; import { menuUiHandler } from "./menu-ui-handler"; +import { modifier } from "./modifier"; import { modifierType } from "./modifier-type"; import { move } from "./move"; import { nature } from "./nature"; @@ -73,6 +74,7 @@ export const deConfig = { growth: growth, menu: menu, menuUiHandler: menuUiHandler, + modifier: modifier, modifierType: modifierType, move: move, nature: nature, diff --git a/src/locales/de/modifier.ts b/src/locales/de/modifier.ts new file mode 100644 index 00000000000..c1a282ee5f1 --- /dev/null +++ b/src/locales/de/modifier.ts @@ -0,0 +1,12 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const modifier: SimpleTranslationEntries = { + "surviveDamageApply": "{{pokemonNameWithAffix}} hält mithilfe des Items {{typeName}} durch!", + "turnHealApply": "{{typeName}} von {{pokemonNameWithAffix}} füllt einige KP auf!", + "hitHealApply": "{{typeName}} von {{pokemonNameWithAffix}} füllt einige KP auf!", + "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} wurde durch {{typeName}} wiederbelebt!", + "moneyInterestApply": "Du erhählst {{moneyAmount}} ₽ durch das Item {{typeName}}!", + "turnHeldItemTransferApply": "{{itemName}} von {{pokemonNameWithAffix}} wurde durch {{typeName}} von {{pokemonName}} absorbiert!", + "contactHeldItemTransferApply": "{{itemName}} von {{pokemonNameWithAffix}} wurde durch {{typeName}} von {{pokemonName}} geklaut!", + "enemyTurnHealApply": "{{pokemonNameWithAffix}} stellt einige KP wieder her!", +} as const; diff --git a/src/locales/en/config.ts b/src/locales/en/config.ts index b0c1b7a7105..1c5449a2e88 100644 --- a/src/locales/en/config.ts +++ b/src/locales/en/config.ts @@ -27,6 +27,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler"; import { growth } from "./growth"; import { menu } from "./menu"; import { menuUiHandler } from "./menu-ui-handler"; +import { modifier } from "./modifier"; import { modifierType } from "./modifier-type"; import { move } from "./move"; import { nature } from "./nature"; @@ -73,6 +74,7 @@ export const enConfig = { growth: growth, menu: menu, menuUiHandler: menuUiHandler, + modifier: modifier, modifierType: modifierType, move: move, nature: nature, diff --git a/src/locales/en/modifier.ts b/src/locales/en/modifier.ts new file mode 100644 index 00000000000..d3da4c2150b --- /dev/null +++ b/src/locales/en/modifier.ts @@ -0,0 +1,12 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const modifier: SimpleTranslationEntries = { + "surviveDamageApply": "{{pokemonNameWithAffix}} hung on\nusing its {{typeName}}!", + "turnHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!", + "hitHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!", + "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} was revived\nby its {{typeName}}!", + "moneyInterestApply": "You received interest of ₽{{moneyAmount}}\nfrom the {{typeName}}!", + "turnHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was absorbed\nby {{pokemonName}}'s {{typeName}}!", + "contactHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was snatched\nby {{pokemonName}}'s {{typeName}}!", + "enemyTurnHealApply": "{{pokemonNameWithAffix}}\nrestored some HP!", +} as const; diff --git a/src/locales/es/config.ts b/src/locales/es/config.ts index c37f96a2aa5..341fafa4ca9 100644 --- a/src/locales/es/config.ts +++ b/src/locales/es/config.ts @@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler"; import { growth } from "./growth"; import { menu } from "./menu"; import { menuUiHandler } from "./menu-ui-handler"; +import { modifier } from "./modifier"; import { modifierType } from "./modifier-type"; import { move } from "./move"; import { nature } from "./nature"; @@ -73,6 +74,7 @@ export const esConfig = { growth: growth, menu: menu, menuUiHandler: menuUiHandler, + modifier: modifier, modifierType: modifierType, move: move, nature: nature, diff --git a/src/locales/es/modifier.ts b/src/locales/es/modifier.ts new file mode 100644 index 00000000000..d3da4c2150b --- /dev/null +++ b/src/locales/es/modifier.ts @@ -0,0 +1,12 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const modifier: SimpleTranslationEntries = { + "surviveDamageApply": "{{pokemonNameWithAffix}} hung on\nusing its {{typeName}}!", + "turnHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!", + "hitHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!", + "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} was revived\nby its {{typeName}}!", + "moneyInterestApply": "You received interest of ₽{{moneyAmount}}\nfrom the {{typeName}}!", + "turnHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was absorbed\nby {{pokemonName}}'s {{typeName}}!", + "contactHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was snatched\nby {{pokemonName}}'s {{typeName}}!", + "enemyTurnHealApply": "{{pokemonNameWithAffix}}\nrestored some HP!", +} as const; diff --git a/src/locales/fr/config.ts b/src/locales/fr/config.ts index af18aab3400..d8f9a6601c1 100644 --- a/src/locales/fr/config.ts +++ b/src/locales/fr/config.ts @@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler"; import { growth } from "./growth"; import { menu } from "./menu"; import { menuUiHandler } from "./menu-ui-handler"; +import { modifier } from "./modifier"; import { modifierType } from "./modifier-type"; import { move } from "./move"; import { nature } from "./nature"; @@ -73,6 +74,7 @@ export const frConfig = { growth: growth, menu: menu, menuUiHandler: menuUiHandler, + modifier: modifier, modifierType: modifierType, move: move, nature: nature, diff --git a/src/locales/fr/modifier.ts b/src/locales/fr/modifier.ts new file mode 100644 index 00000000000..f215e258a76 --- /dev/null +++ b/src/locales/fr/modifier.ts @@ -0,0 +1,12 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const modifier: SimpleTranslationEntries = { + "surviveDamageApply": "{{pokemonNameWithAffix}} tient bon\ngrâce à son {{typeName}} !", + "turnHealApply": "Les PV de {{pokemonNameWithAffix}}\nsont un peu restaurés par les {{typeName}} !", + "hitHealApply": "Les PV de {{pokemonNameWithAffix}}\nsont un peu restaurés par le {{typeName}} !", + "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} a repris connaissance\navec sa {{typeName}} et est prêt à se battre de nouveau !", + "moneyInterestApply": "La {{typeName}} vous rapporte\n{{moneyAmount}} ₽ d’intérêts !", + "turnHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} est absorbé·e\npar le {{typeName}} de {{pokemonName}} !", + "contactHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} est volé·e\npar l’{{typeName}} de {{pokemonName}} !", + "enemyTurnHealApply": "{{pokemonNameWithAffix}}\nrestaure un peu ses PV !", +} as const; diff --git a/src/locales/it/config.ts b/src/locales/it/config.ts index ac77e814623..5b370b00e4b 100644 --- a/src/locales/it/config.ts +++ b/src/locales/it/config.ts @@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler"; import { growth } from "./growth"; import { menu } from "./menu"; import { menuUiHandler } from "./menu-ui-handler"; +import { modifier } from "./modifier"; import { modifierType } from "./modifier-type"; import { move } from "./move"; import { nature } from "./nature"; @@ -73,6 +74,7 @@ export const itConfig = { growth: growth, menu: menu, menuUiHandler: menuUiHandler, + modifier: modifier, modifierType: modifierType, move: move, nature: nature, diff --git a/src/locales/it/modifier.ts b/src/locales/it/modifier.ts new file mode 100644 index 00000000000..d3da4c2150b --- /dev/null +++ b/src/locales/it/modifier.ts @@ -0,0 +1,12 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const modifier: SimpleTranslationEntries = { + "surviveDamageApply": "{{pokemonNameWithAffix}} hung on\nusing its {{typeName}}!", + "turnHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!", + "hitHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!", + "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} was revived\nby its {{typeName}}!", + "moneyInterestApply": "You received interest of ₽{{moneyAmount}}\nfrom the {{typeName}}!", + "turnHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was absorbed\nby {{pokemonName}}'s {{typeName}}!", + "contactHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was snatched\nby {{pokemonName}}'s {{typeName}}!", + "enemyTurnHealApply": "{{pokemonNameWithAffix}}\nrestored some HP!", +} as const; diff --git a/src/locales/ko/config.ts b/src/locales/ko/config.ts index fa81dee55ab..5b29a46c044 100644 --- a/src/locales/ko/config.ts +++ b/src/locales/ko/config.ts @@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler"; import { growth } from "./growth"; import { menu } from "./menu"; import { menuUiHandler } from "./menu-ui-handler"; +import { modifier } from "./modifier"; import { modifierType } from "./modifier-type"; import { move } from "./move"; import { nature } from "./nature"; @@ -73,6 +74,7 @@ export const koConfig = { growth: growth, menu: menu, menuUiHandler: menuUiHandler, + modifier: modifier, modifierType: modifierType, move: move, nature: nature, diff --git a/src/locales/ko/modifier.ts b/src/locales/ko/modifier.ts new file mode 100644 index 00000000000..c61d2b3def0 --- /dev/null +++ b/src/locales/ko/modifier.ts @@ -0,0 +1,12 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const modifier: SimpleTranslationEntries = { + "surviveDamageApply": "{{pokemonNameWithAffix}}[[는]]\n{{typeName}}[[로]] 버텼다!!", + "turnHealApply": "{{pokemonNameWithAffix}}[[는]]\n{{typeName}}[[로]] 인해 조금 회복했다.", + "hitHealApply": "{{pokemonNameWithAffix}}[[는]]\n{{typeName}}[[로]] 인해 조금 회복했다.", + "pokemonInstantReviveApply": "{{pokemonNameWithAffix}}[[는]] {{typeName}}[[로]]\n정신을 차려 싸울 수 있게 되었다!", + "moneyInterestApply": "{{typeName}}[[로]]부터\n₽{{moneyAmount}}[[를]] 받았다!", + "turnHeldItemTransferApply": "{{pokemonName}}의 {{typeName}}[[는]]\n{{pokemonNameWithAffix}}의 {{itemName}}[[를]] 흡수했다!", + "contactHeldItemTransferApply": "{{pokemonName}}의 {{typeName}}[[는]]\n{{pokemonNameWithAffix}}의 {{itemName}}[[를]] 가로챘다!", + "enemyTurnHealApply": "{{pokemonNameWithAffix}}의\n체력이 약간 회복되었다!", +} as const; diff --git a/src/locales/pt_BR/config.ts b/src/locales/pt_BR/config.ts index 4b3649f96ad..c02da112770 100644 --- a/src/locales/pt_BR/config.ts +++ b/src/locales/pt_BR/config.ts @@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler"; import { growth } from "./growth"; import { menu } from "./menu"; import { menuUiHandler } from "./menu-ui-handler"; +import { modifier } from "./modifier"; import { modifierType } from "./modifier-type"; import { move } from "./move"; import { nature } from "./nature"; @@ -73,6 +74,7 @@ export const ptBrConfig = { growth: growth, menu: menu, menuUiHandler: menuUiHandler, + modifier: modifier, modifierType: modifierType, move: move, nature: nature, diff --git a/src/locales/pt_BR/modifier.ts b/src/locales/pt_BR/modifier.ts new file mode 100644 index 00000000000..7cc90df5caa --- /dev/null +++ b/src/locales/pt_BR/modifier.ts @@ -0,0 +1,12 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const modifier: SimpleTranslationEntries = { + "surviveDamageApply": "{{pokemonNameWithAffix}} aguentou o tranco\nusando sua {{typeName}}!", + "turnHealApply": "{{pokemonNameWithAffix}} restaurou um pouco de PS usando\nsuas {{typeName}}!", + "hitHealApply": "{{pokemonNameWithAffix}} restaurou um pouco de PS usando\nsua {{typeName}}!", + "pokemonInstantReviveApply": "{{pokemonNameWithAffix}} foi revivido\npor sua {{typeName}}!", + "moneyInterestApply": "Você recebeu um juros de ₽{{moneyAmount}}\nde sua {{typeName}}!", + "turnHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} foi absorvido(a)\npelo {{typeName}} de {{pokemonName}}!", + "contactHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} foi pego(a)\npela {{typeName}} de {{pokemonName}}!", + "enemyTurnHealApply": "{{pokemonNameWithAffix}}\nrestaurou um pouco de seus PS!", +} as const; diff --git a/src/locales/zh_CN/config.ts b/src/locales/zh_CN/config.ts index b55b2aa865c..eaf7ba4cc09 100644 --- a/src/locales/zh_CN/config.ts +++ b/src/locales/zh_CN/config.ts @@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler"; import { growth } from "./growth"; import { menu } from "./menu"; import { menuUiHandler } from "./menu-ui-handler"; +import { modifier } from "./modifier"; import { modifierType } from "./modifier-type"; import { move } from "./move"; import { nature } from "./nature"; @@ -73,6 +74,7 @@ export const zhCnConfig = { growth: growth, menu: menu, menuUiHandler: menuUiHandler, + modifier: modifier, modifierType: modifierType, move: move, nature: nature, diff --git a/src/locales/zh_CN/modifier.ts b/src/locales/zh_CN/modifier.ts new file mode 100644 index 00000000000..fabd17465b2 --- /dev/null +++ b/src/locales/zh_CN/modifier.ts @@ -0,0 +1,12 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const modifier: SimpleTranslationEntries = { + "surviveDamageApply": "{{pokemonNameWithAffix}}用{{typeName}}\n撑住了!", + "turnHealApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回复了体力!", + "hitHealApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回复了体力!", + "pokemonInstantReviveApply": "{{pokemonNameWithAffix}}用{{typeName}}\n恢复了活力!", + "moneyInterestApply": "用{{typeName}}\n获得了 ₽{{moneyAmount}} 利息!", + "turnHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}吸收了!", + "contactHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}夺取了!", + "enemyTurnHealApply": "{{pokemonNameWithAffix}}\n回复了一些体力!", +} as const; diff --git a/src/locales/zh_TW/config.ts b/src/locales/zh_TW/config.ts index 6886a750d62..f19a6941a88 100644 --- a/src/locales/zh_TW/config.ts +++ b/src/locales/zh_TW/config.ts @@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler"; import { growth } from "./growth"; import { menu } from "./menu"; import { menuUiHandler } from "./menu-ui-handler"; +import { modifier } from "./modifier"; import { modifierType } from "./modifier-type"; import { move } from "./move"; import { nature } from "./nature"; @@ -73,6 +74,7 @@ export const zhTwConfig = { growth: growth, menu: menu, menuUiHandler: menuUiHandler, + modifier: modifier, modifierType: modifierType, move: move, nature: nature, diff --git a/src/locales/zh_TW/modifier.ts b/src/locales/zh_TW/modifier.ts new file mode 100644 index 00000000000..01de87827c0 --- /dev/null +++ b/src/locales/zh_TW/modifier.ts @@ -0,0 +1,12 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const modifier: SimpleTranslationEntries = { + "surviveDamageApply": "{{pokemonNameWithAffix}}用{{typeName}}\n撐住了!", + "turnHealApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回復了體力!", + "hitHealApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回復了體力!", + "pokemonInstantReviveApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回復了活力!", + "moneyInterestApply": "用{{typeName}}\n獲得了 ₽{{moneyAmount}} 利息!", + "turnHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}吸收了!", + "contactHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}奪取了!", + "enemyTurnHealApply": "{{pokemonNameWithAffix}}\n回復了一些體力!", +} as const; diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 0b339906cc5..6f098ade124 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -24,6 +24,7 @@ import * as Overrides from "../overrides"; import { ModifierType, modifierTypes } from "./modifier-type"; import { Command } from "#app/ui/command-ui-handler.js"; import { Species } from "#enums/species"; +import i18next from "i18next"; import { allMoves } from "#app/data/move.js"; import { Abilities } from "#app/enums/abilities.js"; @@ -965,7 +966,7 @@ export class SurviveDamageModifier extends PokemonHeldItemModifier { if (!surviveDamage.value && pokemon.randSeedInt(10) < this.getStackCount()) { surviveDamage.value = true; - pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` hung on\nusing its ${this.type.name}!`)); + pokemon.scene.queueMessage(i18next.t("modifier:surviveDamageApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name })); return true; } @@ -1070,7 +1071,7 @@ export class TurnHealModifier extends PokemonHeldItemModifier { if (pokemon.getHpRatio() < 1) { const scene = pokemon.scene; scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(), - Math.max(Math.floor(pokemon.getMaxHp() / 16) * this.stackCount, 1), getPokemonMessage(pokemon, `'s ${this.type.name}\nrestored its HP a little!`), true)); + Math.max(Math.floor(pokemon.getMaxHp() / 16) * this.stackCount, 1), i18next.t("modifier:turnHealApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name }), true)); return true; } @@ -1161,7 +1162,7 @@ export class HitHealModifier extends PokemonHeldItemModifier { if (pokemon.turnData.damageDealt && pokemon.getHpRatio() < 1) { const scene = pokemon.scene; scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(), - Math.max(Math.floor(pokemon.turnData.damageDealt / 8) * this.stackCount, 1), getPokemonMessage(pokemon, `'s ${this.type.name}\nrestored its HP a little!`), true)); + Math.max(Math.floor(pokemon.turnData.damageDealt / 8) * this.stackCount, 1), i18next.t("modifier:hitHealApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name }), true)); } return true; @@ -1296,7 +1297,7 @@ export class PokemonInstantReviveModifier extends PokemonHeldItemModifier { const pokemon = args[0] as Pokemon; pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(), - Math.max(Math.floor(pokemon.getMaxHp() / 2), 1), getPokemonMessage(pokemon, ` was revived\nby its ${this.type.name}!`), false, false, true)); + Math.max(Math.floor(pokemon.getMaxHp() / 2), 1), i18next.t("modifier:pokemonInstantReviveApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name }), false, false, true)); pokemon.resetStatus(true, false, true); return true; @@ -2010,7 +2011,10 @@ export class MoneyInterestModifier extends PersistentModifier { const interestAmount = Math.floor(scene.money * 0.1 * this.getStackCount()); scene.addMoney(interestAmount); - scene.queueMessage(`You received interest of ₽${interestAmount.toLocaleString("en-US")}\nfrom the ${this.type.name}!`, null, true); + const userLocale = navigator.language || "en-US"; + const formattedMoneyAmount = interestAmount.toLocaleString(userLocale); + const message = i18next.t("modifier:moneyInterestApply", { moneyAmount: formattedMoneyAmount, typeName: this.type.name }); + scene.queueMessage(message, null, true); return true; } @@ -2231,7 +2235,7 @@ export class TurnHeldItemTransferModifier extends HeldItemTransferModifier { } getTransferMessage(pokemon: Pokemon, targetPokemon: Pokemon, item: ModifierTypes.ModifierType): string { - return getPokemonMessage(targetPokemon, `'s ${item.name} was absorbed\nby ${pokemon.name}'s ${this.type.name}!`); + return i18next.t("modifier:turnHeldItemTransferApply", { pokemonNameWithAffix: getPokemonNameWithAffix(targetPokemon), itemName: item.name, pokemonName: pokemon.name, typeName: this.type.name }); } getMaxHeldItemCount(pokemon: Pokemon): integer { @@ -2285,7 +2289,7 @@ export class ContactHeldItemTransferChanceModifier extends HeldItemTransferModif } getTransferMessage(pokemon: Pokemon, targetPokemon: Pokemon, item: ModifierTypes.ModifierType): string { - return getPokemonMessage(targetPokemon, `'s ${item.name} was snatched\nby ${pokemon.name}'s ${this.type.name}!`); + return i18next.t("modifier:contactHeldItemTransferApply", { pokemonNameWithAffix: getPokemonNameWithAffix(targetPokemon), itemName: item.name, pokemonName: pokemon.name, typeName: this.type.name }); } getMaxHeldItemCount(pokemon: Pokemon): integer { @@ -2443,7 +2447,7 @@ export class EnemyTurnHealModifier extends EnemyPersistentModifier { if (pokemon.getHpRatio() < 1) { const scene = pokemon.scene; scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(), - Math.max(Math.floor(pokemon.getMaxHp() / (100 / this.healPercent)) * this.stackCount, 1), getPokemonMessage(pokemon, "\nrestored some HP!"), true, false, false, false, true)); + Math.max(Math.floor(pokemon.getMaxHp() / (100 / this.healPercent)) * this.stackCount, 1), i18next.t("modifier:enemyTurnHealApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }), true, false, false, false, true)); return true; }