fix: update i18n - catalog, nav, common components

This commit is contained in:
2026-09-13 05:44:26 +05:00
parent e06970997e
commit a4c85c0814
7 changed files with 32 additions and 25 deletions
+2 -1
View File
@@ -1,11 +1,12 @@
<script lang="ts">
import { LOCALES, type Locale } from "$lib/i18n/dict";
import { getLocale, setLocale } from "$lib/i18n/locale.svelte";
import { t } from "$lib/i18n/t";
const LANG_LABELS: Record<Locale, string> = { ru: "RU", en: "EN" };
</script>
<div class="lang" role="group" aria-label="Language">
<div class="lang" role="group" aria-label={t("ui.language")}>
{#each LOCALES as l (l)}
<button
type="button"
+2 -1
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { Moon, Sun } from "@lucide/svelte";
import { t } from "$lib/i18n/t";
import IconButton from "../ui/IconButton.svelte";
interface Props {
@@ -14,7 +15,7 @@
<IconButton
icon={theme === "light" ? Moon : Sun}
label="Toggle theme"
label={t("ui.themeToggle")}
variant="clear"
onclick={ontoggle}
/>
+4 -3
View File
@@ -1,11 +1,12 @@
<script lang="ts">
import { resolve } from "$app/paths";
import { t } from "$lib/i18n/t";
</script>
<nav class="nav">
<a href={resolve("/")}>Home page</a>
<a href={resolve("/list-tools")}>Catalog</a>
<a href={resolve("/kit")}> UI Kit </a>
<a href={resolve("/")}>{t("header.home")}</a>
<a href={resolve("/list-tools")}>{t("header.catalog")}</a>
<a href={resolve("/kit")}>{t("header.uiKit")}</a>
</nav>
<style>