From 6d6b79f7e2dc8db6d95ae087ee71dc8fa3aa9d50 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Fri, 19 Jun 2026 11:28:26 +0800 Subject: [PATCH] refactor: clean code --- ui/src/i18n/locales.ts | 2 +- ui/src/i18n/resources/index.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/src/i18n/locales.ts b/ui/src/i18n/locales.ts index 667f1ef0..2aa46b44 100644 --- a/ui/src/i18n/locales.ts +++ b/ui/src/i18n/locales.ts @@ -1,6 +1,6 @@ import { LANG_EN, LANG_ZH } from "./resources"; export const localeNames = { - ZH: LANG_ZH, EN: LANG_EN, + ZH: LANG_ZH, }; diff --git a/ui/src/i18n/resources/index.ts b/ui/src/i18n/resources/index.ts index c5a5eab7..8c4c5f5d 100644 --- a/ui/src/i18n/resources/index.ts +++ b/ui/src/i18n/resources/index.ts @@ -3,18 +3,18 @@ import { type Resource } from "i18next"; import en from "./en"; import zh from "./zh"; -export const LANG_ZH = "zh" as const; export const LANG_EN = "en" as const; +export const LANG_ZH = "zh" as const; const resources: Resource = { - [LANG_ZH]: { - name: "简体中文", - translation: zh, - }, [LANG_EN]: { name: "English", translation: en, }, + [LANG_ZH]: { + name: "简体中文", + translation: zh, + }, }; export default resources;