Merge pull request #173 from cohenerickson/rewrite

Spanish translations & move some files around
This commit is contained in:
rift 2023-12-22 15:44:39 -06:00 committed by GitHub
commit e029578798
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 58 additions and 6119 deletions

1
.gitignore vendored
View file

@ -8,6 +8,7 @@ pnpm-debug.log*
lerna-debug.log*
node_modules
package-lock.json
dist-ssr
dist

6110
package-lock.json generated

File diff suppressed because it is too large Load diff

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

@ -1,11 +1,9 @@
import { render } from "preact";
import { LocationProvider, Router, Route } from "preact-iso";
import { Header } from "./components/Header.jsx";
import { Home } from "./pages/Home";
import { NotFound } from "./pages/_404.jsx";
import { DiscordPage } from "./pages/discord.jsx";
import { ProxyFrame } from "./ProxyFrame.js";
import { ProxyFrame } from "./pages/ProxyFrame.js";
import { Settings } from "./pages/Settings/index.js";
import "./style.css";
@ -27,3 +25,4 @@ export function App() {
}
render(<App />, document.getElementById("app"));

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

@ -1,4 +1,4 @@
import { RammerheadEncode } from "./RammerheadEncode";
import { RammerheadEncode } from "../util/RammerheadEncode";
import { useEffect, useState } from "preact/hooks";
declare global {

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