From 19e434929c19f00342fa2529a3e8575adc584c72 Mon Sep 17 00:00:00 2001
From: ArceUseless <36188730+ArceUseless@users.noreply.github.com>
Date: Fri, 3 May 2024 23:52:09 +0200
Subject: [PATCH] Spanish translations (#422)

* Spanish translations for intro messages and some menus. Added Empty (save file) to lang files

* Spanish translations + new literals in all langs

---------

Co-authored-by: rnicar <rj.nieto.car@gmail.com>
---
 src/locales/de/menu.ts                |  6 ++-
 src/locales/en/menu.ts                |  6 ++-
 src/locales/es/command-ui-handler.ts  |  2 +-
 src/locales/es/menu.ts                | 14 ++++--
 src/locales/es/tutorial.ts            | 69 +++++++++++++++------------
 src/locales/fr/menu.ts                |  6 ++-
 src/locales/it/menu.ts                |  6 ++-
 src/ui/confirm-ui-handler.ts          |  5 +-
 src/ui/save-slot-select-ui-handler.ts |  3 +-
 src/ui/starter-select-ui-handler.ts   |  3 +-
 10 files changed, 75 insertions(+), 45 deletions(-)

diff --git a/src/locales/de/menu.ts b/src/locales/de/menu.ts
index c648b15bfe8..3f86ae41a7e 100644
--- a/src/locales/de/menu.ts
+++ b/src/locales/de/menu.ts
@@ -39,5 +39,9 @@ export const menu: SimpleTranslationEntries = {
     "weeklyRankings": "Weekly Rankings",
     "noRankings": "No Rankings",
     "loading": "Loading…",
-    "playersOnline": "Players Online"
+    "playersOnline": "Players Online",
+    "empty":"Empty",
+    "yes":"Yes",
+    "no":"No",
+    "confirmStartTeam":'Begin with these Pokémon?',
 } as const;
\ No newline at end of file
diff --git a/src/locales/en/menu.ts b/src/locales/en/menu.ts
index 42888b17337..887f3d87834 100644
--- a/src/locales/en/menu.ts
+++ b/src/locales/en/menu.ts
@@ -39,5 +39,9 @@ export const menu: SimpleTranslationEntries = {
     "weeklyRankings": "Weekly Rankings",
     "noRankings": "No Rankings",
     "loading": "Loading…",
-    "playersOnline": "Players Online"
+    "playersOnline": "Players Online",
+    "empty":"Empty",
+    "yes":"Yes",
+    "no":"No",
+    "confirmStartTeam":'Begin with these Pokémon?',
 } as const;
\ No newline at end of file
diff --git a/src/locales/es/command-ui-handler.ts b/src/locales/es/command-ui-handler.ts
index 237e779db03..66a892f8fd3 100644
--- a/src/locales/es/command-ui-handler.ts
+++ b/src/locales/es/command-ui-handler.ts
@@ -2,7 +2,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
 
 export const commandUiHandler: SimpleTranslationEntries = {
     "fight": "Luchar",
-    "ball": "Ball",
+    "ball": "Balls",
     "pokemon": "Pokémon",
     "run": "Huir",
     "actionMessage": "¿Qué debería\nhacer {{pokemonName}}?",
diff --git a/src/locales/es/menu.ts b/src/locales/es/menu.ts
index c67287ae0cc..5569c1e1668 100644
--- a/src/locales/es/menu.ts
+++ b/src/locales/es/menu.ts
@@ -19,9 +19,13 @@ export const menu: SimpleTranslationEntries = {
     "boyOrGirl": "¿Eres un chico o una chica?",
     "boy": "Chico",
     "girl": "Chica",
-    "dailyRankings": "Daily Rankings",
-    "weeklyRankings": "Weekly Rankings",
-    "noRankings": "No Rankings",
-    "loading": "Loading…",
-    "playersOnline": "Players Online"
+    "dailyRankings": "Rankings Diarios",
+    "weeklyRankings": "Rankings Semanales",
+    "noRankings": "Sin Rankings",
+    "loading": "Cargando…",
+    "playersOnline": "Jugadores en Línea",
+    "empty":"Vacío",
+    "yes":"Sí",
+    "no":"No",
+    "confirmStartTeam":'¿Comenzar con estos Pokémon?',
 } as const;
\ No newline at end of file
diff --git a/src/locales/es/tutorial.ts b/src/locales/es/tutorial.ts
index 2773b6710ba..e179ca55cee 100644
--- a/src/locales/es/tutorial.ts
+++ b/src/locales/es/tutorial.ts
@@ -1,42 +1,49 @@
 import { SimpleTranslationEntries } from "#app/plugins/i18n";
 
 export const tutorial: SimpleTranslationEntries = {
-    "intro": `Welcome to PokéRogue! This is a battle-focused Pokémon fangame with roguelite elements.
-    $This game is not monetized and we claim no ownership of Pokémon nor of the copyrighted assets used.
-    $The game is a work in progress, but fully playable.\nFor bug reports, please use the Discord community.
-    $If the game runs slowly, please ensure 'Hardware Acceleration' is turned on in your browser settings.`,
+    "intro": `¡Bienvenido/a a PokéRogue! Este es un fangame de Pokémon centrado en el combate con elementos roguelite.
+    $Este juego no está monetizado y no reclamamos ningún derecho de propiedad sobre Pokémon ni sobre ninguno de
+    $los recursos con copyright utilizados.
+    $El juego está en proceso, pero es completamente jugable.\nPara reportar bugs, por favor, hazlo en nuestra
+    $comunidad de Discord.
+    $Si el juego va lento, por favor, asegúrate de que tengas activada la opción 'Aceleración de gráficos' en los
+    $ajustes de tu navegador.`,
     
-    "accessMenu": `To access the menu, press M or Escape while awaiting input.\nThe menu contains settings and various features.`,
+    "accessMenu": `Para acceder al menú, pulsa M o Escape cuando\ntengas el control.
+    $El menú contiene la configuración y otras funciones.`,
     
-    "menu": `From this menu you can access the settings.
-    $From the settings you can change game speed, window style, and other options.
-    $There are also various other features here, so be sure to check them all!`,
+    "menu": `Desde este menú podrás acceder a la configuración.
+    $Podrás cambiar la velocidad del juego, el estilo de la ventana y demás.
+    $Hay más opciones, ¡así que pruébalas todas!`,
 
-    "starterSelect": `From this screen, you can select your starters.\nThese are your initial party members.
-    $Each starter has a value. Your party can have up to\n6 members as long as the total does not exceed 10.
-    $You can also select gender, ability, and form depending on\nthe variants you've caught or hatched.
-    $The IVs for a species are also the best of every one you've\ncaught or hatched, so try to get lots of the same species!`,
+    "starterSelect": `En esta pantalla podrás elegir tus iniciales. Estos serán tus\nmiembros de equipo al comenzar la partida.
+    $Cada inicial tiene un valor. Tu equipo puede contener hasta 6\nmiembros mientras el valor total no pase de 10.
+    $También puedes elegir su género, habilidad y forma\ndependiendo de las variantes que hayas conseguido.
+    $Los IVs de los iniciales corresponderán al valor más alto de\nlos Pokémon de la misma especie que hayas obtenido.
+    $¡Así que intenta conseguir muchos Pokémon de la misma\nespecie!`,
 
-    "pokerus": `A daily random 3 selectable starters have a purple border.
-    $If you see a starter you own with one of these,\ntry adding it to your party. Be sure to check its summary!`,
+    "pokerus": `Cada día, 3 iniciales aleatorios tendrán un borde morado.
+    $Si ves un inicial que tengas con este borde, prueba a\nañadirlo a tu equipo. ¡No olvides revisar sus datos!`,
 
-    "statChange": `Stat changes persist across battles as long as your Pokémon aren't recalled.
-    $Your Pokémon are recalled before a trainer battle and before entering a new biome.
-    $You can also view the stat changes for the Pokémon on the field by holding C or Shift.`,
+    "statChange": `Los cambios de estadísticas se mantienen entre combates\nmientras que el Pokémon no vuelva a la Poké Ball.
+    $Tus Pokémon vuelven a sus Poké Balls antes de combates contra entrenadores y de entrar a un nuevo bioma.
+    $También puedes ver los cambios de estadísticas del Pokémon en campo manteniendo pulsado C o Shift.`,
 
-    "selectItem": `After every battle, you are given a choice of 3 random items.\nYou may only pick one.
-    $These range from consumables, to Pokémon held items, to passive permanent items.
-    $Most non-consumable item effects will stack in various ways.
-    $Some items will only show up if they can be used, such as evolution items.
-    $You can also transfer held items between Pokémon using the transfer option.
-    $The transfer option will appear in the bottom right once you have obtained a held item.
-    $You may purchase consumable items with money, and a larger variety will be available the further you get.
-    $Be sure to buy these before you pick your random item, as it will progress to the next battle once you do.`,
+    "selectItem": `Tras cada combate, tendrás la opción de elegir entre tres objetos aleatorios. Solo podrás escoger uno.
+    $Estos objetos pueden ser consumibles, objetos equipables u objetos pasivos permanentes (hasta acabar la partida).
+    $La mayoría de los efectos de objetos no consumibles se acumularán de varias maneras.
+    $Algunos objetos solo aparecerán si pueden ser utilizados, como las piedras evolutivas.
+    $También puedes transferir objetos equipados entre Pokémon utilizando la opción de transferir.
+    $La opción de transferir aparecerá en la parte inferior derecha una vez hayas obtenido un objeto equipable.
+    $También puedes comprar objetos consumibles con dinero y su variedad irá aumentando según tu avance.
+    $Asegúrate de comprar antes de escoger un objeto aleatorio, ya que se avanzará al siguiente combate.`,
 
-    "eggGacha": `From this screen, you can redeem your vouchers for\nPokémon eggs.
-    $Eggs have to be hatched and get closer to hatching after\nevery battle. Rarer eggs take longer to hatch.
-    $Hatched Pokémon also won't be added to your party, they will\nbe added to your starters.
-    $Pokémon hatched from eggs generally have better IVs than\nwild Pokémon.
-    $Some Pokémon can only even be obtained from eggs.
-    $There are 3 different machines to pull from with different\nbonuses, so pick the one that suits you best!`,
+    "eggGacha": `En esta pantalla podrás canjear tus vales por huevos\nde Pokémon.
+    $Los huevos deben eclosionar y estarán más cerca de\nhacerlo tras cada combate.
+    $Los huevos más raros tardarán más en eclosionar.
+    $Los Pokémon que hayan salido del huevo no se\nañadirán a tu equipo, pero sí a tus iniciales.
+    $Los Pokémon salidos de un huevo suelen tener mejores\nIVs que los Pokémon salvajes.
+    $Algunos Pokémon solo pueden ser obtenidos de huevos.
+    $Hay 3 máquinas diferentes entre las que elegir, cada\nuna con zdiferentes bonificaciones.
+    $¡Así que escoge la que más te interese!`,
 } as const;
\ No newline at end of file
diff --git a/src/locales/fr/menu.ts b/src/locales/fr/menu.ts
index 1744297089c..7de214271eb 100644
--- a/src/locales/fr/menu.ts
+++ b/src/locales/fr/menu.ts
@@ -34,5 +34,9 @@ export const menu: SimpleTranslationEntries = {
   "weeklyRankings": "Classement de la Semaine",
   "noRankings": "Pas de Classement",
   "loading": "Chargement…",
-  "playersOnline": "Joueurs Connectés"
+  "playersOnline": "Joueurs Connectés",
+  "empty":"Empty",
+  "yes":"Yes",
+  "no":"No",
+  "confirmStartTeam":'Begin with these Pokémon?',
 } as const;
diff --git a/src/locales/it/menu.ts b/src/locales/it/menu.ts
index 9812236b7f0..33c128c137e 100644
--- a/src/locales/it/menu.ts
+++ b/src/locales/it/menu.ts
@@ -39,5 +39,9 @@ export const menu: SimpleTranslationEntries = {
     "weeklyRankings": "Weekly Rankings",
     "noRankings": "No Rankings",
     "loading": "Loading…",
-    "playersOnline": "Players Online"
+    "playersOnline": "Players Online",
+    "empty":"Empty",
+    "yes":"Yes",
+    "no":"No",
+    "confirmStartTeam":'Begin with these Pokémon?',
 } as const;
\ No newline at end of file
diff --git a/src/ui/confirm-ui-handler.ts b/src/ui/confirm-ui-handler.ts
index d9e7726d826..a220b6f3a3d 100644
--- a/src/ui/confirm-ui-handler.ts
+++ b/src/ui/confirm-ui-handler.ts
@@ -1,6 +1,7 @@
 import BattleScene, { Button } from "../battle-scene";
 import AbstractOptionSelectUiHandler, { OptionSelectConfig } from "./abstact-option-select-ui-handler";
 import { Mode } from "./ui";
+import i18next from "i18next";
 
 export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler {
   private switchCheck: boolean;
@@ -19,14 +20,14 @@ export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler {
       const config: OptionSelectConfig = {
         options: [
           {
-            label: 'Yes',
+            label: i18next.t("menu:yes"),
             handler: () => {
               args[0]();
               return true;
             }
           },
           {
-            label: 'No',
+            label: i18next.t("menu:no"),
             handler: () => {
               args[1]();
               return true;
diff --git a/src/ui/save-slot-select-ui-handler.ts b/src/ui/save-slot-select-ui-handler.ts
index 11680cd3952..69ac94d99ba 100644
--- a/src/ui/save-slot-select-ui-handler.ts
+++ b/src/ui/save-slot-select-ui-handler.ts
@@ -8,6 +8,7 @@ import * as Utils from "../utils";
 import PokemonData from "../system/pokemon-data";
 import { PokemonHeldItemModifier } from "../modifier/modifier";
 import MessageUiHandler from "./message-ui-handler";
+import i18next from "i18next";
 
 const sessionSlotCount = 5;
 
@@ -314,7 +315,7 @@ class SessionSlot extends Phaser.GameObjects.Container {
       this.scene.gameData.getSession(this.slotId).then(async sessionData => {
         if (!sessionData) {
           this.hasData = false;
-          this.loadingLabel.setText('Empty');
+          this.loadingLabel.setText(i18next.t("menu:empty"));
           resolve(false);
           return;
         }
diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts
index f1e058b12cf..7cc99d81fb7 100644
--- a/src/ui/starter-select-ui-handler.ts
+++ b/src/ui/starter-select-ui-handler.ts
@@ -27,6 +27,7 @@ import { argbFromRgba } from "@material/material-color-utilities";
 import { OptionSelectItem } from "./abstact-option-select-ui-handler";
 import { pokemonPrevolutions } from "#app/data/pokemon-evolutions";
 import { Variant, getVariantTint } from "#app/data/variant";
+import i18next from "i18next";
 
 export type StarterSelectCallback = (starters: Starter[]) => void;
 
@@ -1653,7 +1654,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
       this.clearText();
     };
 
-    ui.showText('Begin with these Pokémon?', null, () => {
+    ui.showText(i18next.t("menu:confirmStartTeam"), null, () => {
       ui.setModeWithoutClear(Mode.CONFIRM, () => {
         const startRun = (gameMode: GameModes) => {
           this.scene.gameMode = gameModes[gameMode];