Refactor i18n configuration and utility functions for improved clarity and simplicity
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2026-04-23 11:53:56 +02:00
parent 2204bb8663
commit c41b1f9daa
3 changed files with 3 additions and 23 deletions

View File

@@ -47,7 +47,6 @@ export default defineConfig({
configFile: "./tailwind.config.js",
applyBaseStyles: false,
}),
configureI18n(),
sitemap({
i18n: {
defaultLocale: "en",

View File

@@ -19,23 +19,4 @@
import { l as proxyL } from "astro-i18n";
const locales = [
"en",
"de",
];
export const l = (route: string) => {
const transPath = proxyL(route);
if (import.meta.env.DEV) {
return transPath;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [_, locale, ...rest] = transPath.split("/");
if (locales.includes(locale)) {
return "/" + rest.join("/");
}
return transPath;
};
export const l = proxyL;