Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat: update navigation items to use internationalization keys for localization

Tonho8482167ed351
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 5042ca9b..d1d1e91a 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -5,6 +5,7 @@
import { initDownloadListener } from "$lib/stores/download-listener";
import { getActiveCount } from "$lib/stores/download-store.svelte";
import Toast from "$components/toast/Toast.svelte";
+ import { t } from "$lib/i18n";
import type { Snippet } from "svelte";
let activeCount = $derived(getActiveCount());
@@ -18,10 +19,10 @@
});
const nav = [
- { href: "/", label: "Home", icon: "home" },
- { href: "/downloads", label: "Downloads", icon: "downloads" },
- { href: "/hotmart", label: "Hotmart", icon: "hotmart" },
- { href: "/settings", label: "Settings", icon: "settings" },
+ { href: "/", labelKey: "nav.home", icon: "home" },
+ { href: "/downloads", labelKey: "nav.downloads", icon: "downloads" },
+ { href: "/hotmart", labelKey: "nav.hotmart", icon: "hotmart" },
+ { href: "/settings", labelKey: "nav.settings", icon: "settings" },
] as const;
function isActive(href: string): boolean {
@@ -37,7 +38,7 @@
href={item.href}
class="nav-item"
class:active={isActive(item.href)}
- title={item.label}
+ title={$t(item.labelKey)}
>
<span class="indicator"></span>
<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">