diff --git a/src/data/battle-stat.ts b/src/data/battle-stat.ts index 7dccd4f8a7c..47f52b46d94 100644 --- a/src/data/battle-stat.ts +++ b/src/data/battle-stat.ts @@ -1,4 +1,4 @@ -import i18next from "i18next"; +import i18next, {ParseKeys} from "i18next"; export enum BattleStat { ATK, @@ -32,7 +32,7 @@ export function getBattleStatName(stat: BattleStat) { } } -export function getBattleStatLevelChangeDescription(pokemonNameWithAffix: string, stats: string, levels: integer, up: boolean) { +export function getBattleStatLevelChangeDescription(pokemonNameWithAffix: string, stats: string, levels: integer, up: boolean, count: integer = 1) { const stringKey = (() => { if (up) { switch (levels) { @@ -64,6 +64,5 @@ export function getBattleStatLevelChangeDescription(pokemonNameWithAffix: string } } })(); - - return i18next.t(stringKey, { pokemonNameWithAffix, stats }); + return i18next.t(stringKey as ParseKeys, { pokemonNameWithAffix, stats, count }); } diff --git a/src/locales/de/battle.ts b/src/locales/de/battle.ts index a959ec18616..e2317ef6519 100644 --- a/src/locales/de/battle.ts +++ b/src/locales/de/battle.ts @@ -69,14 +69,24 @@ export const battle: SimpleTranslationEntries = { "regainHealth": "KP von {{pokemonName}} wurden wieder aufgefrischt!", "stealEatBerry": "{{pokemonName}} stole and ate\n{{targetName}}'s {{berryName}}!", "fainted": "{{pokemonNameWithAffix}} wurde besiegt!", - "statRose": "{{stats}} von {{pokemonNameWithAffix}} steigt!", - "statSharplyRose": "{{stats}} von {{pokemonNameWithAffix}} steigt stark!", - "statRoseDrastically": "{{stats}} von {{pokemonNameWithAffix}} steigt drastisch!", - "statWontGoAnyHigher": "{{stats}} von {{pokemonNameWithAffix}} kann nicht weiter erhöht werden!", - "statFell": "{{stats}} von {{pokemonNameWithAffix}} sinkt!", - "statHarshlyFell": "{{stats}} von {{pokemonNameWithAffix}} sinkt stark!", - "statSeverelyFell": "{{stats}} von {{pokemonNameWithAffix}} sinkt drastisch!", - "statWontGoAnyLower": "{{stats}} von {{pokemonNameWithAffix}} kann nicht weiter sinken!", + "statsAnd": "und", + "stats": "Alle Werte", + "statRose_one": "{{stats}} von {{pokemonNameWithAffix}} steigt!", + "statRose_other": "{{stats}} von {{pokemonNameWithAffix}} steigen!", + "statSharplyRose_one": "{{stats}} von {{pokemonNameWithAffix}} steigt stark!", + "statSharplyRose_other": "{{stats}} von {{pokemonNameWithAffix}} steigen stark!", + "statRoseDrastically_one": "{{stats}} von {{pokemonNameWithAffix}} steigt drastisch!", + "statRoseDrastically_other": "{{stats}} von {{pokemonNameWithAffix}} steigen drastisch!", + "statWontGoAnyHigher_one": "{{stats}} von {{pokemonNameWithAffix}} kann nicht weiter erhöht werden!", + "statWontGoAnyHigher_other": "{{stats}} von {{pokemonNameWithAffix}} können nicht weiter erhöht werden!", + "statFell_one": "{{stats}} von {{pokemonNameWithAffix}} sinkt!", + "statFell_other": "{{stats}} von {{pokemonNameWithAffix}} sinken!", + "statHarshlyFell_one": "{{stats}} von {{pokemonNameWithAffix}} sinkt stark!", + "statHarshlyFell_other": "{{stats}} von {{pokemonNameWithAffix}} sinken stark!", + "statSeverelyFell_one": "{{stats}} von {{pokemonNameWithAffix}} sinkt drastisch!", + "statSeverelyFell_other": "{{stats}} von {{pokemonNameWithAffix}} sinken drastisch!", + "statWontGoAnyLower_one": "{{stats}} von {{pokemonNameWithAffix}} kann nicht weiter sinken!", + "statWontGoAnyLower_other": "{{stats}} von {{pokemonNameWithAffix}} können nicht weiter sinken!", "ppReduced": "{{moveName}} von {{targetName}} wird um {{reduction}} AP reduziert!", "retryBattle": "Möchtest du vom Beginn des Kampfes neustarten?", "unlockedSomething": "{{unlockedThing}} wurde freigeschaltet.", diff --git a/src/locales/en/battle.ts b/src/locales/en/battle.ts index 3a43c409000..703d2753c0c 100644 --- a/src/locales/en/battle.ts +++ b/src/locales/en/battle.ts @@ -69,14 +69,24 @@ export const battle: SimpleTranslationEntries = { "regainHealth": "{{pokemonName}} regained\nhealth!", "stealEatBerry": "{{pokemonName}} stole and ate\n{{targetName}}'s {{berryName}}!", "fainted": "{{pokemonNameWithAffix}} fainted!", - "statRose": "{{pokemonNameWithAffix}}'s {{stats}} rose!", - "statSharplyRose": "{{pokemonNameWithAffix}}'s {{stats}} sharply rose!", - "statRoseDrastically": "{{pokemonNameWithAffix}}'s {{stats}} rose drastically!", - "statWontGoAnyHigher": "{{pokemonNameWithAffix}}'s {{stats}} won't go any higher!", - "statFell": "{{pokemonNameWithAffix}}'s {{stats}} fell!", - "statHarshlyFell": "{{pokemonNameWithAffix}}'s {{stats}} harshly fell!", - "statSeverelyFell": "{{pokemonNameWithAffix}}'s {{stats}} severely fell!", - "statWontGoAnyLower": "{{pokemonNameWithAffix}}'s {{stats}} won't go any lower!", + "statsAnd": "and", + "stats": "Stats", + "statRose_one": "{{pokemonNameWithAffix}}'s {{stats}} rose!", + "statRose_other": "{{pokemonNameWithAffix}}'s {{stats}} rose!", + "statSharplyRose_one": "{{pokemonNameWithAffix}}'s {{stats}} sharply rose!", + "statSharplyRose_other": "{{pokemonNameWithAffix}}'s {{stats}} sharply rose!", + "statRoseDrastically_one": "{{pokemonNameWithAffix}}'s {{stats}} rose drastically!", + "statRoseDrastically_other": "{{pokemonNameWithAffix}}'s {{stats}} rose drastically!", + "statWontGoAnyHigher_one": "{{pokemonNameWithAffix}}'s {{stats}} won't go any higher!", + "statWontGoAnyHigher_other": "{{pokemonNameWithAffix}}'s {{stats}} won't go any higher!", + "statFell_one": "{{pokemonNameWithAffix}}'s {{stats}} fell!", + "statFell_other": "{{pokemonNameWithAffix}}'s {{stats}} fell!", + "statHarshlyFell_one": "{{pokemonNameWithAffix}}'s {{stats}} harshly fell!", + "statHarshlyFell_other": "{{pokemonNameWithAffix}}'s {{stats}} harshly fell!", + "statSeverelyFell_one": "{{pokemonNameWithAffix}}'s {{stats}} severely fell!", + "statSeverelyFell_other": "{{pokemonNameWithAffix}}'s {{stats}} severely fell!", + "statWontGoAnyLower_one": "{{pokemonNameWithAffix}}'s {{stats}} won't go any lower!", + "statWontGoAnyLower_other": "{{pokemonNameWithAffix}}'s {{stats}} won't go any lower!", "retryBattle": "Would you like to retry from the start of the battle?", "unlockedSomething": "{{unlockedThing}}\nhas been unlocked.", "congratulations": "Congratulations!", diff --git a/src/locales/es/battle.ts b/src/locales/es/battle.ts index e2d542e92d7..a7f489cfe46 100644 --- a/src/locales/es/battle.ts +++ b/src/locales/es/battle.ts @@ -69,14 +69,24 @@ export const battle: SimpleTranslationEntries = { "regainHealth": "¡{{pokemonName}} recuperó\nPS!", "stealEatBerry": "¡{{pokemonName}} robó la {{berryName}}\nde {{targetName}} y se la comió!", "fainted": "¡{{pokemonNameWithAffix}} se debilitó!", - "statRose": "¡El {{stats}} de {{pokemonNameWithAffix}} ha subido!", - "statSharplyRose": "¡El {{stats}} de {{pokemonNameWithAffix}} ha subido mucho!", - "statRoseDrastically": "¡El {{stats}} de {{pokemonNameWithAffix}} ha subido muchísimo!", - "statWontGoAnyHigher": "¡El {{stats}} de {{pokemonNameWithAffix}} no puede subir más!", - "statFell": "¡El {{stats}} de {{pokemonNameWithAffix}} ha bajado!", - "statHarshlyFell": "¡El {{stats}} de {{pokemonNameWithAffix}}} ha bajado mucho!", - "statSeverelyFell": "¡El {{stats}} de {{pokemonNameWithAffix}} ha bajado muchísimo!", - "statWontGoAnyLower": "¡El {{stats}} de {{pokemonNameWithAffix}} no puede bajar más!", + "statsAnd": "y", + "stats": "Las estadísticas", + "statRose_one": "¡El {{stats}} de {{pokemonNameWithAffix}} ha subido!", + "statRose_other": "¡{{stats}} de\n{{pokemonNameWithAffix}} han subido!", + "statSharplyRose_one": "¡El {{stats}} de {{pokemonNameWithAffix}} ha subido mucho!", + "statSharplyRose_other": "¡{{stats}} de\n{{pokemonNameWithAffix}} han subido mucho!", + "statRoseDrastically_one": "¡El {{stats}} de {{pokemonNameWithAffix}} ha subido muchísimo!", + "statRoseDrastically_other": "¡{{stats}} de\n{{pokemonNameWithAffix}} han subido muchísimo!", + "statWontGoAnyHigher_one": "¡El {{stats}} de {{pokemonNameWithAffix}} no puede subir más!", + "statWontGoAnyHigher_other": "¡{{stats}} de\n{{pokemonNameWithAffix}} no pueden subir más!", + "statFell_one": "¡El {{stats}} de {{pokemonNameWithAffix}} ha bajado!", + "statFell_other": "¡{{stats}} de\n{{pokemonNameWithAffix}} han bajado!", + "statHarshlyFell_one": "¡El {{stats}} de {{pokemonNameWithAffix}} ha bajado mucho!", + "statHarshlyFell_other": "¡{{stats}} de\n{{pokemonNameWithAffix}} han bajado mucho!", + "statSeverelyFell_one": "¡El {{stats}} de {{pokemonNameWithAffix}} ha bajado muchísimo!", + "statSeverelyFell_other": "¡{{stats}} de\n{{pokemonNameWithAffix}} han bajado muchísimo!", + "statWontGoAnyLower_one": "¡El {{stats}} de {{pokemonNameWithAffix}} no puede bajar más!", + "statWontGoAnyLower_other": "¡{{stats}} de\n{{pokemonNameWithAffix}} no pueden bajar más!", "retryBattle": "Would you like to retry from the start of the battle?", "unlockedSomething": "{{unlockedThing}}\nhas been unlocked.", "congratulations": "Congratulations!", diff --git a/src/locales/fr/battle.ts b/src/locales/fr/battle.ts index edcffd639ac..1e957abf88e 100644 --- a/src/locales/fr/battle.ts +++ b/src/locales/fr/battle.ts @@ -69,14 +69,24 @@ export const battle: SimpleTranslationEntries = { "drainMessage": "L’énergie de {{pokemonName}}\nest drainée !", "regainHealth": "{{pokemonName}} récupère\ndes PV !", "fainted": "{{pokemonNameWithAffix}}\nest K.O. !", - "statRose": "{{stats}} de {{pokemonNameWithAffix}}\naugmente !", - "statSharplyRose": "{{stats}} de {{pokemonNameWithAffix}}\naugmente beaucoup !", - "statRoseDrastically": "{{stats}} de {{pokemonNameWithAffix}}\naugmente énormément !", - "statWontGoAnyHigher": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus augmenter !", - "statFell": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse !", - "statHarshlyFell": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse beaucoup !", - "statSeverelyFell": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse énormément !", - "statWontGoAnyLower": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus baisser !", + "statsAnd": "et", + "stats": "Les stats", + "statRose_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente !", + "statRose_other": "{{stats}} de {{pokemonNameWithAffix}}\naugmentent !", + "statSharplyRose_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente beaucoup !", + "statSharplyRose_other": "{{stats}} de {{pokemonNameWithAffix}}\naugmentent beaucoup !", + "statRoseDrastically_one": "{{stats}} de {{pokemonNameWithAffix}}\naugmente énormément !", + "statRoseDrastically_other": "{{stats}} de {{pokemonNameWithAffix}}\naugmentent énormément !", + "statWontGoAnyHigher_one": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus augmenter !", + "statWontGoAnyHigher_other": "{{stats}} de {{pokemonNameWithAffix}}\nne peuvent plus augmenter !", + "statFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse !", + "statFell_other": "{{stats}} de {{pokemonNameWithAffix}}\nbaissent !", + "statHarshlyFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse beaucoup !", + "statHarshlyFell_other": "{{stats}} de {{pokemonNameWithAffix}}\nbaissent beaucoup !", + "statSeverelyFell_one": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse énormément !", + "statSeverelyFell_other": "{{stats}} de {{pokemonNameWithAffix}}\nbaissent énormément !", + "statWontGoAnyLower_one": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus baisser !", + "statWontGoAnyLower_other": "{{stats}} de {{pokemonNameWithAffix}}\nne peuvent plus baisser !", "ppReduced": "Les PP de la capacité {{moveName}}\nde {{targetName}} baissent de {{reduction}} !", "retryBattle": "Voulez-vous réessayer depuis le début du combat ?", "unlockedSomething": "{{unlockedThing}}\na été débloqué.", diff --git a/src/locales/it/battle.ts b/src/locales/it/battle.ts index 30c031f2a4c..bbdaa164c1c 100644 --- a/src/locales/it/battle.ts +++ b/src/locales/it/battle.ts @@ -69,14 +69,24 @@ export const battle: SimpleTranslationEntries = { "drainMessage": "Viene prelevata energia\n da{{pokemonName}}!", "regainHealth": "{{pokemonName}} ha rigenerato\npunti salute!", "fainted": "{{pokemonNameWithAffix}} non è più in\ngrado di combattere!", - "statRose": "{{pokemonNameWithAffix}}'s {{stats}} è aumentato/a!", - "statSharplyRose": "{{pokemonNameWithAffix}}'s {{stats}} è aumentato/a molto!", - "statRoseDrastically": "{{pokemonNameWithAffix}}'s {{stats}} è aumentato/a drasticamente!", - "statWontGoAnyHigher": "{{pokemonNameWithAffix}}'s {{stats}} non può aumentare più di così!", - "statFell": "{{pokemonNameWithAffix}}'s {{stats}} è diminuito/a!", - "statHarshlyFell": "{{pokemonNameWithAffix}}'s {{stats}} è diminuito/a molto!", - "statSeverelyFell": "{{pokemonNameWithAffix}}'s {{stats}} è diminuito/a drasticamente!", - "statWontGoAnyLower": "{{pokemonNameWithAffix}}'s {{stats}} non può diminuire più di così!", + "statsAnd": "and", + "stats": "Stats", + "statRose_one": "{{pokemonNameWithAffix}}'s {{stats}} è aumentato/a!", + "statRose_other": "{{pokemonNameWithAffix}}'s {{stats}} rose!", + "statSharplyRose_one": "{{pokemonNameWithAffix}}'s {{stats}} è aumentato/a molto!", + "statSharplyRose_other": "{{pokemonNameWithAffix}}'s {{stats}} sharply rose!", + "statRoseDrastically_one": "{{pokemonNameWithAffix}}'s {{stats}} è aumentato/a drasticamente!", + "statRoseDrastically_other": "{{pokemonNameWithAffix}}'s {{stats}} rose drastically!", + "statWontGoAnyHigher_one": "{{pokemonNameWithAffix}}'s {{stats}} non può aumentare più di così!", + "statWontGoAnyHigher_other": "{{pokemonNameWithAffix}}'s {{stats}} won't go any higher!", + "statFell_one": "{{pokemonNameWithAffix}}'s {{stats}} è diminuito/a!", + "statFell_other": "{{pokemonNameWithAffix}}'s {{stats}} fell!", + "statHarshlyFell_one": "{{pokemonNameWithAffix}}'s {{stats}} è diminuito/a molto!", + "statHarshlyFell_other": "{{pokemonNameWithAffix}}'s {{stats}} harshly fell!", + "statSeverelyFell_one": "{{pokemonNameWithAffix}}'s {{stats}} è diminuito/a drasticamente!", + "statSeverelyFell_other": "{{pokemonNameWithAffix}}'s {{stats}} severely fell!", + "statWontGoAnyLower_one": "{{pokemonNameWithAffix}}'s {{stats}} non può diminuire più di così!", + "statWontGoAnyLower_other": "{{pokemonNameWithAffix}}'s {{stats}} won't go any lower!", "retryBattle": "Vuoi riprovare dall'inizio della lotta?", "unlockedSomething": "{{unlockedThing}}\nè stato/a sbloccato/a.", "congratulations": "Congratulazioni!", diff --git a/src/locales/ko/battle.ts b/src/locales/ko/battle.ts index 1a8d082d1b3..0256c4021ad 100644 --- a/src/locales/ko/battle.ts +++ b/src/locales/ko/battle.ts @@ -69,14 +69,24 @@ export const battle: SimpleTranslationEntries = { "stealEatBerry": "{{pokemonName}}[[가]]\n{{targetName}}의 {{berryName}}[[를]] 빼앗아 먹었다!", "regainHealth": "{{pokemonName}}[[는]]\n체력을 회복했다!", "fainted": "{{pokemonNameWithAffix}}[[는]] 쓰러졌다!", - "statRose": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 올라갔다!", - "statSharplyRose": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 크게 올라갔다!", - "statRoseDrastically": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 매우 크게 올라갔다!", - "statWontGoAnyHigher": "{{pokemonNameWithAffix}}의\n{{stats}}[[는]] 더 올라가지 않는다!", - "statFell": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 떨어졌다!", - "statHarshlyFell": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 크게 떨어졌다!", - "statSeverelyFell": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 매우 크게 떨어졌다!", - "statWontGoAnyLower": "{{pokemonNameWithAffix}}의\n{{stats}}[[는]] 더 떨어지지 않는다!", + "statsAnd": "그리고", + "stats": "스테이터스", + "statRose_one": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 올라갔다!", + "statRose_other": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 올라갔다!", + "statSharplyRose_one": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 크게 올라갔다!", + "statSharplyRose_other": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 크게 올라갔다!", + "statRoseDrastically_one": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 매우 크게 올라갔다!", + "statRoseDrastically_other": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 매우 크게 올라갔다!", + "statWontGoAnyHigher_one": "{{pokemonNameWithAffix}}의\n{{stats}}[[는]] 더 올라가지 않는다!", + "statWontGoAnyHigher_other": "{{pokemonNameWithAffix}}의\n{{stats}}[[는]] 더 올라가지 않는다!", + "statFell_one": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 떨어졌다!", + "statFell_other": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 떨어졌다!", + "statHarshlyFell_one": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 크게 떨어졌다!", + "statHarshlyFell_other": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 크게 떨어졌다!", + "statSeverelyFell_one": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 매우 크게 떨어졌다!", + "statSeverelyFell_other": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 매우 크게 떨어졌다!", + "statWontGoAnyLower_one": "{{pokemonNameWithAffix}}의\n{{stats}}[[는]] 더 떨어지지 않는다!", + "statWontGoAnyLower_other": "{{pokemonNameWithAffix}}의\n{{stats}}[[는]] 더 떨어지지 않는다!", "retryBattle": "이 배틀의 처음부터 재도전하시겠습니까?", "unlockedSomething": "{{unlockedThing}}[[가]]\n해금되었다.", "congratulations": "축하합니다!", diff --git a/src/locales/pt_BR/battle.ts b/src/locales/pt_BR/battle.ts index 251a1ded52e..eaf52b3ba98 100644 --- a/src/locales/pt_BR/battle.ts +++ b/src/locales/pt_BR/battle.ts @@ -69,14 +69,24 @@ export const battle: SimpleTranslationEntries = { "regainHealth": "{{pokemonName}} recuperou\npontos de saúde!", "stealEatBerry": "{{pokemonName}} stole and ate\n{{targetName}}'s {{berryName}}!", "fainted": "{{pokemonNameWithAffix}} desmaiou!", - "statRose": "{{stats}} de {{pokemonNameWithAffix}} aumentou!", - "statSharplyRose": "{{stats}} de {{pokemonNameWithAffix}} aumentou bruscamente!", - "statRoseDrastically": "{{stats}} de {{pokemonNameWithAffix}} aumentou drasticamente!", - "statWontGoAnyHigher": "{{stats}} de {{pokemonNameWithAffix}} não vai mais aumentar!", - "statFell": "{{stats}} de {{pokemonNameWithAffix}} diminuiu!", - "statHarshlyFell": "{{stats}} de {{pokemonNameWithAffix}} diminuiu duramente!", - "statSeverelyFell": "{{stats}} de {{pokemonNameWithAffix}} diminuiu severamente!", - "statWontGoAnyLower": "{{stats}} de {{pokemonNameWithAffix}} não vai mais diminuir!", + "statsAnd": "e", + "stats": "Os atributos", + "statRose_one": "{{stats}} de {{pokemonNameWithAffix}} aumentou!", + "statRose_other": "{{stats}} de {{pokemonNameWithAffix}} aumentaram!", + "statSharplyRose_one": "{{stats}} de {{pokemonNameWithAffix}} aumentou bruscamente!", + "statSharplyRose_other": "{{stats}} de {{pokemonNameWithAffix}} aumentaram bruscamente!", + "statRoseDrastically_one": "{{stats}} de {{pokemonNameWithAffix}} aumentou drasticamente!", + "statRoseDrastically_other": "{{stats}} de {{pokemonNameWithAffix}} aumentaram drasticamente!", + "statWontGoAnyHigher_one": "{{stats}} de {{pokemonNameWithAffix}} não vai mais aumentar!", + "statWontGoAnyHigher_other": "{{stats}} de {{pokemonNameWithAffix}} não vão mais aumentar!", + "statFell_one": "{{stats}} de {{pokemonNameWithAffix}} diminuiu!", + "statFell_other": "{{stats}} de {{pokemonNameWithAffix}} diminuíram!", + "statHarshlyFell_one": "{{stats}} de {{pokemonNameWithAffix}} diminuiu duramente!", + "statHarshlyFell_other": "{{stats}} de {{pokemonNameWithAffix}} diminuíram duramente!", + "statSeverelyFell_one": "{{stats}} de {{pokemonNameWithAffix}} diminuiu severamente!", + "statSeverelyFell_other": "{{stats}} de {{pokemonNameWithAffix}} diminuíram severamente!", + "statWontGoAnyLower_one": "{{stats}} de {{pokemonNameWithAffix}} não vai mais diminuir!", + "statWontGoAnyLower_other": "{{stats}} de {{pokemonNameWithAffix}} não vão mais diminuir!", "ppReduced": "O PP do movimento {{moveName}} de\n{{targetName}} foi reduzido em {{reduction}}!", "retryBattle": "Você gostaria de tentar novamente desde o início da batalha?", "unlockedSomething": "{{unlockedThing}}\nfoi desbloqueado.", diff --git a/src/locales/zh_CN/battle.ts b/src/locales/zh_CN/battle.ts index 585f1ca07e4..38ce1f489e7 100644 --- a/src/locales/zh_CN/battle.ts +++ b/src/locales/zh_CN/battle.ts @@ -69,14 +69,16 @@ export const battle: SimpleTranslationEntries = { "drainMessage": "{{pokemonName}}\n吸取了体力!", "regainHealth": "{{pokemonName}}\n回复了体力!", "fainted": "{{pokemonNameWithAffix}}\n倒下了!", - "statRose": "{{pokemonNameWithAffix}}\n的{{stats}}提高了!", - "statSharplyRose": "{{pokemonNameWithAffix}}\n的{{stats}}大幅提高了!", - "statRoseDrastically": "{{pokemonNameWithAffix}}\n的{{stats}}极大幅提高了!", - "statWontGoAnyHigher": "{{pokemonNameWithAffix}}\n的{{stats}}已经无法再提高了!", - "statFell": "{{pokemonNameWithAffix}}\n的{{stats}}降低了!", - "statHarshlyFell": "{{pokemonNameWithAffix}}\n的{{stats}}大幅降低了!", - "statSeverelyFell": "{{pokemonNameWithAffix}}\n的{{stats}}极大幅降低了!", - "statWontGoAnyLower": "{{pokemonNameWithAffix}}\n的{{stats}}已经无法再降低了!", + "statsAnd": "and", + "stats": "Stats", + "statRose_other": "{{pokemonNameWithAffix}}的 {{stats}}提高了!", + "statSharplyRose_other": "{{pokemonNameWithAffix}}的 {{stats}}大幅提高了!", + "statRoseDrastically_other": "{{pokemonNameWithAffix}}的 {{stats}}极大幅提高了!", + "statWontGoAnyHigher_other": "{{pokemonNameWithAffix}}的 {{stats}}已经无法再提高了!", + "statFell_other": "{{pokemonNameWithAffix}}的 {{stats}}降低了!", + "statHarshlyFell_other": "{{pokemonNameWithAffix}}的 {{stats}}大幅降低了!", + "statSeverelyFell_other": "{{pokemonNameWithAffix}}的 {{stats}}极大幅降低了!", + "statWontGoAnyLower_other": "{{pokemonNameWithAffix}}的 {{stats}}已经无法再降低了!", "ppReduced": "降低了{{targetName}}的\n{{moveName}}的PP{{reduction}}点!", "retryBattle": "你要从对战开始时重试么?", "unlockedSomething": "{{unlockedThing}}\n已解锁。", diff --git a/src/locales/zh_TW/battle.ts b/src/locales/zh_TW/battle.ts index 0dcedebc7a6..d9f1a149ef8 100644 --- a/src/locales/zh_TW/battle.ts +++ b/src/locales/zh_TW/battle.ts @@ -66,14 +66,16 @@ export const battle: SimpleTranslationEntries = { "drainMessage": "{{pokemonName}} 吸取了體力!", "regainHealth": "{{pokemonName}} 回復了體力!", "fainted": "{{pokemonNameWithAffix}} 倒下了!", - "statRose": "{{pokemonNameWithAffix}} 的 {{stats}} 提高了!", - "statSharplyRose": "{{pokemonNameWithAffix}} 的 {{stats}} 大幅提高了!", - "statRoseDrastically": "{{pokemonNameWithAffix}} 的 {{stats}} 極大幅提高了!", - "statWontGoAnyHigher": "{{pokemonNameWithAffix}} 的 {{stats}} 已經無法再提高了!", - "statFell": "{{pokemonNameWithAffix}} 的 {{stats}} 降低了!", - "statHarshlyFell": "{{pokemonNameWithAffix}} 的 {{stats}} 大幅降低了!", - "statSeverelyFell": "{{pokemonNameWithAffix}} 的 {{stats}} 極大幅降低了!", - "statWontGoAnyLower": "{{pokemonNameWithAffix}} 的 {{stats}} 已經無法再降低了!", + "statsAnd": "and", + "stats": "Stats", + "statRose_other": "{{pokemonNameWithAffix}}'s {{stats}} rose!", + "statSharplyRose_other": "{{pokemonNameWithAffix}}'s {{stats}} sharply rose!", + "statRoseDrastically_other": "{{pokemonNameWithAffix}}'s {{stats}} rose drastically!", + "statWontGoAnyHigher_other": "{{pokemonNameWithAffix}}'s {{stats}} won't go any higher!", + "statFell_other": "{{pokemonNameWithAffix}}'s {{stats}} fell!", + "statHarshlyFell_other": "{{pokemonNameWithAffix}}'s {{stats}} harshly fell!", + "statSeverelyFell_other": "{{pokemonNameWithAffix}}'s {{stats}} severely fell!", + "statWontGoAnyLower_other": "{{pokemonNameWithAffix}}'s {{stats}} won't go any lower!", "ppReduced": "降低了 {{targetName}} 的\n{{moveName}} 的PP{{reduction}}點!", "retryBattle": "Would you like to retry from the start of the battle?", "unlockedSomething": "{{unlockedThing}}\nhas been unlocked.", diff --git a/src/phases.ts b/src/phases.ts index 9ed86d3bf5d..144a2625896 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -3423,12 +3423,13 @@ export class StatChangePhase extends PokemonPhase { if (relLevelStats.length > 1) { statsFragment = relLevelStats.length >= 5 - ? "stats" - : `${relLevelStats.slice(0, -1).map(s => getBattleStatName(s)).join(", ")}${relLevelStats.length > 2 ? "," : ""} and ${getBattleStatName(relLevelStats[relLevelStats.length - 1])}`; + ? i18next.t("battle:stats") + : `${relLevelStats.slice(0, -1).map(s => getBattleStatName(s)).join(", ")}${relLevelStats.length > 2 ? "," : ""} ${i18next.t("battle:statsAnd")} ${getBattleStatName(relLevelStats[relLevelStats.length - 1])}`; + messages.push(getBattleStatLevelChangeDescription(getPokemonNameWithAffix(this.getPokemon()), statsFragment, Math.abs(parseInt(rl)), levels >= 1,relLevelStats.length)); } else { statsFragment = getBattleStatName(relLevelStats[0]); + messages.push(getBattleStatLevelChangeDescription(getPokemonNameWithAffix(this.getPokemon()), statsFragment, Math.abs(parseInt(rl)), levels >= 1,relLevelStats.length)); } - messages.push(getBattleStatLevelChangeDescription(getPokemonNameWithAffix(this.getPokemon()), statsFragment, Math.abs(parseInt(rl)), levels >= 1)); }); return messages; diff --git a/src/test/localization/battle-stat.test.ts b/src/test/localization/battle-stat.test.ts index d894d705947..ea2714b3852 100644 --- a/src/test/localization/battle-stat.test.ts +++ b/src/test/localization/battle-stat.test.ts @@ -1,37 +1,38 @@ import {beforeAll, describe, expect, it} from "vitest"; -import { getBattleStatName, getBattleStatLevelChangeDescription } from "#app/data/battle-stat.js"; -import { BattleStat } from "#app/data/battle-stat.js"; -import { pokemonInfo as enPokemonInfo } from "#app/locales/en/pokemon-info.js"; -import { battle as enBattleStat } from "#app/locales/en/battle.js"; -import { pokemonInfo as dePokemonInfo } from "#app/locales/de/pokemon-info.js"; -import { battle as deBattleStat } from "#app/locales/de/battle.js"; -import { pokemonInfo as esPokemonInfo } from "#app/locales/es/pokemon-info.js"; -import { battle as esBattleStat } from "#app/locales/es/battle.js"; -import { pokemonInfo as frPokemonInfo } from "#app/locales/fr/pokemon-info.js"; -import { battle as frBattleStat } from "#app/locales/fr/battle.js"; -import { pokemonInfo as itPokemonInfo } from "#app/locales/it/pokemon-info.js"; -import { battle as itBattleStat } from "#app/locales/it/battle.js"; -import { pokemonInfo as koPokemonInfo } from "#app/locales/ko/pokemon-info.js"; -import { battle as koBattleStat } from "#app/locales/ko/battle.js"; -import { pokemonInfo as ptBrPokemonInfo } from "#app/locales/pt_BR/pokemon-info.js"; -import { battle as ptBrBattleStat } from "#app/locales/pt_BR/battle.js"; -import { pokemonInfo as zhCnPokemonInfo } from "#app/locales/zh_CN/pokemon-info.js"; -import { battle as zhCnBattleStat } from "#app/locales/zh_CN/battle.js"; -import { pokemonInfo as zhTwPokemonInfo } from "#app/locales/zh_TW/pokemon-info.js"; -import { battle as zhTwBattleStat } from "#app/locales/zh_TW/battle.js"; +import {getBattleStatName, getBattleStatLevelChangeDescription} from "#app/data/battle-stat.js"; +import {BattleStat} from "#app/data/battle-stat.js"; +import {pokemonInfo as enPokemonInfo} from "#app/locales/en/pokemon-info.js"; +import {battle as enBattleStat} from "#app/locales/en/battle.js"; +import {pokemonInfo as dePokemonInfo} from "#app/locales/de/pokemon-info.js"; +import {battle as deBattleStat} from "#app/locales/de/battle.js"; +import {pokemonInfo as esPokemonInfo} from "#app/locales/es/pokemon-info.js"; +import {battle as esBattleStat} from "#app/locales/es/battle.js"; +import {pokemonInfo as frPokemonInfo} from "#app/locales/fr/pokemon-info.js"; +import {battle as frBattleStat} from "#app/locales/fr/battle.js"; +import {pokemonInfo as itPokemonInfo} from "#app/locales/it/pokemon-info.js"; +import {battle as itBattleStat} from "#app/locales/it/battle.js"; +import {pokemonInfo as koPokemonInfo} from "#app/locales/ko/pokemon-info.js"; +import {battle as koBattleStat} from "#app/locales/ko/battle.js"; +import {pokemonInfo as ptBrPokemonInfo} from "#app/locales/pt_BR/pokemon-info.js"; +import {battle as ptBrBattleStat} from "#app/locales/pt_BR/battle.js"; +import {pokemonInfo as zhCnPokemonInfo} from "#app/locales/zh_CN/pokemon-info.js"; +import {battle as zhCnBattleStat} from "#app/locales/zh_CN/battle.js"; +import {pokemonInfo as zhTwPokemonInfo} from "#app/locales/zh_TW/pokemon-info.js"; +import {battle as zhTwBattleStat} from "#app/locales/zh_TW/battle.js"; import i18next, {initI18n} from "#app/plugins/i18n"; -import { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor"; +import {KoreanPostpositionProcessor} from "i18next-korean-postposition-processor"; interface BattleStatTestUnit { - stat: BattleStat, - key: string + stat: BattleStat, + key: string } interface BattleStatLevelTestUnit { - levels: integer, - up: boolean, - key: string + levels: integer, + up: boolean, + key: string + changedStats: integer } function testBattleStatName(stat: BattleStat, expectMessage: string) { @@ -40,8 +41,8 @@ function testBattleStatName(stat: BattleStat, expectMessage: string) { expect(message).toBe(expectMessage); } -function testBattleStatLevelChangeDescription(levels: integer, up: boolean, expectMessage: string) { - const message = getBattleStatLevelChangeDescription("{{pokemonNameWithAffix}}", "{{stats}}", levels, up); +function testBattleStatLevelChangeDescription(levels: integer, up: boolean, expectMessage: string, changedStats: integer) { + const message = getBattleStatLevelChangeDescription("{{pokemonNameWithAffix}}", "{{stats}}", levels, up, changedStats); console.log(`message ${message}, expected ${expectMessage}`); expect(message).toBe(expectMessage); } @@ -53,28 +54,28 @@ describe("Test for BattleStat Localization", () => { beforeAll(() => { initI18n(); - battleStatUnits.push({ stat: BattleStat.ATK, key: "Stat.ATK" }); - battleStatUnits.push({ stat: BattleStat.DEF, key: "Stat.DEF" }); - battleStatUnits.push({ stat: BattleStat.SPATK, key: "Stat.SPATK" }); - battleStatUnits.push({ stat: BattleStat.SPDEF, key: "Stat.SPDEF" }); - battleStatUnits.push({ stat: BattleStat.SPD, key: "Stat.SPD" }); - battleStatUnits.push({ stat: BattleStat.ACC, key: "Stat.ACC" }); - battleStatUnits.push({ stat: BattleStat.EVA, key: "Stat.EVA" }); + battleStatUnits.push({stat: BattleStat.ATK, key: "Stat.ATK"}); + battleStatUnits.push({stat: BattleStat.DEF, key: "Stat.DEF"}); + battleStatUnits.push({stat: BattleStat.SPATK, key: "Stat.SPATK"}); + battleStatUnits.push({stat: BattleStat.SPDEF, key: "Stat.SPDEF"}); + battleStatUnits.push({stat: BattleStat.SPD, key: "Stat.SPD"}); + battleStatUnits.push({stat: BattleStat.ACC, key: "Stat.ACC"}); + battleStatUnits.push({stat: BattleStat.EVA, key: "Stat.EVA"}); - battleStatLevelUnits.push({ levels: 1, up: true, key: "statRose" }); - battleStatLevelUnits.push({ levels: 2, up: true, key: "statSharplyRose" }); - battleStatLevelUnits.push({ levels: 3, up: true, key: "statRoseDrastically" }); - battleStatLevelUnits.push({ levels: 4, up: true, key: "statRoseDrastically" }); - battleStatLevelUnits.push({ levels: 5, up: true, key: "statRoseDrastically" }); - battleStatLevelUnits.push({ levels: 6, up: true, key: "statRoseDrastically" }); - battleStatLevelUnits.push({ levels: 7, up: true, key: "statWontGoAnyHigher" }); - battleStatLevelUnits.push({ levels: 1, up: false, key: "statFell" }); - battleStatLevelUnits.push({ levels: 2, up: false, key: "statHarshlyFell" }); - battleStatLevelUnits.push({ levels: 3, up: false, key: "statSeverelyFell" }); - battleStatLevelUnits.push({ levels: 4, up: false, key: "statSeverelyFell" }); - battleStatLevelUnits.push({ levels: 5, up: false, key: "statSeverelyFell" }); - battleStatLevelUnits.push({ levels: 6, up: false, key: "statSeverelyFell" }); - battleStatLevelUnits.push({ levels: 7, up: false, key: "statWontGoAnyLower" }); + battleStatLevelUnits.push({levels: 1, up: true, key: "statRose_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 2, up: true, key: "statSharplyRose_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 3, up: true, key: "statRoseDrastically_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 4, up: true, key: "statRoseDrastically_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 5, up: true, key: "statRoseDrastically_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 6, up: true, key: "statRoseDrastically_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 7, up: true, key: "statWontGoAnyHigher_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 1, up: false, key: "statFell_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 2, up: false, key: "statHarshlyFell_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 3, up: false, key: "statSeverelyFell_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 4, up: false, key: "statSeverelyFell_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 5, up: false, key: "statSeverelyFell_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 6, up: false, key: "statSeverelyFell_one", changedStats: 1}); + battleStatLevelUnits.push({levels: 7, up: false, key: "statWontGoAnyLower_one", changedStats: 1}); }); it("Test getBattleStatName() in English", async () => { @@ -87,7 +88,7 @@ describe("Test for BattleStat Localization", () => { it("Test getBattleStatLevelChangeDescription() in English", async () => { i18next.changeLanguage("en"); battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, enBattleStat[unit.key]); + testBattleStatLevelChangeDescription(unit.levels, unit.up, enBattleStat[unit.key], unit.changedStats); }); }); @@ -101,7 +102,7 @@ describe("Test for BattleStat Localization", () => { it("Test getBattleStatLevelChangeDescription() in Español", async () => { i18next.changeLanguage("es"); battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, esBattleStat[unit.key]); + testBattleStatLevelChangeDescription(unit.levels, unit.up, esBattleStat[unit.key], unit.changedStats); }); }); @@ -115,7 +116,7 @@ describe("Test for BattleStat Localization", () => { it("Test getBattleStatLevelChangeDescription() in Italiano", async () => { i18next.changeLanguage("it"); battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, itBattleStat[unit.key]); + testBattleStatLevelChangeDescription(unit.levels, unit.up, itBattleStat[unit.key], unit.changedStats); }); }); @@ -129,7 +130,7 @@ describe("Test for BattleStat Localization", () => { it("Test getBattleStatLevelChangeDescription() in Français", async () => { i18next.changeLanguage("fr"); battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, frBattleStat[unit.key]); + testBattleStatLevelChangeDescription(unit.levels, unit.up, frBattleStat[unit.key], unit.changedStats); }); }); @@ -143,7 +144,7 @@ describe("Test for BattleStat Localization", () => { it("Test getBattleStatLevelChangeDescription() in Deutsch", async () => { i18next.changeLanguage("de"); battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, deBattleStat[unit.key]); + testBattleStatLevelChangeDescription(unit.levels, unit.up, deBattleStat[unit.key], unit.changedStats); }); }); @@ -157,7 +158,7 @@ describe("Test for BattleStat Localization", () => { it("Test getBattleStatLevelChangeDescription() in Português (BR)", async () => { i18next.changeLanguage("pt-BR"); battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, ptBrBattleStat[unit.key]); + testBattleStatLevelChangeDescription(unit.levels, unit.up, ptBrBattleStat[unit.key], unit.changedStats); }); }); @@ -171,7 +172,9 @@ describe("Test for BattleStat Localization", () => { it("Test getBattleStatLevelChangeDescription() in 简体中文", async () => { i18next.changeLanguage("zh-CN"); battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, zhCnBattleStat[unit.key]); + // In i18next, the pluralization rules are language-specific, and Chinese only supports the _other suffix. + unit.key = unit.key.replace("one", "other"); + testBattleStatLevelChangeDescription(unit.levels, unit.up, zhCnBattleStat[unit.key], unit.changedStats); }); }); @@ -185,7 +188,9 @@ describe("Test for BattleStat Localization", () => { it("Test getBattleStatLevelChangeDescription() in 繁體中文", async () => { i18next.changeLanguage("zh-TW"); battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, zhTwBattleStat[unit.key]); + // In i18next, the pluralization rules are language-specific, and Chinese only supports the _other suffix. + unit.key = unit.key.replace("one", "other"); + testBattleStatLevelChangeDescription(unit.levels, unit.up, zhTwBattleStat[unit.key], unit.changedStats); }); }); @@ -201,7 +206,7 @@ describe("Test for BattleStat Localization", () => { battleStatLevelUnits.forEach(unit => { const processor = new KoreanPostpositionProcessor(); const message = processor.process(koBattleStat[unit.key]); - testBattleStatLevelChangeDescription(unit.levels, unit.up, message); + testBattleStatLevelChangeDescription(unit.levels, unit.up, message, unit.changedStats); }); }); });