feat(i18n) : add personal languages and compact weapon exports
CI / Verify (push) Successful in 1m18s
CI / Build immutable images and deploy (push) Successful in 1m57s

This commit is contained in:
2026-09-14 16:44:44 +07:00 Unverified
parent f214d330f0
commit e0794822b1
72 changed files with 4199 additions and 1011 deletions
+6 -5
View File
@@ -1,5 +1,6 @@
"use client";
import { useTranslation } from "@/components/i18n/locale-provider";
import Image from "next/image";
import Link from "next/link";
import type { MouseEvent } from "react";
@@ -27,15 +28,16 @@ export function GuideSectionNav({
current: string;
extras: Array<{ id: string; slug: string; title: string }>;
}) {
const { t } = useTranslation();
const confirmNavigation = (event: MouseEvent<HTMLAnchorElement>) => {
const browserWindow = window as Window & { __guideHasUnsavedChanges?: boolean };
if (typeof window !== "undefined" && browserWindow.__guideHasUnsavedChanges && !window.confirm("ข้อมูลยังบันทึกไม่เสร็จหรือไม่ถูกต้อง ต้องการออกจากหน้านี้หรือไม่?")) {
if (typeof window !== "undefined" && browserWindow.__guideHasUnsavedChanges && !window.confirm(t("ข้อมูลยังบันทึกไม่เสร็จหรือไม่ถูกต้อง ต้องการออกจากหน้านี้หรือไม่?"))) {
event.preventDefault();
}
};
return (
<ScrollableNav
ariaLabel="เมนูแก้ไข Guide"
ariaLabel={t("เมนูแก้ไข Guide")}
className="w-full rounded-xl border bg-card p-2"
>
<Link
@@ -48,8 +50,7 @@ export function GuideSectionNav({
)}
>
<Image src={navigationIconPath("overview")!} alt="" width={20} height={20} className="size-5 object-contain" />
Overview
</Link>
{t("Overview")}</Link>
{sections.map((section) => {
const iconPath = navigationIconPath(section.slug);
return (
@@ -64,7 +65,7 @@ export function GuideSectionNav({
)}
>
{iconPath ? <Image src={iconPath} alt="" width={20} height={20} className="size-5 object-contain" /> : null}
{section.label}
{t(section.label)}
</Link>
);
})}