Add spanish translations

This commit is contained in:
Cohen Erickson 2023-12-22 15:29:32 -06:00
parent 20feb65b80
commit d16d842fa3
5 changed files with 54 additions and 5 deletions

View file

@ -3,12 +3,16 @@ import { initReactI18next } from "react-i18next";
import LanguageDetector from "i18next-browser-languagedetector";
import translationEN from "./locales/en.json";
import translationES from "./locales/es.json";
import translationJA from "./locales/ja.json";
const resources = {
en: {
translation: translationEN
},
es: {
translation: translationES
},
ja: {
translation: translationJA
}

View file

@ -35,7 +35,8 @@
"title": "Language",
"subtitle": "Choose your preferred language",
"japanese": "Japanese",
"english": "English"
"english": "English",
"spanish": "Spanish"
}
}
}

42
src/locales/es.json Normal file
View file

@ -0,0 +1,42 @@
{
"header": {
"title": "nebula.",
"games": "Juegos",
"settings": "Ajustes",
"discord": "¿Quieres más enlaces?"
},
"404": {
"text": "Este servicio Nebula ha sido deshabilitado.",
"return": "De vuelta a casa"
},
"home": {
"placeholder": "Busca en la web libremente"
},
"discord": {
"title": "Nebula's Discord Servidor",
"sub": "¿Le gustaría abrir esto a través de proxy?",
"button1": "Abierto normalmente",
"button2": "Usa proxy"
},
"settings": {
"tabs": {
"proxy": "Proxy",
"tab": "Pestaña",
"custom": "Personalización",
"misc": "Misc"
},
"proxy": {
"title": "Proxy",
"subtitle": "Elige el proxy que se ajuste a tus necesidades",
"automatic": "Automática",
"buggyWarning": "(CALESA)"
},
"languages": {
"title": "Idioma",
"subtitle": "Elige tu idioma preferido",
"japanese": "Japonés",
"english": "Inglés",
"spanish": "Español"
}
}
}

View file

@ -35,7 +35,8 @@
"title": "言語",
"subtitle": "好きな言語を選んでください",
"japanese": "日本語",
"english": "英語"
"english": "英語",
"spanish": "スペイン語"
}
}
}

View file

@ -7,8 +7,9 @@ const Misc = ({ id, active }) => {
const { t } = useTranslation();
const languages = [
{ id: "ja", label: t("settings.languages.japanese") },
{ id: "en-US", label: t("settings.languages.english") }
{ id: "en-US", label: t("settings.languages.english") },
{ id: "es", label: t("settings.languages.spanish") },
{ id: "ja", label: t("settings.languages.japanese") }
];
return (
@ -24,7 +25,7 @@ const Misc = ({ id, active }) => {
variants={settingsPageVariant}
className="content-card flex flex-row flex-wrap justify-around"
>
<div class="bg-lighter flex h-64 w-80 flex-col flex-wrap content-center items-center rounded-lg border border-input-border-color p-7 text-center">
<div class="flex h-64 w-80 flex-col flex-wrap content-center items-center rounded-lg border border-input-border-color bg-lighter p-7 text-center">
<div class="text-3xl">{t("settings.languages.title")}</div>
<div class="text-md">{t("settings.languages.subtitle")}</div>
<Dropdown