diff --git a/src/locales/pt_BR/ability-trigger.ts b/src/locales/pt_BR/ability-trigger.ts index 7237d4f4d5c..8851c885157 100644 --- a/src/locales/pt_BR/ability-trigger.ts +++ b/src/locales/pt_BR/ability-trigger.ts @@ -2,4 +2,5 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const abilityTriggers: SimpleTranslationEntries = { "blockRecoilDamage" : "{{abilityName}} de {{pokemonName}}\nprotegeu-o do dano de recuo!", + "badDreams": "{{pokemonName}} está tendo pesadelos!", } as const; diff --git a/src/locales/pt_BR/battle-message-ui-handler.ts b/src/locales/pt_BR/battle-message-ui-handler.ts index 3b7c009035f..b0d5d17e496 100644 --- a/src/locales/pt_BR/battle-message-ui-handler.ts +++ b/src/locales/pt_BR/battle-message-ui-handler.ts @@ -1,10 +1,10 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const battleMessageUiHandler: SimpleTranslationEntries = { - "ivBest": "Melhor", + "ivBest": "Perfeito", "ivFantastic": "Fantástico", "ivVeryGood": "Muito Bom", "ivPrettyGood": "Bom", "ivDecent": "Regular", "ivNoGood": "Ruim", -} as const; +} as const; diff --git a/src/locales/pt_BR/nature.ts b/src/locales/pt_BR/nature.ts index 0c3ffde12f9..47f2f5f0930 100644 --- a/src/locales/pt_BR/nature.ts +++ b/src/locales/pt_BR/nature.ts @@ -4,7 +4,7 @@ export const nature: SimpleTranslationEntries = { "Hardy": "Destemida", "Lonely": "Solitária", "Brave": "Valente", - "Adamant": "Rígida", + "Adamant": "Adamante", "Naughty": "Teimosa", "Bold": "Corajosa", "Docile": "Dócil", @@ -20,7 +20,7 @@ export const nature: SimpleTranslationEntries = { "Mild": "Mansa", "Quiet": "Quieta", "Bashful": "Atrapalhada", - "Rash": "Rabugenta", + "Rash": "Ousada", "Calm": "Calma", "Gentle": "Gentil", "Sassy": "Atrevida", diff --git a/src/locales/pt_BR/pokemon-info-container.ts b/src/locales/pt_BR/pokemon-info-container.ts index 068c9ebb431..2ee774888da 100644 --- a/src/locales/pt_BR/pokemon-info-container.ts +++ b/src/locales/pt_BR/pokemon-info-container.ts @@ -1,11 +1,11 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const pokemonInfoContainer: SimpleTranslationEntries = { - "moveset": "Moveset", - "gender": "Gender:", - "ability": "Ability:", - "nature": "Nature:", - "epic": "Epic", - "rare": "Rare", - "common": "Common" + "moveset": "Movimentos", + "gender": "Gênero:", + "ability": "Habilidade:", + "nature": "Natureza:", + "epic": "Épico", + "rare": "Raro", + "common": "Comum", } as const; diff --git a/src/locales/pt_BR/starter-select-ui-handler.ts b/src/locales/pt_BR/starter-select-ui-handler.ts index 7ff0b24b04d..4d4ee94505b 100644 --- a/src/locales/pt_BR/starter-select-ui-handler.ts +++ b/src/locales/pt_BR/starter-select-ui-handler.ts @@ -7,15 +7,15 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; */ export const starterSelectUiHandler: SimpleTranslationEntries = { "confirmStartTeam": "Começar com esses Pokémon?", - "gen1": "I", - "gen2": "II", - "gen3": "III", - "gen4": "IV", - "gen5": "V", - "gen6": "VI", - "gen7": "VII", - "gen8": "VIII", - "gen9": "IX", + "gen1": "G1", + "gen2": "G2", + "gen3": "G3", + "gen4": "G4", + "gen5": "G5", + "gen6": "G6", + "gen7": "G7", + "gen8": "G8", + "gen9": "G9", "growthRate": "Crescimento:", "ability": "Habilidade:", "passive": "Passiva:", @@ -30,12 +30,12 @@ export const starterSelectUiHandler: SimpleTranslationEntries = { "selectMoveSwapWith": "Escolha o movimento que substituirá", "unlockPassive": "Aprender Passiva", "reduceCost": "Reduzir Custo", - "cycleShiny": "R: Mudar Shiny", - "cycleForm": "F: Mudar Forma", - "cycleGender": "G: Mudar Gênero", - "cycleAbility": "E: Mudar Habilidade", - "cycleNature": "N: Mudar Natureza", - "cycleVariant": "V: Mudar Variante", + "cycleShiny": "R: » Shiny", + "cycleForm": "F: » Forma", + "cycleGender": "G: » Gênero", + "cycleAbility": "E: » Habilidade", + "cycleNature": "N: » Natureza", + "cycleVariant": "V: » Variante", "enablePassive": "Ativar Passiva", "disablePassive": "Desativar Passiva", "locked": "Bloqueada", diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index 256662048a7..cf4c94e1164 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -1,16 +1,48 @@ +import { getVariantTint } from "#app/data/variant"; import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; import BattleScene from "../battle-scene"; import { Gender, getGenderColor, getGenderSymbol } from "../data/gender"; +import { getNatureName } from "../data/nature"; +import { Type } from "../data/type"; import Pokemon from "../field/pokemon"; +import i18next from "../plugins/i18n"; +import * as Utils from "../utils"; +import ConfirmUiHandler from "./confirm-ui-handler"; import { StatsContainer } from "./stats-container"; import { TextStyle, addBBCodeTextObject, addTextObject, getTextColor } from "./text"; import { addWindow } from "./ui-theme"; -import { getNatureName } from "../data/nature"; -import * as Utils from "../utils"; -import { Type } from "../data/type"; -import { getVariantTint } from "#app/data/variant"; -import ConfirmUiHandler from "./confirm-ui-handler"; -import i18next from "../plugins/i18n"; + +interface LanguageSetting { + infoContainerTextSize: string; + infoContainerLabelXPos?: integer; + infoContainerTextXPos?: integer; +} + +const languageSettings: { [key: string]: LanguageSetting } = { + "en": { + infoContainerTextSize: "64px" + }, + "de": { + infoContainerTextSize: "64px" + }, + "es": { + infoContainerTextSize: "64px" + }, + "fr": { + infoContainerTextSize: "64px" + }, + "it": { + infoContainerTextSize: "64px" + }, + "zh": { + infoContainerTextSize: "64px" + }, + "pt": { + infoContainerTextSize: "60px", + infoContainerLabelXPos: -16, + infoContainerTextXPos: -12, + }, +}; export default class PokemonInfoContainer extends Phaser.GameObjects.Container { private readonly infoWindowWidth = 104; @@ -41,6 +73,9 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { } setup(): void { + const currentLanguage = i18next.language; + const langSettingKey = Object.keys(languageSettings).find(lang => currentLanguage.includes(lang)); + const textSettings = languageSettings[langSettingKey]; const infoBg = addWindow(this.scene, 0, 0, this.infoWindowWidth, 132); infoBg.setOrigin(0.5, 0.5); @@ -87,29 +122,36 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { this.add(infoBg); this.add(this.statsContainer); - this.pokemonGenderLabelText = addTextObject(this.scene, -18, 18, i18next.t("pokemonInfoContainer:gender"), TextStyle.WINDOW, { fontSize: "64px" }); + // The position should be set per language + const infoContainerLabelXPos = textSettings?.infoContainerLabelXPos || -18; + const infoContainerTextXPos = textSettings?.infoContainerTextXPos || -14; + + // The font size should be set by language + const infoContainerTextSize = textSettings?.infoContainerTextSize || "64px"; + + this.pokemonGenderLabelText = addTextObject(this.scene, infoContainerLabelXPos, 18, i18next.t("pokemonInfoContainer:gender"), TextStyle.WINDOW, { fontSize: infoContainerTextSize }); this.pokemonGenderLabelText.setOrigin(1, 0); this.pokemonGenderLabelText.setVisible(false); this.add(this.pokemonGenderLabelText); - this.pokemonGenderText = addTextObject(this.scene, -14, 18, "", TextStyle.WINDOW, { fontSize: "64px" }); + this.pokemonGenderText = addTextObject(this.scene, infoContainerTextXPos, 18, "", TextStyle.WINDOW, { fontSize: infoContainerTextSize }); this.pokemonGenderText.setOrigin(0, 0); this.pokemonGenderText.setVisible(false); this.add(this.pokemonGenderText); - this.pokemonAbilityLabelText = addTextObject(this.scene, -18, 28, i18next.t("pokemonInfoContainer:ability"), TextStyle.WINDOW, { fontSize: "64px" }); + this.pokemonAbilityLabelText = addTextObject(this.scene, infoContainerLabelXPos, 28, i18next.t("pokemonInfoContainer:ability"), TextStyle.WINDOW, { fontSize: infoContainerTextSize }); this.pokemonAbilityLabelText.setOrigin(1, 0); this.add(this.pokemonAbilityLabelText); - this.pokemonAbilityText = addTextObject(this.scene, -14, 28, "", TextStyle.WINDOW, { fontSize: "64px" }); + this.pokemonAbilityText = addTextObject(this.scene, infoContainerTextXPos, 28, "", TextStyle.WINDOW, { fontSize: infoContainerTextSize }); this.pokemonAbilityText.setOrigin(0, 0); this.add(this.pokemonAbilityText); - this.pokemonNatureLabelText = addTextObject(this.scene, -18, 38, i18next.t("pokemonInfoContainer:nature"), TextStyle.WINDOW, { fontSize: "64px" }); + this.pokemonNatureLabelText = addTextObject(this.scene, infoContainerLabelXPos, 38, i18next.t("pokemonInfoContainer:nature"), TextStyle.WINDOW, { fontSize: infoContainerTextSize }); this.pokemonNatureLabelText.setOrigin(1, 0); this.add(this.pokemonNatureLabelText); - this.pokemonNatureText = addBBCodeTextObject(this.scene, -14, 38, "", TextStyle.WINDOW, { fontSize: "64px", lineSpacing: 3, maxLines: 2 }); + this.pokemonNatureText = addBBCodeTextObject(this.scene, infoContainerTextXPos, 38, "", TextStyle.WINDOW, { fontSize: infoContainerTextSize, lineSpacing: 3, maxLines: 2 }); this.pokemonNatureText.setOrigin(0, 0); this.add(this.pokemonNatureText); diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index ebae5b12b53..830459f8544 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -76,9 +76,9 @@ const languageSettings: { [key: string]: LanguageSetting } = { starterInfoYOffset: 2 }, "pt":{ - starterInfoTextSize: "47px", - instructionTextSize: "38px", - starterInfoXPos: 32, + starterInfoTextSize: "48px", + instructionTextSize: "42px", + starterInfoXPos: 33, }, };