ToggleSize is now dependend on language + added some missing german translations (#797)

pull/728/merge
Jannik Tappert 2024-05-13 18:06:26 +02:00 committed by GitHub
parent b189289890
commit e4d3f73dee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 42 additions and 12 deletions

View File

@ -1,7 +1,7 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n"; import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const fightUiHandler: SimpleTranslationEntries = { export const fightUiHandler: SimpleTranslationEntries = {
"pp": "PP", "pp": "AP",
"power": "Power", "power": "Stärke",
"accuracy": "Accuracy", "accuracy": "Genauigkeit",
} as const; } as const;

View File

@ -1,10 +1,10 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n"; import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const growth: SimpleTranslationEntries = { export const growth: SimpleTranslationEntries = {
"Erratic": "Erratic", "Erratic": "Unregelmäßig",
"Fast": "Fast", "Fast": "Schnell",
"Medium_Fast": "Medium Fast", "Medium_Fast": "Schneller",
"Medium_Slow": "Medium Slow", "Medium_Slow": "Langsamer",
"Slow": "Slow", "Slow": "Langsam",
"Fluctuating": "Fluctuating" "Fluctuating": "Schwankend"
} as const; } as const;

View File

@ -551,7 +551,35 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.starterSelectContainer.add(this.pokemonEggMovesContainer); this.starterSelectContainer.add(this.pokemonEggMovesContainer);
this.instructionsText = addTextObject(this.scene, 4, 156, '', TextStyle.PARTY, { fontSize: '42px' });
let instructionTextSize = '42px';
// The font size should be set per language
const currentLanguage = i18next.language;
switch (currentLanguage) {
case 'en':
instructionTextSize = '42px';
break;
case 'es':
instructionTextSize = '35px';
break;
case 'fr':
instructionTextSize = '42px';
break;
case 'de':
instructionTextSize = '35px';
break;
case 'it':
instructionTextSize = '38px';
break;
case 'zh_CN':
instructionTextSize = '42px';
break;
}
this.instructionsText = addTextObject(this.scene, 4, 156, '', TextStyle.PARTY, { fontSize: instructionTextSize });
this.starterSelectContainer.add(this.instructionsText); this.starterSelectContainer.add(this.instructionsText);
this.starterSelectMessageBoxContainer = this.scene.add.container(0, this.scene.game.canvas.height / 6); this.starterSelectMessageBoxContainer = this.scene.add.container(0, this.scene.game.canvas.height / 6);
@ -1137,6 +1165,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
cycleInstructionLines[0] += ' | ' + cycleInstructionLines.splice(1, 1); cycleInstructionLines[0] += ' | ' + cycleInstructionLines.splice(1, 1);
if (cycleInstructionLines.length > 2) if (cycleInstructionLines.length > 2)
cycleInstructionLines[1] += ' | ' + cycleInstructionLines.splice(2, 1); cycleInstructionLines[1] += ' | ' + cycleInstructionLines.splice(2, 1);
if (cycleInstructionLines.length > 2)
cycleInstructionLines[2] += ' | ' + cycleInstructionLines.splice(3, 1);
} }
for (let cil of cycleInstructionLines) for (let cil of cycleInstructionLines)