[Localization] include pokemon names, stats into battle:stat* keys (#2373)
* [Localization] include pokemon names, stats into battle:stat* keys * [Localization(fr)] Update stat change messages Co-Authored-By: Lugiad <adrien.grivel@hotmail.fr> * [Localization(es)] Update stat change messages Co-Authored-By: GoldTra <162721984+GoldTra@users.noreply.github.com> --------- Co-authored-by: Lugiad <adrien.grivel@hotmail.fr> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>
This commit is contained in:
parent
db06c53693
commit
cb5016d10f
|
@ -32,34 +32,38 @@ export function getBattleStatName(stat: BattleStat) {
|
|||
}
|
||||
}
|
||||
|
||||
export function getBattleStatLevelChangeDescription(levels: integer, up: boolean) {
|
||||
export function getBattleStatLevelChangeDescription(pokemonNameWithAffix: string, stats: string, levels: integer, up: boolean) {
|
||||
const stringKey = (() => {
|
||||
if (up) {
|
||||
switch (levels) {
|
||||
case 1:
|
||||
return i18next.t("battle:statRose");
|
||||
return "battle:statRose";
|
||||
case 2:
|
||||
return i18next.t("battle:statSharplyRose");
|
||||
return "battle:statSharplyRose";
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
return i18next.t("battle:statRoseDrastically");
|
||||
return "battle:statRoseDrastically";
|
||||
default:
|
||||
return i18next.t("battle:statWontGoAnyHigher");
|
||||
return "battle:statWontGoAnyHigher";
|
||||
}
|
||||
} else {
|
||||
switch (levels) {
|
||||
case 1:
|
||||
return i18next.t("battle:statFell");
|
||||
return "battle:statFell";
|
||||
case 2:
|
||||
return i18next.t("battle:statHarshlyFell");
|
||||
return "battle:statHarshlyFell";
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
return i18next.t("battle:statSeverelyFell");
|
||||
return "battle:statSeverelyFell";
|
||||
default:
|
||||
return i18next.t("battle:statWontGoAnyLower");
|
||||
return "battle:statWontGoAnyLower";
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
return i18next.t(stringKey, { pokemonNameWithAffix, stats });
|
||||
}
|
||||
|
|
|
@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
|
|||
"drainMessage": "{{pokemonName}} wurde Energie abgesaugt",
|
||||
"regainHealth": "KP von {{pokemonName}} wurden wieder aufgefrischt!",
|
||||
"fainted": "{{pokemonNameWithAffix}} wurde besiegt!",
|
||||
"statRose": "steigt",
|
||||
"statSharplyRose": "steigt stark",
|
||||
"statRoseDrastically": "steigt drastisch",
|
||||
"statWontGoAnyHigher": "kann nicht weiter erhöht werden",
|
||||
"statFell": "sinkt",
|
||||
"statHarshlyFell": "sinkt stark",
|
||||
"statSeverelyFell": "sinkt drastisch",
|
||||
"statWontGoAnyLower": "kann nicht weiter sinken",
|
||||
"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!",
|
||||
"ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!",
|
||||
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} kann sich wegen des Rückstoßes durch den Angriff nicht bewegen!",
|
||||
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} kann nicht mehr fliehen!",
|
||||
|
|
|
@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
|
|||
"drainMessage": "{{pokemonName}} had its\nenergy drained!",
|
||||
"regainHealth": "{{pokemonName}} regained\nhealth!",
|
||||
"fainted": "{{pokemonNameWithAffix}} fainted!",
|
||||
"statRose": "rose",
|
||||
"statSharplyRose": "sharply rose",
|
||||
"statRoseDrastically": "rose drastically",
|
||||
"statWontGoAnyHigher": "won't go any higher",
|
||||
"statFell": "fell",
|
||||
"statHarshlyFell": "harshly fell",
|
||||
"statSeverelyFell": "severely fell",
|
||||
"statWontGoAnyLower": "won't go any lower",
|
||||
"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!",
|
||||
"ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!",
|
||||
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} must\nrecharge!",
|
||||
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} can no\nlonger escape!",
|
||||
|
|
|
@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
|
|||
"drainMessage": "¡{{pokemonName}} tuvo su\nenergía absorbida!",
|
||||
"regainHealth": "¡{{pokemonName}} recuperó\nPS!",
|
||||
"fainted": "¡{{pokemonNameWithAffix}} se debilitó!",
|
||||
"statRose": "rose",
|
||||
"statSharplyRose": "sharply rose",
|
||||
"statRoseDrastically": "rose drastically",
|
||||
"statWontGoAnyHigher": "won't go any higher",
|
||||
"statFell": "fell",
|
||||
"statHarshlyFell": "harshly fell",
|
||||
"statSeverelyFell": "severely fell",
|
||||
"statWontGoAnyLower": "won't go any lower",
|
||||
"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!",
|
||||
"ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!",
|
||||
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} must\nrecharge!",
|
||||
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} can no\nlonger escape!",
|
||||
|
|
|
@ -64,15 +64,15 @@ 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": "augmente",
|
||||
"statSharplyRose": "augmente beaucoup",
|
||||
"statRoseDrastically": "augmente énormément",
|
||||
"statWontGoAnyHigher": "ne peut plus augmenter",
|
||||
"statFell": "baisse",
|
||||
"statHarshlyFell": "baisse beaucoup",
|
||||
"statSeverelyFell": "baisse énormément",
|
||||
"statWontGoAnyLower": "ne peut plus baisser",
|
||||
"ppReduced": "Les PP de la capacité {{moveName}}\nde {{targetName}} sont réduits de {{reduction}} !",
|
||||
"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 !",
|
||||
"ppReduced": "Les PP de la capacité {{moveName}}\nde {{targetName}} baissent de {{reduction}} !",
|
||||
"battlerTagsRechargingLapse": "Le contrecoup empêche {{pokemonNameWithAffix}}\n de bouger !",
|
||||
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}}\nne peut plus s’échapper !",
|
||||
"battlerTagsTrappedOnRemove": "{{pokemonNameWithAffix}} est libéré\nde la capacité {{moveName}} !",
|
||||
|
|
|
@ -64,14 +64,14 @@ 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": "è aumentato/a",
|
||||
"statSharplyRose": "è aumentato/a molto",
|
||||
"statRoseDrastically": "è aumentato/a drasticamente",
|
||||
"statWontGoAnyHigher": "non può aumentare più di così",
|
||||
"statFell": "è diminuito/a",
|
||||
"statHarshlyFell": "è diminuito/a molto",
|
||||
"statSeverelyFell": "è diminuito/a drasticamente",
|
||||
"statWontGoAnyLower": "non può diminuire più di così",
|
||||
"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ì!",
|
||||
"ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!",
|
||||
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} deve\nricaricarsi!",
|
||||
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} non può\npiù fuggire!",
|
||||
|
|
|
@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
|
|||
"drainMessage": "{{pokemonName}}[[로]]부터\n체력을 흡수했다!",
|
||||
"regainHealth": "{{pokemonName}}[[는]]\n체력을 회복했다!",
|
||||
"fainted": "{{pokemonNameWithAffix}}[[는]] 쓰러졌다!",
|
||||
"statRose": "[[가]] 올라갔다!",
|
||||
"statSharplyRose": "[[가]] 크게 올라갔다!",
|
||||
"statRoseDrastically": "[[가]] 매우 크게 올라갔다!",
|
||||
"statWontGoAnyHigher": "[[는]] 더 올라가지 않는다!",
|
||||
"statFell": "[[가]] 떨어졌다!",
|
||||
"statHarshlyFell": "[[가]] 크게 떨어졌다!",
|
||||
"statSeverelyFell": "[[가]] 매우 크게 떨어졌다!",
|
||||
"statWontGoAnyLower": "[[는]] 더 떨어지지 않는다!",
|
||||
"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}}[[는]] 더 떨어지지 않는다!",
|
||||
"ppReduced": "{{targetName}}의\n{{moveName}}[[를]] {{reduction}} 깎았다!",
|
||||
"battlerTagsRechargingLapse": "공격의 반동으로\n{{pokemonNameWithAffix}}[[는]] 움직일 수 없다!",
|
||||
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}}[[는]]\n이제 도망칠 수 없다!",
|
||||
|
|
|
@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
|
|||
"drainMessage": "{{pokemonName}} teve sua\nenergia drenada!",
|
||||
"regainHealth": "{{pokemonName}} recuperou\npontos de saúde!",
|
||||
"fainted": "{{pokemonNameWithAffix}} desmaiou!",
|
||||
"statRose": "aumentou",
|
||||
"statSharplyRose": "aumentou bruscamente",
|
||||
"statRoseDrastically": "aumentou drasticamente",
|
||||
"statWontGoAnyHigher": "não vai mais aumentar",
|
||||
"statFell": "diminuiu",
|
||||
"statHarshlyFell": "diminuiu duramente",
|
||||
"statSeverelyFell": "diminuiu severamente",
|
||||
"statWontGoAnyLower": "não vai mais diminuir",
|
||||
"statRose": "{{pokemonNameWithAffix}}'s {{stats}} aumentou!",
|
||||
"statSharplyRose": "{{pokemonNameWithAffix}}'s {{stats}} aumentou bruscamente!",
|
||||
"statRoseDrastically": "{{pokemonNameWithAffix}}'s {{stats}} aumentou drasticamente!",
|
||||
"statWontGoAnyHigher": "{{pokemonNameWithAffix}}'s {{stats}} não vai mais aumentar!",
|
||||
"statFell": "{{pokemonNameWithAffix}}'s {{stats}} diminuiu!",
|
||||
"statHarshlyFell": "{{pokemonNameWithAffix}}'s {{stats}} diminuiu duramente!",
|
||||
"statSeverelyFell": "{{pokemonNameWithAffix}}'s {{stats}} diminuiu severamente!",
|
||||
"statWontGoAnyLower": "{{pokemonNameWithAffix}}'s {{stats}} não vai mais diminuir!",
|
||||
"ppReduced": "O PP do movimento {{moveName}} de\n{{targetName}} foi reduzido em {{reduction}}!",
|
||||
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} precisa\nrecarregar!",
|
||||
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} não pode\nmais escapar!",
|
||||
|
|
|
@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
|
|||
"drainMessage": "{{pokemonName}} 吸取了体力!",
|
||||
"regainHealth": "{{pokemonName}} 回复了体力!",
|
||||
"fainted": "{{pokemonNameWithAffix}} 倒下了!",
|
||||
"statRose": "提高了!",
|
||||
"statSharplyRose": "大幅提高了!",
|
||||
"statRoseDrastically": "极大幅提高了!",
|
||||
"statWontGoAnyHigher": "已经无法再提高了!",
|
||||
"statFell": "降低了!",
|
||||
"statHarshlyFell": "大幅降低了!",
|
||||
"statSeverelyFell": "极大幅降低了!",
|
||||
"statWontGoAnyLower": "已经无法再降低了!",
|
||||
"statRose": "{{pokemonNameWithAffix}}'s {{stats}} 提高了!",
|
||||
"statSharplyRose": "{{pokemonNameWithAffix}}'s {{stats}} 大幅提高了!",
|
||||
"statRoseDrastically": "{{pokemonNameWithAffix}}'s {{stats}} 极大幅提高了!",
|
||||
"statWontGoAnyHigher": "{{pokemonNameWithAffix}}'s {{stats}} 已经无法再提高了!",
|
||||
"statFell": "{{pokemonNameWithAffix}}'s {{stats}} 降低了!",
|
||||
"statHarshlyFell": "{{pokemonNameWithAffix}}'s {{stats}} 大幅降低了!",
|
||||
"statSeverelyFell": "{{pokemonNameWithAffix}}'s {{stats}} 极大幅降低了!",
|
||||
"statWontGoAnyLower": "{{pokemonNameWithAffix}}'s {{stats}} 已经无法再降低了!",
|
||||
"ppReduced": "降低了 {{targetName}} 的\n{{moveName}} 的PP{{reduction}}点!",
|
||||
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}}因攻击的反作用力而无法动弹!",
|
||||
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}}不能逃跑!",
|
||||
|
|
|
@ -61,14 +61,14 @@ export const battle: SimpleTranslationEntries = {
|
|||
"drainMessage": "{{pokemonName}} had its\nenergy drained!",
|
||||
"regainHealth": "{{pokemonName}} regained\nhealth!",
|
||||
"fainted": "{{pokemonNameWithAffix}} fainted!",
|
||||
"statRose": "rose",
|
||||
"statSharplyRose": "sharply rose",
|
||||
"statRoseDrastically": "rose drastically",
|
||||
"statWontGoAnyHigher": "won't go any higher",
|
||||
"statFell": "fell",
|
||||
"statHarshlyFell": "harshly fell",
|
||||
"statSeverelyFell": "severely fell",
|
||||
"statWontGoAnyLower": "won't go any lower",
|
||||
"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!",
|
||||
"ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!",
|
||||
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} must\nrecharge!",
|
||||
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} can no\nlonger escape!",
|
||||
|
|
|
@ -3380,7 +3380,7 @@ export class StatChangePhase extends PokemonPhase {
|
|||
} else {
|
||||
statsFragment = getBattleStatName(relLevelStats[0]);
|
||||
}
|
||||
messages.push(getPokemonMessage(this.getPokemon(), `'s ${statsFragment} ${getBattleStatLevelChangeDescription(Math.abs(parseInt(rl)), levels >= 1)}!`));
|
||||
messages.push(getBattleStatLevelChangeDescription(getPokemonNameWithAffix(this.getPokemon()), statsFragment, Math.abs(parseInt(rl)), levels >= 1));
|
||||
});
|
||||
|
||||
return messages;
|
||||
|
|
|
@ -41,7 +41,7 @@ function testBattleStatName(stat: BattleStat, expectMessage: string) {
|
|||
}
|
||||
|
||||
function testBattleStatLevelChangeDescription(levels: integer, up: boolean, expectMessage: string) {
|
||||
const message = getBattleStatLevelChangeDescription(levels, up);
|
||||
const message = getBattleStatLevelChangeDescription("{{pokemonNameWithAffix}}", "{{stats}}", levels, up);
|
||||
console.log(`message ${message}, expected ${expectMessage}`);
|
||||
expect(message).toBe(expectMessage);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue