From d19e078fdbcd1d978a56292d928283498e42dfd4 Mon Sep 17 00:00:00 2001 From: Rei1mu <94012185+Rei1mu@users.noreply.github.com> Date: Sat, 18 May 2024 11:10:06 +0800 Subject: [PATCH] Update phases.ts --- src/phases.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/phases.ts b/src/phases.ts index 8afd2af6149..1a403822e5a 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2927,7 +2927,10 @@ 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(), 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, '_')}`) }))); + let battleStatTmp=statsFragment.replace(/\./g, '').replace(/[ ]/g, '_'); + let battleStatLevelChangeDescriptionTmp=getBattleStatLevelChangeDescription(Math.abs(parseInt(rl)), levels >= 1).replace(/\./g, '').replace(/[ ]/g, '_'); + //replace() is for "Sp. Atk" =>"Sp_Atk" and can be translate + messages.push(getPokemonMessage(this.getPokemon(), i18next.t('battleStat:levelChangeDescripion', { statsFragment: i18next.t(`battleStat:${battleStatTmp}`), description: i18next.t(`battleStat:${battleStatLevelChangeDescriptionTmp}`) }))); }); return messages;