From 8c8232d400b593189ac7199b85750eb1a4c31980 Mon Sep 17 00:00:00 2001 From: Rei1mu <94012185+Rei1mu@users.noreply.github.com> Date: Fri, 17 May 2024 22:45:27 +0800 Subject: [PATCH] update battle-stat,statLevelChangDescription for zh-CN update battle-stat,statLevelChangDescription for zh-CN. --- src/locales/de/battle-stat.ts | 21 +++++++++++++++++++++ src/locales/de/config.ts | 2 ++ src/locales/en/battle-stat.ts | 21 +++++++++++++++++++++ src/locales/en/config.ts | 2 ++ src/locales/es/battle-stat.ts | 21 +++++++++++++++++++++ src/locales/es/config.ts | 2 ++ src/locales/fr/battle-stat.ts | 21 +++++++++++++++++++++ src/locales/fr/config.ts | 2 ++ src/locales/it/battle-stat.ts | 21 +++++++++++++++++++++ src/locales/it/config.ts | 2 ++ src/locales/pt_BR/battle-stat.ts | 21 +++++++++++++++++++++ src/locales/pt_BR/config.ts | 2 ++ src/locales/zh_CN/battle-stat.ts | 21 +++++++++++++++++++++ src/locales/zh_CN/config.ts | 3 ++- src/locales/zh_CN/modifier-type.ts | 2 +- src/modifier/modifier-type.ts | 2 +- src/phases.ts | 2 +- src/plugins/i18n.ts | 1 + 18 files changed, 165 insertions(+), 4 deletions(-) create mode 100644 src/locales/de/battle-stat.ts create mode 100644 src/locales/en/battle-stat.ts create mode 100644 src/locales/es/battle-stat.ts create mode 100644 src/locales/fr/battle-stat.ts create mode 100644 src/locales/it/battle-stat.ts create mode 100644 src/locales/pt_BR/battle-stat.ts create mode 100644 src/locales/zh_CN/battle-stat.ts diff --git a/src/locales/de/battle-stat.ts b/src/locales/de/battle-stat.ts new file mode 100644 index 00000000000..56e7a3e4ed7 --- /dev/null +++ b/src/locales/de/battle-stat.ts @@ -0,0 +1,21 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const battleStat: SimpleTranslationEntries = { + "critical-hit_ratio": "critical-hit ratio", + "Attack": "Attack", + "Defense": "Defense", + "Sp_Atk": "Sp. Atk", + "Sp_Def": "Sp. Def", + "Speed": "Speed", + "Accuracy": "Accuracy", + "Evasiveness": "Evasiveness", + "rose": "rose", + "sharply_rose": "sharply rose", + "rose_drastically": "rose drastically", + "fell": "fell", + "harshly_fell": "harshly fell", + "severly_fell": "severly fell", + "levelChangeDescripion": "'s {{statsFragment}} {{description}}", + "won't_go_any_higher": "won\'t go any higher", + "won't_go_any_lower": "won\'t go any lower" +} as const; \ No newline at end of file diff --git a/src/locales/de/config.ts b/src/locales/de/config.ts index 7aeeeb7a925..26934abd8fb 100644 --- a/src/locales/de/config.ts +++ b/src/locales/de/config.ts @@ -20,6 +20,7 @@ import { tutorial } from "./tutorial"; import { weather } from "./weather"; import { battleMessageUiHandler } from "./battle-message-ui-handler"; import { berry } from "./berry"; +import { battleStat } from "./battle-stat"; export const deConfig = { ability: ability, @@ -46,4 +47,5 @@ export const deConfig = { weather: weather, battleMessageUiHandler: battleMessageUiHandler, berry: berry, + battleStat: battleStat, } \ No newline at end of file diff --git a/src/locales/en/battle-stat.ts b/src/locales/en/battle-stat.ts new file mode 100644 index 00000000000..56e7a3e4ed7 --- /dev/null +++ b/src/locales/en/battle-stat.ts @@ -0,0 +1,21 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const battleStat: SimpleTranslationEntries = { + "critical-hit_ratio": "critical-hit ratio", + "Attack": "Attack", + "Defense": "Defense", + "Sp_Atk": "Sp. Atk", + "Sp_Def": "Sp. Def", + "Speed": "Speed", + "Accuracy": "Accuracy", + "Evasiveness": "Evasiveness", + "rose": "rose", + "sharply_rose": "sharply rose", + "rose_drastically": "rose drastically", + "fell": "fell", + "harshly_fell": "harshly fell", + "severly_fell": "severly fell", + "levelChangeDescripion": "'s {{statsFragment}} {{description}}", + "won't_go_any_higher": "won\'t go any higher", + "won't_go_any_lower": "won\'t go any lower" +} as const; \ No newline at end of file diff --git a/src/locales/en/config.ts b/src/locales/en/config.ts index 6b23d2f2983..8a371324908 100644 --- a/src/locales/en/config.ts +++ b/src/locales/en/config.ts @@ -20,6 +20,7 @@ import { tutorial } from "./tutorial"; import { weather } from "./weather"; import { battleMessageUiHandler } from "./battle-message-ui-handler"; import { berry } from "./berry"; +import { battleStat } from "./battle-stat"; export const enConfig = { ability: ability, @@ -46,4 +47,5 @@ export const enConfig = { weather: weather, battleMessageUiHandler: battleMessageUiHandler, berry: berry, + battleStat: battleStat, } \ No newline at end of file diff --git a/src/locales/es/battle-stat.ts b/src/locales/es/battle-stat.ts new file mode 100644 index 00000000000..56e7a3e4ed7 --- /dev/null +++ b/src/locales/es/battle-stat.ts @@ -0,0 +1,21 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const battleStat: SimpleTranslationEntries = { + "critical-hit_ratio": "critical-hit ratio", + "Attack": "Attack", + "Defense": "Defense", + "Sp_Atk": "Sp. Atk", + "Sp_Def": "Sp. Def", + "Speed": "Speed", + "Accuracy": "Accuracy", + "Evasiveness": "Evasiveness", + "rose": "rose", + "sharply_rose": "sharply rose", + "rose_drastically": "rose drastically", + "fell": "fell", + "harshly_fell": "harshly fell", + "severly_fell": "severly fell", + "levelChangeDescripion": "'s {{statsFragment}} {{description}}", + "won't_go_any_higher": "won\'t go any higher", + "won't_go_any_lower": "won\'t go any lower" +} as const; \ No newline at end of file diff --git a/src/locales/es/config.ts b/src/locales/es/config.ts index a3b06982d33..ae5e42cd01d 100644 --- a/src/locales/es/config.ts +++ b/src/locales/es/config.ts @@ -20,6 +20,7 @@ import { tutorial } from "./tutorial"; import { weather } from "./weather"; import { battleMessageUiHandler } from "./battle-message-ui-handler"; import { berry } from "./berry"; +import { battleStat } from "./battle-stat"; export const esConfig = { ability: ability, @@ -46,4 +47,5 @@ export const esConfig = { weather: weather, battleMessageUiHandler: battleMessageUiHandler, berry: berry, + battleStat: battleStat, } \ No newline at end of file diff --git a/src/locales/fr/battle-stat.ts b/src/locales/fr/battle-stat.ts new file mode 100644 index 00000000000..56e7a3e4ed7 --- /dev/null +++ b/src/locales/fr/battle-stat.ts @@ -0,0 +1,21 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const battleStat: SimpleTranslationEntries = { + "critical-hit_ratio": "critical-hit ratio", + "Attack": "Attack", + "Defense": "Defense", + "Sp_Atk": "Sp. Atk", + "Sp_Def": "Sp. Def", + "Speed": "Speed", + "Accuracy": "Accuracy", + "Evasiveness": "Evasiveness", + "rose": "rose", + "sharply_rose": "sharply rose", + "rose_drastically": "rose drastically", + "fell": "fell", + "harshly_fell": "harshly fell", + "severly_fell": "severly fell", + "levelChangeDescripion": "'s {{statsFragment}} {{description}}", + "won't_go_any_higher": "won\'t go any higher", + "won't_go_any_lower": "won\'t go any lower" +} as const; \ No newline at end of file diff --git a/src/locales/fr/config.ts b/src/locales/fr/config.ts index 867a08621bb..174feeae4e6 100644 --- a/src/locales/fr/config.ts +++ b/src/locales/fr/config.ts @@ -20,6 +20,7 @@ import { tutorial } from "./tutorial"; import { weather } from "./weather"; import { battleMessageUiHandler } from "./battle-message-ui-handler"; import { berry } from "./berry"; +import { battleStat } from "./battle-stat"; export const frConfig = { ability: ability, @@ -46,4 +47,5 @@ export const frConfig = { weather: weather, battleMessageUiHandler: battleMessageUiHandler, berry: berry, + battleStat: battleStat, } \ No newline at end of file diff --git a/src/locales/it/battle-stat.ts b/src/locales/it/battle-stat.ts new file mode 100644 index 00000000000..56e7a3e4ed7 --- /dev/null +++ b/src/locales/it/battle-stat.ts @@ -0,0 +1,21 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const battleStat: SimpleTranslationEntries = { + "critical-hit_ratio": "critical-hit ratio", + "Attack": "Attack", + "Defense": "Defense", + "Sp_Atk": "Sp. Atk", + "Sp_Def": "Sp. Def", + "Speed": "Speed", + "Accuracy": "Accuracy", + "Evasiveness": "Evasiveness", + "rose": "rose", + "sharply_rose": "sharply rose", + "rose_drastically": "rose drastically", + "fell": "fell", + "harshly_fell": "harshly fell", + "severly_fell": "severly fell", + "levelChangeDescripion": "'s {{statsFragment}} {{description}}", + "won't_go_any_higher": "won\'t go any higher", + "won't_go_any_lower": "won\'t go any lower" +} as const; \ No newline at end of file diff --git a/src/locales/it/config.ts b/src/locales/it/config.ts index 89d78304120..3dda079be56 100644 --- a/src/locales/it/config.ts +++ b/src/locales/it/config.ts @@ -20,6 +20,7 @@ import { tutorial } from "./tutorial"; import { weather } from "./weather"; import { battleMessageUiHandler } from "./battle-message-ui-handler"; import { berry } from "./berry"; +import { battleStat } from "./battle-stat"; export const itConfig = { ability: ability, @@ -46,4 +47,5 @@ export const itConfig = { weather: weather, battleMessageUiHandler: battleMessageUiHandler, berry: berry, + battleStat: battleStat, } \ No newline at end of file diff --git a/src/locales/pt_BR/battle-stat.ts b/src/locales/pt_BR/battle-stat.ts new file mode 100644 index 00000000000..56e7a3e4ed7 --- /dev/null +++ b/src/locales/pt_BR/battle-stat.ts @@ -0,0 +1,21 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const battleStat: SimpleTranslationEntries = { + "critical-hit_ratio": "critical-hit ratio", + "Attack": "Attack", + "Defense": "Defense", + "Sp_Atk": "Sp. Atk", + "Sp_Def": "Sp. Def", + "Speed": "Speed", + "Accuracy": "Accuracy", + "Evasiveness": "Evasiveness", + "rose": "rose", + "sharply_rose": "sharply rose", + "rose_drastically": "rose drastically", + "fell": "fell", + "harshly_fell": "harshly fell", + "severly_fell": "severly fell", + "levelChangeDescripion": "'s {{statsFragment}} {{description}}", + "won't_go_any_higher": "won\'t go any higher", + "won't_go_any_lower": "won\'t go any lower" +} as const; \ No newline at end of file diff --git a/src/locales/pt_BR/config.ts b/src/locales/pt_BR/config.ts index 157df19a80b..890e5665711 100644 --- a/src/locales/pt_BR/config.ts +++ b/src/locales/pt_BR/config.ts @@ -15,6 +15,7 @@ import { starterSelectUiHandler } from "./starter-select-ui-handler"; import { tutorial } from "./tutorial"; import { weather } from "./weather"; import { berry } from "./berry"; +import { battleStat } from "./battle-stat"; export const ptBrConfig = { @@ -35,4 +36,5 @@ export const ptBrConfig = { weather: weather, modifierType: modifierType, berry: berry, + battleStat: battleStat, } \ No newline at end of file diff --git a/src/locales/zh_CN/battle-stat.ts b/src/locales/zh_CN/battle-stat.ts new file mode 100644 index 00000000000..96cf9bfea90 --- /dev/null +++ b/src/locales/zh_CN/battle-stat.ts @@ -0,0 +1,21 @@ +import { SimpleTranslationEntries } from "#app/plugins/i18n"; + +export const battleStat: SimpleTranslationEntries = { + "critical-hit_ratio": "暴击率", + "Attack": "攻击", + "Defense": "防御", + "Sp_Atk": "特攻", + "Sp_Def": "特防", + "Speed": "速度", + "Accuracy": "命中率", + "Evasiveness": "闪避率", + "rose": "小幅上升", + "sharply_rose": "大幅上升", + "rose_drastically": "显著上升", + "fell": "小幅降低", + "harshly_fell": "大幅降低", + "severly_fell": "显著降低", + "levelChangeDescripion":"的 {{statsFragment}} {{description}}", + "won_'t_go_any_higher": "无法再上升", + "won_'t_go_any_lower": "无法再降低" +} as const; \ No newline at end of file diff --git a/src/locales/zh_CN/config.ts b/src/locales/zh_CN/config.ts index 9c3a62f59f0..39398e2fcfe 100644 --- a/src/locales/zh_CN/config.ts +++ b/src/locales/zh_CN/config.ts @@ -20,7 +20,7 @@ import { tutorial } from "./tutorial"; import { weather } from "./weather"; import { battleMessageUiHandler } from "./battle-message-ui-handler"; import { berry } from "./berry"; - +import { battleStat } from "./battle-stat"; export const zhCnConfig = { ability: ability, abilityTriggers: abilityTriggers, @@ -46,4 +46,5 @@ export const zhCnConfig = { weather: weather, battleMessageUiHandler: battleMessageUiHandler, berry: berry, + battleStat: battleStat, } \ No newline at end of file diff --git a/src/locales/zh_CN/modifier-type.ts b/src/locales/zh_CN/modifier-type.ts index 80ddc1f92dd..301bd881746 100644 --- a/src/locales/zh_CN/modifier-type.ts +++ b/src/locales/zh_CN/modifier-type.ts @@ -52,7 +52,7 @@ export const modifierType: ModifierTypeTranslationEntries = { description: "接下来的{{battleCount}}场战斗是双打的概率翻倍", }, "TempBattleStatBoosterModifierType": { - description: "为所有成员宝可梦提升一级{{tempBattleStatName}},持续5场战斗", + description: "为所有成员宝可梦提升一级{{tempBattleStatName}},\n持续5场战斗", }, "AttackTypeBoosterModifierType": { description: "一只宝可梦的{{moveType}}系招式威力提升20%", diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 1e21af58564..575d95efd9a 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -422,7 +422,7 @@ export class TempBattleStatBoosterModifierType extends ModifierType implements G } getDescription(scene: BattleScene): string { - return i18next.t(`modifierType:ModifierType.TempBattleStatBoosterModifierType.description`, { tempBattleStatName: getTempBattleStatName(this.tempBattleStat) }); + return i18next.t(`modifierType:ModifierType.TempBattleStatBoosterModifierType.description`, { tempBattleStatName: i18next.t(`battleStat:${getTempBattleStatName(this.tempBattleStat).replace(/\./g, '').replace(/[ ]/g, '_')}`) }); } getPregenArgs(): any[] { diff --git a/src/phases.ts b/src/phases.ts index 1137c85afa6..8afd2af6149 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2927,7 +2927,7 @@ export class StatChangePhase extends PokemonPhase { : `${relLevelStats.slice(0, -1).map(s => getBattleStatName(s)).join(', ')}${relLevelStats.length > 2 ? ',' : ''} and ${getBattleStatName(relLevelStats[relLevelStats.length - 1])}`; } else statsFragment = getBattleStatName(relLevelStats[0]); - messages.push(getPokemonMessage(this.getPokemon(), `'s ${statsFragment} ${getBattleStatLevelChangeDescription(Math.abs(parseInt(rl)), levels >= 1)}!`)); + messages.push(getPokemonMessage(this.getPokemon(), i18next.t('battleStat:levelChangeDescripion', { statsFragment: i18next.t(`battleStat:${statsFragment.replace(/\./g, '').replace(/[ ]/g, '_')}`), description: i18next.t(`battleStat:${getBattleStatLevelChangeDescription(Math.abs(parseInt(rl)), levels >= 1).replace(/\./g, '').replace(/[ ]/g, '_')}`) }))); }); return messages; diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index 5c9de28fe82..7a7653975f5 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -150,6 +150,7 @@ declare module 'i18next' { modifierType: ModifierTypeTranslationEntries; battleMessageUiHandler: SimpleTranslationEntries; berry: BerryTranslationEntries; + battleStat:SimpleTranslationEntries; }; } }