Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(i18n): add kazakh language support #814

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion apps/dokploy/components/dashboard/settings/appearance-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,20 @@ 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", "pt-br"],
[
"en",
"pl",
"ru",
"fr",
"de",
"tr",
"zh-Hant",
"kz",
"zh-Hans",
"fa",
"ko",
"pt-br",
],
{
required_error: "Please select a language.",
},
Expand Down Expand Up @@ -184,6 +197,8 @@ export function AppearanceForm() {
{ label: "繁體中文", value: "zh-Hant" },
{ label: "简体中文", value: "zh-Hans" },
{ label: "Türkçe", value: "tr" },
{ label: "Қазақ", value: "tr" },
{ label: "Kazakh", value: "kz" },
{ label: "Persian", value: "fa" },
{ label: "한국어", value: "ko" },
{ label: "Português", value: "pt-br" },
Expand Down
39 changes: 20 additions & 19 deletions apps/dokploy/next-i18next.config.cjs
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
/** @type {import('next-i18next').UserConfig} */
module.exports = {
i18n: {
defaultLocale: "en",
locales: [
"en",
"pl",
"ru",
"fr",
"de",
"tr",
"zh-Hant",
"zh-Hans",
"fa",
"ko",
"pt-br",
],
localeDetection: false,
},
fallbackLng: "en",
keySeparator: false,
fallbackLng: "en",
keySeparator: false,
i18n: {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was no need to change the formatting style here

defaultLocale: "en",
locales: [
"en",
"pl",
"ru",
"fr",
"de",
"tr",
"kz",
"zh-Hant",
"zh-Hans",
"fa",
"ko",
"pt-br",
],
localeDetection: false,
},
};
1 change: 1 addition & 0 deletions apps/dokploy/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export default api.withTRPC(
"fr",
"de",
"tr",
"kz",
"zh-Hant",
"zh-Hans",
"fa",
Expand Down
1 change: 1 addition & 0 deletions apps/dokploy/public/locales/kz/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
41 changes: 41 additions & 0 deletions apps/dokploy/public/locales/kz/settings.json
Original file line number Diff line number Diff line change
@@ -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": "Жүйе тақтасының тілің таңдаңыз"
}
1 change: 1 addition & 0 deletions apps/dokploy/utils/hooks/use-locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const SUPPORTED_LOCALES = [
"fr",
"de",
"tr",
"kz",
"zh-Hant",
"zh-Hans",
"fa",
Expand Down