From 68c9dafcbc3bf08dff9929555e10f5deef13b1d9 Mon Sep 17 00:00:00 2001 From: rnicar Date: Mon, 6 May 2024 16:10:49 +0200 Subject: [PATCH] Spanish translations, new literals for all langs (starter-select-ui-handler) --- src/locales/de/menu.ts | 20 ++++++++++++ src/locales/en/menu.ts | 20 ++++++++++++ src/locales/es/menu.ts | 36 ++++++++++++++++++++++ src/locales/es/pokemon-stat.ts | 8 ++--- src/locales/es/tutorial.ts | 4 +-- src/locales/fr/menu.ts | 20 ++++++++++++ src/locales/it/menu.ts | 20 ++++++++++++ src/ui/starter-select-ui-handler.ts | 48 ++++++++++++++--------------- 8 files changed, 146 insertions(+), 30 deletions(-) diff --git a/src/locales/de/menu.ts b/src/locales/de/menu.ts index 3f86ae41a7e..37d856f687c 100644 --- a/src/locales/de/menu.ts +++ b/src/locales/de/menu.ts @@ -44,4 +44,24 @@ export const menu: SimpleTranslationEntries = { "yes":"Yes", "no":"No", "confirmStartTeam":'Begin with these Pokémon?', + "growthRate": "Growth Rate:", + "ability": "Ability:", + "passive": "Passive:", + "nature": "Nature:", + "eggMoves": 'Egg Moves', + "start": "Start", + "addToParty": "Add to Party", + "toggleIVs": 'Toggle IVs', + "manageMoves": 'Manage Moves', + "useCandies": 'Use Candies', + "selectMoveSwapOut": "Select a move to swap out.", + "selectMoveSwapWith": "Select a move to swap with", + "unlockPassive": "Unlock Passive", + "reduceCost": "Reduce Cost", + "cycleShiny": "R: Cycle Shiny", + "cycleForm": 'F: Cycle Form', + "cycleGender": 'G: Cycle Gender', + "cycleAbility": 'E: Cycle Ability', + "cycleNature": 'N: Cycle Nature', + "cycleVariant": 'V: Cycle Variant' } as const; \ No newline at end of file diff --git a/src/locales/en/menu.ts b/src/locales/en/menu.ts index 887f3d87834..d3656ce1793 100644 --- a/src/locales/en/menu.ts +++ b/src/locales/en/menu.ts @@ -44,4 +44,24 @@ export const menu: SimpleTranslationEntries = { "yes":"Yes", "no":"No", "confirmStartTeam":'Begin with these Pokémon?', + "growthRate": "Growth Rate:", + "ability": "Ability:", + "passive": "Passive:", + "nature": "Nature:", + "eggMoves": 'Egg Moves', + "start": "Start", + "addToParty": "Add to Party", + "toggleIVs": 'Toggle IVs', + "manageMoves": 'Manage Moves', + "useCandies": 'Use Candies', + "selectMoveSwapOut": "Select a move to swap out.", + "selectMoveSwapWith": "Select a move to swap with", + "unlockPassive": "Unlock Passive", + "reduceCost": "Reduce Cost", + "cycleShiny": "R: Cycle Shiny", + "cycleForm": 'F: Cycle Form', + "cycleGender": 'G: Cycle Gender', + "cycleAbility": 'E: Cycle Ability', + "cycleNature": 'N: Cycle Nature', + "cycleVariant": 'V: Cycle Variant' } as const; \ No newline at end of file diff --git a/src/locales/es/menu.ts b/src/locales/es/menu.ts index 5569c1e1668..2fe873afca4 100644 --- a/src/locales/es/menu.ts +++ b/src/locales/es/menu.ts @@ -13,6 +13,22 @@ export const menu: SimpleTranslationEntries = { "newGame": "Nueva partida", "selectGameMode": "Elige un modo de juego.", "logInOrCreateAccount": "Inicia sesión o crea una cuenta para empezar. ¡No se requiere correo electrónico!", + "username": "Usuario", + "password": "Contraseña", + "login": "Iniciar Sesión", + "register": "Registrarse", + "emptyUsername": "El usuario no puede estar vacío", + "invalidLoginUsername": "El usuario no es válido", + "invalidRegisterUsername": "El usuario solo puede contener letras, números y guiones bajos", + "invalidLoginPassword": "La contraseña no es válida", + "invalidRegisterPassword": "Contraseña debe tener 6 o más caracter.", + "usernameAlreadyUsed": "El usuario ya está en uso", + "accountNonExistent": "El usuario no existe", + "unmatchingPassword": "La contraseña no coincide", + "passwordNotMatchingConfirmPassword": "Las contraseñas deben coincidir", + "confirmPassword": "Confirmar Contra.", + "registrationAgeWarning": "Al registrarte, confirmas tener 13 o más años de edad.", + "backToLogin": "Volver al Login", "failedToLoadSaveData": "No se ha podido cargar los datos guardados. Por favor, recarga la página.\nSi el fallo continúa, por favor contacta al administrador.", "sessionSuccess": "Sesión cargada con éxito.", "failedToLoadSession": "No se ha podido cargar los datos de tu sesión.\nPuede que estén corruptos.", @@ -28,4 +44,24 @@ export const menu: SimpleTranslationEntries = { "yes":"Sí", "no":"No", "confirmStartTeam":'¿Comenzar con estos Pokémon?', + "growthRate": "Crecimiento:", + "ability": "Habilid:", + "passive": "Pasiva:", + "nature": "Natur:", + "eggMoves": "Mov. Huevo", + "start": "Iniciar", + "addToParty": "Añadir a Equipo", + "toggleIVs": "Mostrar IVs", + "manageMoves": "Gestionar Movs.", + "useCandies": "Usar Caramelos", + "selectMoveSwapOut": "Elige el movimiento que sustituir.", + "selectMoveSwapWith": "Elige el movimiento que sustituirá a", + "unlockPassive": "Añadir Pasiva", + "reduceCost": "Reducir Coste", + "cycleShiny": "R: Cambiar Shiny", + "cycleForm": 'F: Cambiar Forma', + "cycleGender": 'G: Cambiar Género', + "cycleAbility": 'E: Cambiar Habilidad', + "cycleNature": 'N: Cambiar Naturaleza', + "cycleVariant": 'V: Cambiar Variante' } as const; \ No newline at end of file diff --git a/src/locales/es/pokemon-stat.ts b/src/locales/es/pokemon-stat.ts index 276b099bf74..514ef19891b 100644 --- a/src/locales/es/pokemon-stat.ts +++ b/src/locales/es/pokemon-stat.ts @@ -4,13 +4,13 @@ export const pokemonStat: SimpleTranslationEntries = { "HP": "PV", "HPshortened": "PV", "ATK": "Ataque", - "ATKshortened": "Ataque", + "ATKshortened": "Ata", "DEF": "Defensa", - "DEFshortened": "Defensa", + "DEFshortened": "Def", "SPATK": "At. Esp.", - "SPATKshortened": "At. Esp.", + "SPATKshortened": "AtEsp", "SPDEF": "Def. Esp.", - "SPDEFshortened": "Def. Esp.", + "SPDEFshortened": "DefEsp", "SPD": "Velocidad", "SPDshortened": "Veloc." } as const; \ No newline at end of file diff --git a/src/locales/es/tutorial.ts b/src/locales/es/tutorial.ts index e179ca55cee..6e131f9b0c9 100644 --- a/src/locales/es/tutorial.ts +++ b/src/locales/es/tutorial.ts @@ -10,9 +10,9 @@ export const tutorial: SimpleTranslationEntries = { $ajustes de tu navegador.`, "accessMenu": `Para acceder al menú, pulsa M o Escape cuando\ntengas el control. - $El menú contiene la configuración y otras funciones.`, + $El menú contiene los ajustes y otras funciones.`, - "menu": `Desde este menú podrás acceder a la configuración. + "menu": `Desde este menú podrás acceder a los ajustes. $Podrás cambiar la velocidad del juego, el estilo de la ventana y demás. $Hay más opciones, ¡así que pruébalas todas!`, diff --git a/src/locales/fr/menu.ts b/src/locales/fr/menu.ts index 7de214271eb..f8897af29a5 100644 --- a/src/locales/fr/menu.ts +++ b/src/locales/fr/menu.ts @@ -39,4 +39,24 @@ export const menu: SimpleTranslationEntries = { "yes":"Yes", "no":"No", "confirmStartTeam":'Begin with these Pokémon?', + "growthRate": "Growth Rate:", + "ability": "Ability:", + "passive": "Passive:", + "nature": "Nature:", + "eggMoves": 'Egg Moves', + "start": "Start", + "addToParty": "Add to Party", + "toggleIVs": 'Toggle IVs', + "manageMoves": 'Manage Moves', + "useCandies": 'Use Candies', + "selectMoveSwapOut": "Select a move to swap out.", + "selectMoveSwapWith": "Select a move to swap with", + "unlockPassive": "Unlock Passive", + "reduceCost": "Reduce Cost", + "cycleShiny": "R: Cycle Shiny", + "cycleForm": 'F: Cycle Form', + "cycleGender": 'G: Cycle Gender', + "cycleAbility": 'E: Cycle Ability', + "cycleNature": 'N: Cycle Nature', + "cycleVariant": 'V: Cycle Variant' } as const; diff --git a/src/locales/it/menu.ts b/src/locales/it/menu.ts index 33c128c137e..89634bfd3f9 100644 --- a/src/locales/it/menu.ts +++ b/src/locales/it/menu.ts @@ -44,4 +44,24 @@ export const menu: SimpleTranslationEntries = { "yes":"Yes", "no":"No", "confirmStartTeam":'Begin with these Pokémon?', + "growthRate": "Growth Rate:", + "ability": "Ability:", + "passive": "Passive:", + "nature": "Nature:", + "eggMoves": 'Egg Moves', + "start": "Start", + "addToParty": "Add to Party", + "toggleIVs": 'Toggle IVs', + "manageMoves": 'Manage Moves', + "useCandies": 'Use Candies', + "selectMoveSwapOut": "Select a move to swap out.", + "selectMoveSwapWith": "Select a move to swap with", + "unlockPassive": "Unlock Passive", + "reduceCost": "Reduce Cost", + "cycleShiny": "R: Cycle Shiny", + "cycleForm": 'F: Cycle Form', + "cycleGender": 'G: Cycle Gender', + "cycleAbility": 'E: Cycle Ability', + "cycleNature": 'N: Cycle Nature', + "cycleVariant": 'V: Cycle Variant' } 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 4cfef282c81..3785f5e290b 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -225,7 +225,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonNameText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonNameText); - this.pokemonGrowthRateLabelText = addTextObject(this.scene, 8, 106, 'Growth Rate:', TextStyle.SUMMARY_ALT, { fontSize: '36px' }); + this.pokemonGrowthRateLabelText = addTextObject(this.scene, 8, 106, i18next.t("menu:growthRate"), TextStyle.SUMMARY_ALT, { fontSize: '36px' }); this.pokemonGrowthRateLabelText.setOrigin(0, 0); this.pokemonGrowthRateLabelText.setVisible(false); this.starterSelectContainer.add(this.pokemonGrowthRateLabelText); @@ -242,7 +242,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonUncaughtText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonUncaughtText); - this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, 'Ability:', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); + this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, i18next.t("menu:ability"), TextStyle.SUMMARY_ALT, { fontSize: '56px' }); this.pokemonAbilityLabelText.setOrigin(0, 0); this.pokemonAbilityLabelText.setVisible(false); this.starterSelectContainer.add(this.pokemonAbilityLabelText); @@ -251,7 +251,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonAbilityText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonAbilityText); - this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, 'Passive:', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); + this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, i18next.t("menu:passive"), TextStyle.SUMMARY_ALT, { fontSize: '56px' }); this.pokemonPassiveLabelText.setOrigin(0, 0); this.pokemonPassiveLabelText.setVisible(false); this.starterSelectContainer.add(this.pokemonPassiveLabelText); @@ -260,7 +260,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonPassiveText.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonPassiveText); - this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, 'Nature:', TextStyle.SUMMARY_ALT, { fontSize: '56px' }); + this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, i18next.t("menu:nature"), TextStyle.SUMMARY_ALT, { fontSize: '56px' }); this.pokemonNatureLabelText.setOrigin(0, 0); this.pokemonNatureLabelText.setVisible(false); this.starterSelectContainer.add(this.pokemonNatureLabelText); @@ -325,7 +325,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.valueLimitLabel.setOrigin(0.5, 0); this.starterSelectContainer.add(this.valueLimitLabel); - const startLabel = addTextObject(this.scene, 124, 162, 'Start', TextStyle.TOOLTIP_CONTENT); + const startLabel = addTextObject(this.scene, 124, 162, i18next.t("menu:start"), TextStyle.TOOLTIP_CONTENT); startLabel.setOrigin(0.5, 0); this.starterSelectContainer.add(startLabel); @@ -502,7 +502,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonEggMovesContainer = this.scene.add.container(102, 85); this.pokemonEggMovesContainer.setScale(0.375); - const eggMovesLabel = addTextObject(this.scene, -46, 0, 'Egg Moves', TextStyle.WINDOW_ALT); + const eggMovesLabel = addTextObject(this.scene, -46, 0, i18next.t("menu:eggMoves"), TextStyle.WINDOW_ALT); eggMovesLabel.setOrigin(0.5, 0); this.pokemonEggMovesContainer.add(eggMovesLabel); @@ -724,7 +724,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { else if (this.starterCursors.length < 6) { const options = [ { - label: 'Add to Party', + label: i18next.t("menu:addToParty"), handler: () => { ui.setMode(Mode.STARTER_SELECT); let isDupe = false; @@ -761,7 +761,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { overrideSound: true }, { - label: 'Toggle IVs', + label: i18next.t("menu:toggleIVs"), handler: () => { this.toggleStatsMode(); ui.setMode(Mode.STARTER_SELECT); @@ -772,14 +772,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler { if (this.speciesStarterMoves.length > 1) { const showSwapOptions = (moveset: StarterMoveset) => { ui.setMode(Mode.STARTER_SELECT).then(() => { - ui.showText('Select a move to swap out.', null, () => { + ui.showText(i18next.t("menu:selectMoveSwapOut"), null, () => { ui.setModeWithoutClear(Mode.OPTION_SELECT, { options: moveset.map((m: Moves, i: number) => { const option: OptionSelectItem = { label: allMoves[m].name, handler: () => { ui.setMode(Mode.STARTER_SELECT).then(() => { - ui.showText(`Select a move to swap with ${allMoves[m].name}.`, null, () => { + ui.showText(`${i18next.t("menu:selectMoveSwapWith")} ${allMoves[m].name}.`, null, () => { ui.setModeWithoutClear(Mode.OPTION_SELECT, { options: this.speciesStarterMoves.filter((sm: Moves) => sm !== m).map(sm => { // make an option for each available starter move @@ -793,7 +793,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { }; return option; }).concat({ - label: 'Cancel', + label: i18next.t("menu:cancel"), handler: () => { showSwapOptions(this.starterMoveset); return true; @@ -809,7 +809,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { }; return option; }).concat({ - label: 'Cancel', + label: i18next.t("menu:cancel"), handler: () => { this.clearText(); ui.setMode(Mode.STARTER_SELECT); @@ -823,7 +823,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { }); }; options.push({ - label: 'Manage Moves', + label: i18next.t("menu:manageMoves"), handler: () => { showSwapOptions(this.starterMoveset); return true; @@ -861,7 +861,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { if (!(passiveAttr & PassiveAttr.UNLOCKED)) { const passiveCost = getPassiveCandyCount(speciesStarters[this.lastSpecies.speciesId]); options.push({ - label: `x${passiveCost} Unlock Passive (${allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]].name})`, + label: `x${passiveCost} ${i18next.t("menu:unlockPassive")} (${allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]].name})`, handler: () => { if (candyCount >= passiveCost) { starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED; @@ -885,7 +885,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { if (valueReduction < 2) { const reductionCost = getValueReductionCandyCounts(speciesStarters[this.lastSpecies.speciesId])[valueReduction]; options.push({ - label: `x${reductionCost} Reduce Cost`, + label: `x${reductionCost} ${i18next.t("menu:reduceCost")}`, handler: () => { if (candyCount >= reductionCost) { starterData.valueReduction++; @@ -908,7 +908,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { }); } options.push({ - label: 'Cancel', + label: i18next.t("menu:cancel"), handler: () => { ui.setMode(Mode.STARTER_SELECT); return true; @@ -921,7 +921,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { }; if (!pokemonPrevolutions.hasOwnProperty(this.lastSpecies.speciesId)) { options.push({ - label: 'Use Candies', + label: i18next.t("menu:useCandies"), handler: () => { ui.setMode(Mode.STARTER_SELECT).then(() => showUseCandies()); return true; @@ -929,7 +929,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { }); } options.push({ - label: 'Cancel', + label: i18next.t("menu:cancel"), handler: () => { ui.setMode(Mode.STARTER_SELECT); return true; @@ -1098,17 +1098,17 @@ export default class StarterSelectUiHandler extends MessageUiHandler { let cycleInstructionLines = []; if (this.speciesStarterDexEntry?.caughtAttr) { if (this.canCycleShiny) - cycleInstructionLines.push('R: Cycle Shiny'); + cycleInstructionLines.push(i18next.t("menu:cycleShiny")); if (this.canCycleForm) - cycleInstructionLines.push('F: Cycle Form'); + cycleInstructionLines.push(i18next.t("menu:cycleForm")); if (this.canCycleGender) - cycleInstructionLines.push('G: Cycle Gender'); + cycleInstructionLines.push(i18next.t("menu:cycleGender")); if (this.canCycleAbility) - cycleInstructionLines.push('E: Cycle Ability'); + cycleInstructionLines.push(i18next.t("menu:cycleAbility")); if (this.canCycleNature) - cycleInstructionLines.push('N: Cycle Nature'); + cycleInstructionLines.push(i18next.t("menu:cycleNature")); if (this.canCycleVariant) - cycleInstructionLines.push('V: Cycle Variant'); + cycleInstructionLines.push(i18next.t("menu:cycleVariant")); } if (cycleInstructionLines.length > 2) {