feat: enhance locale handling and improve cookie management in Header component
Gitea Auto Deploy / Deploy-Container (push) Successful in 50s

fix: update CopyImport component to handle profile selection and data validation

feat: refactor EnkaImport component for better data parsing and error handling

fix: improve FreeSRImport component with enhanced data validation and error management

fix: update calcData helper functions to handle edge cases and improve robustness

refactor: enhance converter functions for better data handling and validation

feat: add validation to persisted stores using Zod schemas

fix: update Zustand stores to use validated JSON storage for improved data integrity

chore: add new Zod schemas for locale and connection persistence

fix: ensure proper handling of optional fields in various data structures
This commit is contained in:
2026-05-15 20:34:15 +07:00
parent 93a8d8f1ac
commit ca61ddfd5f
26 changed files with 556 additions and 304 deletions
+18 -2
View File
@@ -1,11 +1,27 @@
import { getRequestConfig } from "next-intl/server";
import { cookies } from "next/headers";
const supportedLocales = new Set([
"en",
"vi",
"ja",
"ko",
"zh",
"de",
"es",
"fr",
"id",
"pt",
"ru",
"th",
]);
export default getRequestConfig( async () => {
const locale = (await cookies()).get("MYNEXTAPP_LOCALE")?.value || "en";
const cookieLocale = (await cookies()).get("MYNEXTAPP_LOCALE")?.value;
const locale = cookieLocale && supportedLocales.has(cookieLocale) ? cookieLocale : "en";
return {
locale,
messages: (await import(`../messages/${locale}.json`)).default
}
})
})