fixed error

This commit is contained in:
Henri
2026-02-12 05:39:34 +02:00
parent f95fea69ad
commit 54dcc26cc9
3 changed files with 6 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
import Footer from "./layout/Footer.svelte"; import Footer from "./layout/Footer.svelte";
</script> </script>
{#if $text.nav} {#if $text && Object.keys($text).length > 0}
<Navbar /> <Navbar />
<Router {routes} /> <Router {routes} />
<Footer /> <Footer />

View File

@@ -94,11 +94,12 @@
</style> </style>
<Section className="text-white" background="off-black" padding="small"> <Section className="text-white" background="off-black" padding="small">
{#if $text && Object.keys($text).length > 0}
<div class="flex items-center justify-end"> <div class="flex items-center justify-end">
<!-- Desktop Navigation --> <!-- Desktop Navigation -->
<nav class="z-10 hidden md:flex gap-4 justify-end text-xl"> <nav class="z-10 hidden md:flex gap-4 justify-end text-xl">
<Dropdown <Dropdown
name={$text.about} name={$text.about || 'Meist'}
buttonClass="rounded-[5px]" buttonClass="rounded-[5px]"
buttonHoverStyle="background-color:var(--orange); color:var(--black)" buttonHoverStyle="background-color:var(--orange); color:var(--black)"
panelClassName="bg-[var(--off-black)]" panelClassName="bg-[var(--off-black)]"
@@ -164,6 +165,7 @@
<Menu size={32} /> <Menu size={32} />
</Button> </Button>
</div> </div>
{/if}
</Section> </Section>
<!-- Full Screen Mobile Menu --> <!-- Full Screen Mobile Menu -->
@@ -295,4 +297,3 @@
</Stack> </Stack>
</div> </div>
{/if} {/if}

View File

@@ -31,10 +31,10 @@ async function loadTranslations(lang) {
// Dynamically import all translation files for the specific language // Dynamically import all translation files for the specific language
// Vite will code-split these and only bundle the ones actually used // Vite will code-split these and only bundle the ones actually used
const modules = import.meta.glob('/src/locales/*/*.json'); const modules = import.meta.glob('../locales/*/*.json');
for (const path in modules) { for (const path in modules) {
if (path.includes(`/locales/${lang}/`)) { if (path.includes(`/locales/${lang}/`) || path.includes(`\\locales\\${lang}\\`)) {
const module = await modules[path](); const module = await modules[path]();
Object.assign(translations, module.default || module); Object.assign(translations, module.default || module);
} }