Fixed the ptBR text in starter menu popping out of the info box... (#902)

* Fixes the ptBR text in starter menu popping out of the info box and added language personalization, changed some ptBR natures and ordered thw switch case in alphabetic order

* Small fix
pull/912/head
José Ricardo Fleury Oliveira 2024-05-15 12:13:35 -03:00 committed by GitHub
parent adf5690383
commit 9b8af7ad71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 44 additions and 17 deletions

View File

@ -8,7 +8,7 @@ export const nature: SimpleTranslationEntries = {
"Naughty": "Teimosa",
"Bold": "Corajosa",
"Docile": "Dócil",
"Relaxed": "Descontraída",
"Relaxed": "Relaxada",
"Impish": "Inquieta",
"Lax": "Relaxada",
"Timid": "Tímida",
@ -20,7 +20,7 @@ export const nature: SimpleTranslationEntries = {
"Mild": "Mansa",
"Quiet": "Quieta",
"Bashful": "Atrapalhada",
"Rash": "Imprudente",
"Rash": "Rabugenta",
"Calm": "Calma",
"Gentle": "Gentil",
"Sassy": "Atrevida",

View File

@ -8,9 +8,9 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const starterSelectUiHandler: SimpleTranslationEntries = {
"confirmStartTeam": 'Começar com esses Pokémon?',
"growthRate": "Crescimento:",
"ability": "Hab.:",
"ability": "Habilidade:",
"passive": "Passiva:",
"nature": "Nature:",
"nature": "Natureza:",
"eggMoves": "Mov. de Ovo",
"start": "Iniciar",
"addToParty": "Adicionar à equipe",
@ -25,11 +25,11 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"cycleForm": 'F: Mudar Forma',
"cycleGender": 'G: Mudar Gênero',
"cycleAbility": 'E: Mudar Habilidade',
"cycleNature": 'N: Mudar Nature',
"cycleNature": 'N: Mudar Natureza',
"cycleVariant": 'V: Mudar Variante',
"enablePassive": "Ativar Passiva",
"disablePassive": "Desativar Passiva",
"locked": "Bloqueado",
"disabled": "Desativado",
"locked": "Bloqueada",
"disabled": "Desativada",
"uncaught": "Não capturado"
}

View File

@ -245,30 +245,54 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.pokemonUncaughtText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonUncaughtText);
this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, i18next.t("starterSelectUiHandler:ability"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
let starterInfoXPosition = 31; // Only text
// The position should be set per language
const currentLanguage = i18next.language;
switch (currentLanguage) {
case 'pt_BR':
starterInfoXPosition = 32;
break;
default:
starterInfoXPosition = 31;
break
}
let starterInfoTextSize = '56px'; // Labels and text
// The font size should be set per language
// currentLanguage is already defined
switch (currentLanguage) {
case 'pt_BR':
starterInfoTextSize = '47px';
break;
default:
starterInfoTextSize = '56px';
break
}
this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, i18next.t("starterSelectUiHandler:ability"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonAbilityLabelText.setOrigin(0, 0);
this.pokemonAbilityLabelText.setVisible(false);
this.starterSelectContainer.add(this.pokemonAbilityLabelText);
this.pokemonAbilityText = addTextObject(this.scene, 31, 127, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
this.pokemonAbilityText = addTextObject(this.scene, starterInfoXPosition, 127, '', TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonAbilityText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonAbilityText);
this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, i18next.t("starterSelectUiHandler:passive"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, i18next.t("starterSelectUiHandler:passive"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonPassiveLabelText.setOrigin(0, 0);
this.pokemonPassiveLabelText.setVisible(false);
this.starterSelectContainer.add(this.pokemonPassiveLabelText);
this.pokemonPassiveText = addTextObject(this.scene, 31, 136, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
this.pokemonPassiveText = addTextObject(this.scene, starterInfoXPosition, 136, '', TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonPassiveText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonPassiveText);
this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, i18next.t("starterSelectUiHandler:nature"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, i18next.t("starterSelectUiHandler:nature"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonNatureLabelText.setOrigin(0, 0);
this.pokemonNatureLabelText.setVisible(false);
this.starterSelectContainer.add(this.pokemonNatureLabelText);
this.pokemonNatureText = addBBCodeTextObject(this.scene, 31, 145, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
this.pokemonNatureText = addBBCodeTextObject(this.scene, starterInfoXPosition, 145, '', TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonNatureText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonNatureText);
@ -556,8 +580,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
let instructionTextSize = '42px';
// The font size should be set per language
const currentLanguage = i18next.language;
// currentLanguage is already defined in the previous code block
switch (currentLanguage) {
case 'de':
instructionTextSize = '35px';
break;
case 'en':
instructionTextSize = '42px';
break;
@ -567,12 +594,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
case 'fr':
instructionTextSize = '42px';
break;
case 'de':
instructionTextSize = '35px';
break;
case 'it':
instructionTextSize = '38px';
break;
case 'pt_BR':
instructionTextSize = '38px';
break;
case 'zh_CN':
instructionTextSize = '42px';
break;