{
@@ -181,7 +182,7 @@ export const ProfileForm = () => {
diff --git a/apps/dokploy/public/locales/en/settings.json b/apps/dokploy/public/locales/en/settings.json
index 1b3fcdc8..c4f6f362 100644
--- a/apps/dokploy/public/locales/en/settings.json
+++ b/apps/dokploy/public/locales/en/settings.json
@@ -1,11 +1,27 @@
{
"settings": {
+ "common": {
+ "save": "Save"
+ },
"profile": {
- "title": "Account"
+ "title": "Account",
+ "description": "Change the details of your profile here.",
+ "email": "Email",
+ "password": "Password",
+ "avatar": "Avatar"
},
"appearance": {
"title": "Appearance",
- "description": "Customize the theme of your dashboard."
+ "description": "Customize the theme of your dashboard.",
+ "theme": "Theme",
+ "themeDescription": "Select a theme for your dashboard",
+ "themes": {
+ "light": "Light",
+ "dark": "Dark",
+ "system": "System"
+ },
+ "language": "Language",
+ "languageDescription": "Select a language for your dashboard"
}
}
}
diff --git a/apps/dokploy/public/locales/zh-Hans/settings.json b/apps/dokploy/public/locales/zh-Hans/settings.json
index 636e43c4..d426bab6 100644
--- a/apps/dokploy/public/locales/zh-Hans/settings.json
+++ b/apps/dokploy/public/locales/zh-Hans/settings.json
@@ -1,11 +1,27 @@
{
"settings": {
+ "common": {
+ "save": "保存"
+ },
"profile": {
- "title": "账户偏好"
+ "title": "账户偏好",
+ "description": "更改您的个人资料详情。",
+ "email": "电子邮件",
+ "password": "密码",
+ "avatar": "头像"
},
"appearance": {
"title": "外观",
- "description": "自定义仪表板主题。"
+ "description": "自定义仪表板主题。",
+ "theme": "主题",
+ "themeDescription": "选择仪表板主题",
+ "themes": {
+ "light": "亮",
+ "dark": "暗",
+ "system": "系统"
+ },
+ "language": "语言",
+ "languageDescription": "选择仪表板语言"
}
}
}
diff --git a/apps/dokploy/utils/hooks/use-locale.ts b/apps/dokploy/utils/hooks/use-locale.ts
index a07478b7..f00e0df8 100644
--- a/apps/dokploy/utils/hooks/use-locale.ts
+++ b/apps/dokploy/utils/hooks/use-locale.ts
@@ -1,13 +1,11 @@
import Cookies from "js-cookie";
const SUPPORTED_LOCALES = ["en", "zh-Hans"] as const;
+
type Locale = (typeof SUPPORTED_LOCALES)[number];
-type PossibleLocale = (typeof SUPPORTED_LOCALES)[number] | undefined | null;
export default function useLocale() {
- const currentLocale = Cookies.get("DOKPLOY_LOCALE") as PossibleLocale;
-
- console.log(currentLocale);
+ const currentLocale = (Cookies.get("DOKPLOY_LOCALE") ?? "en") as Locale;
const setLocale = (locale: Locale) => {
Cookies.set("DOKPLOY_LOCALE", locale);