From c9d36160882abcf21367a0bb94ae552fcfb8c89d Mon Sep 17 00:00:00 2001 From: yerkow Date: Thu, 5 Dec 2024 10:17:54 +0500 Subject: [PATCH 1/2] feat(i18n): add kazakh language support --- .../dashboard/settings/appearance-form.tsx | 2 +- apps/dokploy/next-i18next.config.cjs | 37 +++++++++-------- apps/dokploy/pages/_app.tsx | 1 + apps/dokploy/public/locales/kz/common.json | 1 + apps/dokploy/public/locales/kz/settings.json | 41 +++++++++++++++++++ apps/dokploy/utils/hooks/use-locale.ts | 1 + 6 files changed, 64 insertions(+), 19 deletions(-) create mode 100644 apps/dokploy/public/locales/kz/common.json create mode 100644 apps/dokploy/public/locales/kz/settings.json diff --git a/apps/dokploy/components/dashboard/settings/appearance-form.tsx b/apps/dokploy/components/dashboard/settings/appearance-form.tsx index 2a3f5132b..f128948d7 100644 --- a/apps/dokploy/components/dashboard/settings/appearance-form.tsx +++ b/apps/dokploy/components/dashboard/settings/appearance-form.tsx @@ -38,7 +38,7 @@ const appearanceFormSchema = z.object({ required_error: "Please select a theme.", }), language: z.enum( - ["en", "pl", "ru", "fr", "de", "tr", "zh-Hant", "zh-Hans", "fa", "ko"], + ["en", "pl", "ru", "fr", "de", "tr", "kz", "zh-Hant", "zh-Hans", "fa", "ko"], { required_error: "Please select a language.", }, diff --git a/apps/dokploy/next-i18next.config.cjs b/apps/dokploy/next-i18next.config.cjs index adf741e91..d044c0c11 100644 --- a/apps/dokploy/next-i18next.config.cjs +++ b/apps/dokploy/next-i18next.config.cjs @@ -1,21 +1,22 @@ /** @type {import('next-i18next').UserConfig} */ module.exports = { - i18n: { - defaultLocale: "en", - locales: [ - "en", - "pl", - "ru", - "fr", - "de", - "tr", - "zh-Hant", - "zh-Hans", - "fa", - "ko", - ], - localeDetection: false, - }, - fallbackLng: "en", - keySeparator: false, + i18n: { + defaultLocale: "en", + locales: [ + "en", + "pl", + "ru", + "fr", + "de", + "tr", + "kz", + "zh-Hant", + "zh-Hans", + "fa", + "ko", + ], + localeDetection: false, + }, + fallbackLng: "en", + keySeparator: false, }; diff --git a/apps/dokploy/pages/_app.tsx b/apps/dokploy/pages/_app.tsx index 17b986c57..2f16f8886 100644 --- a/apps/dokploy/pages/_app.tsx +++ b/apps/dokploy/pages/_app.tsx @@ -78,6 +78,7 @@ export default api.withTRPC( "fr", "de", "tr", + "kz", "zh-Hant", "zh-Hans", "fa", diff --git a/apps/dokploy/public/locales/kz/common.json b/apps/dokploy/public/locales/kz/common.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/apps/dokploy/public/locales/kz/common.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/apps/dokploy/public/locales/kz/settings.json b/apps/dokploy/public/locales/kz/settings.json new file mode 100644 index 000000000..97403d0e2 --- /dev/null +++ b/apps/dokploy/public/locales/kz/settings.json @@ -0,0 +1,41 @@ +{ + "settings.common.save": "Сақтау", + "settings.server.domain.title": "Сервер домені", + "settings.server.domain.description": "Dokploy сервер қолданбасына домен енгізіңіз.", + "settings.server.domain.form.domain": "Домен", + "settings.server.domain.form.letsEncryptEmail": "Let's Encrypt Эл. поштасы", + "settings.server.domain.form.certificate.label": "Сертификат", + "settings.server.domain.form.certificate.placeholder": "Сертификатты таңдаңыз", + "settings.server.domain.form.certificateOptions.none": "Жоқ", + "settings.server.domain.form.certificateOptions.letsencrypt": "Let's Encrypt (Стандартты)", + "settings.server.webServer.title": "Веб-Сервер", + "settings.server.webServer.description": "Веб-серверді қайта жүктеу немесе тазалау.", + "settings.server.webServer.actions": "Әрекеттер", + "settings.server.webServer.reload": "Қайта жүктеу", + "settings.server.webServer.watchLogs": "Журналдарды қарау", + "settings.server.webServer.updateServerIp": "Сервердің IP жаңарту", + "settings.server.webServer.server.label": "Сервер", + "settings.server.webServer.traefik.label": "Traefik", + "settings.server.webServer.traefik.modifyEnv": "Env Өзгерту", + "settings.server.webServer.storage.label": "Диск кеңістігі", + "settings.server.webServer.storage.cleanUnusedImages": "Пайдаланылмаған образды тазалау", + "settings.server.webServer.storage.cleanUnusedVolumes": "Пайдаланылмаған томды тазалау", + "settings.server.webServer.storage.cleanStoppedContainers": "Тоқтатылған контейнерлерді тазалау", + "settings.server.webServer.storage.cleanDockerBuilder": "Docker Builder & Системаны тазалау", + "settings.server.webServer.storage.cleanMonitoring": "Мониторингті тазалау", + "settings.server.webServer.storage.cleanAll": "Барлығын тазалау", + "settings.profile.title": "Аккаунт", + "settings.profile.description": "Профиль мәліметтерін осы жерден өзгертіңіз.", + "settings.profile.email": "Эл. пошта", + "settings.profile.password": "Құпия сөз", + "settings.profile.avatar": "Аватар", + "settings.appearance.title": "Сыртқы түрі", + "settings.appearance.description": "Dokploy сыртқы келбетін өзгерту.", + "settings.appearance.theme": "Келбеті", + "settings.appearance.themeDescription": "Жүйе тақтасының келбетің таңдаңыз", + "settings.appearance.themes.light": "Жарық", + "settings.appearance.themes.dark": "Қараңғы", + "settings.appearance.themes.system": "Жүйелік", + "settings.appearance.language": "Тіл", + "settings.appearance.languageDescription": "Жүйе тақтасының тілің таңдаңыз" +} diff --git a/apps/dokploy/utils/hooks/use-locale.ts b/apps/dokploy/utils/hooks/use-locale.ts index eaeb1612f..df30b556c 100644 --- a/apps/dokploy/utils/hooks/use-locale.ts +++ b/apps/dokploy/utils/hooks/use-locale.ts @@ -7,6 +7,7 @@ const SUPPORTED_LOCALES = [ "fr", "de", "tr", + "kz", "zh-Hant", "zh-Hans", "fa", From 27f43e774a3063e35403a84295823afff4568313 Mon Sep 17 00:00:00 2001 From: yerkow Date: Thu, 5 Dec 2024 10:39:10 +0500 Subject: [PATCH 2/2] fix: kz label --- apps/dokploy/components/dashboard/settings/appearance-form.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/dokploy/components/dashboard/settings/appearance-form.tsx b/apps/dokploy/components/dashboard/settings/appearance-form.tsx index f128948d7..85db83772 100644 --- a/apps/dokploy/components/dashboard/settings/appearance-form.tsx +++ b/apps/dokploy/components/dashboard/settings/appearance-form.tsx @@ -184,6 +184,7 @@ export function AppearanceForm() { { label: "繁體中文", value: "zh-Hant" }, { label: "简体中文", value: "zh-Hans" }, { label: "Türkçe", value: "tr" }, + { label: "Қазақ", value: "tr" }, { label: "Persian", value: "fa" }, { label: "한국어", value: "ko" }, ].map((preset) => (