From e4d3f73dee44d92c37721523af380f2de1248292 Mon Sep 17 00:00:00 2001 From: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Date: Mon, 13 May 2024 18:06:26 +0200 Subject: [PATCH] ToggleSize is now dependend on language + added some missing german translations (#797) --- src/locales/de/fight-ui-handler.ts | 6 ++--- src/locales/de/growth.ts | 12 +++++----- src/ui/starter-select-ui-handler.ts | 36 ++++++++++++++++++++++++++--- 3 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/locales/de/fight-ui-handler.ts b/src/locales/de/fight-ui-handler.ts index 7546e9af66a..4d94d24f34f 100644 --- a/src/locales/de/fight-ui-handler.ts +++ b/src/locales/de/fight-ui-handler.ts @@ -1,7 +1,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const fightUiHandler: SimpleTranslationEntries = { - "pp": "PP", - "power": "Power", - "accuracy": "Accuracy", + "pp": "AP", + "power": "Stärke", + "accuracy": "Genauigkeit", } as const; \ No newline at end of file diff --git a/src/locales/de/growth.ts b/src/locales/de/growth.ts index a0d1cb5eeaa..28dcf8de4bb 100644 --- a/src/locales/de/growth.ts +++ b/src/locales/de/growth.ts @@ -1,10 +1,10 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const growth: SimpleTranslationEntries = { - "Erratic": "Erratic", - "Fast": "Fast", - "Medium_Fast": "Medium Fast", - "Medium_Slow": "Medium Slow", - "Slow": "Slow", - "Fluctuating": "Fluctuating" + "Erratic": "Unregelmäßig", + "Fast": "Schnell", + "Medium_Fast": "Schneller", + "Medium_Slow": "Langsamer", + "Slow": "Langsam", + "Fluctuating": "Schwankend" } as const; \ No newline at end of file diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 2daec8c70d5..2f33481d6f1 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -551,7 +551,35 @@ export default class StarterSelectUiHandler extends MessageUiHandler { 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.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); if (cycleInstructionLines.length > 2) cycleInstructionLines[1] += ' | ' + cycleInstructionLines.splice(2, 1); + if (cycleInstructionLines.length > 2) + cycleInstructionLines[2] += ' | ' + cycleInstructionLines.splice(3, 1); } for (let cil of cycleInstructionLines) @@ -1301,7 +1331,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { growthReadable = i18next.t("growth:"+ growthAux as any) } this.pokemonGrowthRateText.setText(growthReadable); - + this.pokemonGrowthRateText.setColor(getGrowthRateColor(species.growthRate)); this.pokemonGrowthRateText.setShadowColor(getGrowthRateColor(species.growthRate, true)); this.pokemonGrowthRateLabelText.setVisible(true); @@ -1588,7 +1618,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { }) as StarterMoveset; const speciesForm = getPokemonSpeciesForm(species.speciesId, formIndex); - + const formText = species?.forms[formIndex]?.formKey.split('-'); for (let i = 0; i < formText?.length; i++) formText[i] = formText[i].charAt(0).toUpperCase() + formText[i].substring(1);