Skip to content

Commit

Permalink
Merge pull request #735 from mezotv/i18n-german
Browse files Browse the repository at this point in the history
feat(i18n): add german language support
  • Loading branch information
Siumauricio authored Nov 21, 2024
2 parents f7533c8 + 6dff11a commit 4a70d60
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const appearanceFormSchema = z.object({
theme: z.enum(["light", "dark", "system"], {
required_error: "Please select a theme.",
}),
language: z.enum(["en", "pl", "ru", "zh-Hans"], {
language: z.enum(["en", "pl", "ru", "de", "zh-Hans"], {
required_error: "Please select a language.",
}),
});
Expand Down Expand Up @@ -176,6 +176,7 @@ export function AppearanceForm() {
{ label: "English", value: "en" },
{ label: "Polski", value: "pl" },
{ label: "Русский", value: "ru" },
{ label: "Deutsch", value: "de" },
{ label: "简体中文", value: "zh-Hans" },
].map((preset) => (
<SelectItem key={preset.label} value={preset.value}>
Expand Down
2 changes: 1 addition & 1 deletion apps/dokploy/next-i18next.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module.exports = {
i18n: {
defaultLocale: "en",
locales: ["en", "pl", "ru", "zh-Hans"],
locales: ["en", "pl", "ru", "de", "zh-Hans"],
localeDetection: false,
},
fallbackLng: "en",
Expand Down
2 changes: 1 addition & 1 deletion apps/dokploy/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default api.withTRPC(
{
i18n: {
defaultLocale: "en",
locales: ["en", "pl", "ru", "zh-Hans"],
locales: ["en", "pl", "ru", "de", "zh-Hans"],
localeDetection: false,
},
fallbackLng: "en",
Expand Down
1 change: 1 addition & 0 deletions apps/dokploy/public/locales/de/common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
44 changes: 44 additions & 0 deletions apps/dokploy/public/locales/de/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"settings.common.save": "Speichern",
"settings.server.domain.title": "Server-Domain",
"settings.server.domain.description": "Füg eine Domain zu deiner Server-Anwendung hinzu.",
"settings.server.domain.form.domain": "Domain",
"settings.server.domain.form.letsEncryptEmail": "Let's Encrypt E-Mail",
"settings.server.domain.form.certificate.label": "Zertifikat",
"settings.server.domain.form.certificate.placeholder": "Wähl ein Zertifikat aus",
"settings.server.domain.form.certificateOptions.none": "Keins",
"settings.server.domain.form.certificateOptions.letsencrypt": "Let's Encrypt (Standard)",

"settings.server.webServer.title": "Web-Server",
"settings.server.webServer.description": "Lade den Web-Server neu oder reinige ihn.",
"settings.server.webServer.actions": "Aktionen",
"settings.server.webServer.reload": "Neu laden",
"settings.server.webServer.watchLogs": "Logs anschauen",
"settings.server.webServer.updateServerIp": "Server-IP Aktualisieren",
"settings.server.webServer.server.label": "Server",
"settings.server.webServer.traefik.label": "Traefik",
"settings.server.webServer.traefik.modifyEnv": "Umgebungsvariablen ändern",
"settings.server.webServer.storage.label": "Speicherplatz",
"settings.server.webServer.storage.cleanUnusedImages": "Nicht genutzte Bilder löschen",
"settings.server.webServer.storage.cleanUnusedVolumes": "Nicht genutzte Volumes löschen",
"settings.server.webServer.storage.cleanStoppedContainers": "Gestoppte Container löschen",
"settings.server.webServer.storage.cleanDockerBuilder": "Docker Builder & System bereinigen",
"settings.server.webServer.storage.cleanMonitoring": "Monitoring bereinigen",
"settings.server.webServer.storage.cleanAll": "Alles bereinigen",

"settings.profile.title": "Konto",
"settings.profile.description": "Ändere die Details deines Profiles hier.",
"settings.profile.email": "E-Mail",
"settings.profile.password": "Passwort",
"settings.profile.avatar": "Avatar",

"settings.appearance.title": "Aussehen",
"settings.appearance.description": "Pass das Design deines Dashboards an.",
"settings.appearance.theme": "Theme",
"settings.appearance.themeDescription": "Wähl ein Theme für dein Dashboard aus",
"settings.appearance.themes.light": "Hell",
"settings.appearance.themes.dark": "Dunkel",
"settings.appearance.themes.system": "System",
"settings.appearance.language": "Sprache",
"settings.appearance.languageDescription": "Wähl eine Sprache für dein Dashboard aus"
}
2 changes: 1 addition & 1 deletion apps/dokploy/utils/hooks/use-locale.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Cookies from "js-cookie";

const SUPPORTED_LOCALES = ["en", "pl", "ru", "zh-Hans"] as const;
const SUPPORTED_LOCALES = ["en", "pl", "ru", "de", "zh-Hans"] as const;

type Locale = (typeof SUPPORTED_LOCALES)[number];

Expand Down

0 comments on commit 4a70d60

Please sign in to comment.