Move to dynamically creating STATIC_PATHS, instead of it being static, and integrate spanish fully
This commit is contained in:
parent
311a8e649e
commit
ab3049dd84
7 changed files with 17 additions and 7 deletions
|
|
@ -11,8 +11,9 @@ export default defineConfig({
|
||||||
i18n: {
|
i18n: {
|
||||||
locales: {
|
locales: {
|
||||||
en: "en-US",
|
en: "en-US",
|
||||||
jp: "ja-JP",
|
es: "es-ES",
|
||||||
fr: "fr-FR",
|
fr: "fr-FR",
|
||||||
|
jp: "ja-JP",
|
||||||
ru: "ru-RU",
|
ru: "ru-RU",
|
||||||
zh: "zh-CN",
|
zh: "zh-CN",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
BIN
public/logo.png
BIN
public/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 82 KiB |
|
|
@ -13,9 +13,10 @@ const themeList = [
|
||||||
|
|
||||||
const languageList = [
|
const languageList = [
|
||||||
{ name: "English", value: "en" },
|
{ name: "English", value: "en" },
|
||||||
|
{ name: "Español", value: "es" },
|
||||||
{ name: "Français", value: "fr" },
|
{ name: "Français", value: "fr" },
|
||||||
{ name: "中文", value: "zh" },
|
|
||||||
{ name: "日本語", value: "jp" },
|
{ name: "日本語", value: "jp" },
|
||||||
|
{ name: "中文", value: "zh" },
|
||||||
{ name: "Русский", value: "ru" },
|
{ name: "Русский", value: "ru" },
|
||||||
];
|
];
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@
|
||||||
"faq.title": "Preguntas frecuentes",
|
"faq.title": "Preguntas frecuentes",
|
||||||
|
|
||||||
"faq.whatIsAProxy": "¿Qué es un proxy?",
|
"faq.whatIsAProxy": "¿Qué es un proxy?",
|
||||||
"faq.whatIsAProxy.answer": "Un proxy es un método para hacer que su tráfico de Internet sea anónimo enviando su solicitud a un servidor (proxy), haciendo que haga la solicitud y luego se la envíe de vuelta. Esto permite un nivel de seguridad mucho mayor, así como eludir las restricciones del sitio web en espacios públicos y la censura".
|
"faq.whatIsAProxy.answer": "Un proxy es un método para hacer que su tráfico de Internet sea anónimo enviando su solicitud a un servidor (proxy), haciendo que haga la solicitud y luego se la envíe de vuelta. Esto permite un nivel de seguridad mucho mayor, así como eludir las restricciones del sitio web en espacios públicos y la censura",
|
||||||
|
|
||||||
"faq.noBareClients": "¿Qué significa \"there are no bare clients\"?",
|
"faq.noBareClients": "¿Qué significa \"there are no bare clients\"?",
|
||||||
"faq.noBareClients.answer": "Hay un par de razones por las que ocurre este error en particular, pero lo más común es que sea un problema con el proxy que no se carga. Por favor, vuelva a cargar la página y, si el problema persiste, ¡haga un problema de GitHub!"
|
"faq.noBareClients.answer": "Hay un par de razones por las que ocurre este error en particular, pero lo más común es que sea un problema con el proxy que no se carga. Por favor, vuelva a cargar la página y, si el problema persiste, ¡haga un problema de GitHub!",
|
||||||
|
|
||||||
"faq.contributeToAlu": "¿Cómo puedo contribuir a Alu?",
|
"faq.contributeToAlu": "¿Cómo puedo contribuir a Alu?",
|
||||||
"faq.contributeToAlu.answer.segment1": "Correr la voz de Alu es un gran comienzo, pero si realmente disfrutas de Alu y quieres enlaces privados, ¡considera apoyarme a través de Patreon!",
|
"faq.contributeToAlu.answer.segment1": "Correr la voz de Alu es un gran comienzo, pero si realmente disfrutas de Alu y quieres enlaces privados, ¡considera apoyarme a través de Patreon!",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import en from "./en.json";
|
import en from "./en.json";
|
||||||
|
import es from "./es.json";
|
||||||
import fr from "./fr.json";
|
import fr from "./fr.json";
|
||||||
import zh from "./zh.json";
|
import zh from "./zh.json";
|
||||||
import jp from "./jp.json";
|
import jp from "./jp.json";
|
||||||
|
|
@ -8,6 +9,7 @@ export const defaultLang = "en";
|
||||||
|
|
||||||
export const ui = {
|
export const ui = {
|
||||||
en,
|
en,
|
||||||
|
es,
|
||||||
fr,
|
fr,
|
||||||
zh,
|
zh,
|
||||||
jp,
|
jp,
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,12 @@ import { ui, defaultLang } from "./ui";
|
||||||
|
|
||||||
type LanguageKeys = keyof typeof ui;
|
type LanguageKeys = keyof typeof ui;
|
||||||
type TranslationKeys = keyof (typeof ui)[typeof defaultLang];
|
type TranslationKeys = keyof (typeof ui)[typeof defaultLang];
|
||||||
|
type StaticPath = { params: { lang: string } };
|
||||||
|
|
||||||
export const STATIC_PATHS = [{ params: { lang: "en" } }, { params: { lang: "fr" } }, { params: { lang: "zh" } }, { params: { lang: "jp" } }, { params: { lang: "ru" } }];
|
const STATIC_PATHS: StaticPath[] = [];
|
||||||
|
for (const lang in ui) {
|
||||||
|
STATIC_PATHS.push({ params: { lang } });
|
||||||
|
}
|
||||||
|
|
||||||
function getLangFromUrl(url: URL) {
|
function getLangFromUrl(url: URL) {
|
||||||
// comma lol
|
// comma lol
|
||||||
|
|
@ -26,3 +30,5 @@ function useTranslations(lang: LanguageKeys) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const i18n = { getLangFromUrl, useTranslations, inferLangUseTranslations };
|
export const i18n = { getLangFromUrl, useTranslations, inferLangUseTranslations };
|
||||||
|
|
||||||
|
export { STATIC_PATHS };
|
||||||
|
|
@ -33,12 +33,12 @@ const { title, optionalPreloads } = Astro.props;
|
||||||
<meta property="og:url" content="https://aluu.xyz" />
|
<meta property="og:url" content="https://aluu.xyz" />
|
||||||
<meta property="og:title" content="Alu" />
|
<meta property="og:title" content="Alu" />
|
||||||
<meta property="og:description" content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization." />
|
<meta property="og:description" content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization." />
|
||||||
<meta property="og:image" content="/logo.png" />
|
<meta property="og:image" content="/favicon.svg" />
|
||||||
<meta property="twitter:card" content="summary_large_image" />
|
<meta property="twitter:card" content="summary_large_image" />
|
||||||
<meta property="twitter:url" content="https://aluu.xyz" />
|
<meta property="twitter:url" content="https://aluu.xyz" />
|
||||||
<meta property="twitter:title" content="Alu" />
|
<meta property="twitter:title" content="Alu" />
|
||||||
<meta property="twitter:description" content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization." />
|
<meta property="twitter:description" content="Alu is a sleek web proxy supporting multiple standards of communication, and wide levels of customization." />
|
||||||
<meta property="twitter:image" content="/logo.png" />
|
<meta property="twitter:image" content="/favicon.svg" />
|
||||||
<link rel="canonical" href={Astro.url.href} />
|
<link rel="canonical" href={Astro.url.href} />
|
||||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue