From 2342f9a1aeea2165f06b4a23507e30926aee46ff Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Wed, 21 May 2025 23:20:55 +0200 Subject: [PATCH 1/5] Add German UI translation --- .github/CODEOWNERS | 1 + .pre-commit-config.yaml | 11 ++++- .../src/airflow/ui/src/i18n/config.ts | 7 +++ .../ui/src/i18n/locales/de/common.json | 47 ++++++++++++++++++ .../ui/src/i18n/locales/de/dashboard.json | 49 +++++++++++++++++++ 5 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 airflow-core/src/airflow/ui/src/i18n/locales/de/common.json create mode 100644 airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7354aedfbb1df..012fdef7da1d7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -36,6 +36,7 @@ /airflow-core/src/airflow/ui/ @bbovenzi @pierrejeambrun @ryanahamilton @jscheffl @shubhamraj-git # Translations +airflow-core/src/airflow/ui/src/i18n/locales/de/ @jscheffl airflow-core/src/airflow/ui/src/i18n/locales/zh_TW/ @Lee-W # Security/Permissions diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 193dce32fdffb..6b9109a84adf5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -343,7 +343,16 @@ repos: The word(s) should be in lowercase." && exec codespell "$@"' -- language: python types: [text] - exclude: material-icons\.css$|^images/.*$|^RELEASE_NOTES\.txt$|^.*package-lock\.json$|^.*/kinglear\.txt$|^.*pnpm-lock\.yaml$|.*/dist/.* + exclude: > + (?x) + material-icons\.css$| + ^images/.*$| + ^RELEASE_NOTES\.txt$| + ^.*package-lock\.json$| + ^.*/kinglear\.txt$| + ^.*pnpm-lock\.yaml$| + .*/dist/.*| + ^airflow-core/src/airflow/ui/src/i18n/locales/de/ args: - --ignore-words=docs/spelling_wordlist.txt - --skip=providers/.*/src/airflow/providers/*/*.rst,providers/*/docs/changelog.rst,docs/*/commits.rst,providers/*/docs/commits.rst,providers/*/*/docs/commits.rst,docs/apache-airflow/tutorial/pipeline_example.csv,*.min.js,*.lock,INTHEWILD.md,*.svg diff --git a/airflow-core/src/airflow/ui/src/i18n/config.ts b/airflow-core/src/airflow/ui/src/i18n/config.ts index 09787d34d1373..690d64fdb366f 100644 --- a/airflow-core/src/airflow/ui/src/i18n/config.ts +++ b/airflow-core/src/airflow/ui/src/i18n/config.ts @@ -20,6 +20,8 @@ import i18n from "i18next"; import LanguageDetector from "i18next-browser-languagedetector"; import { initReactI18next } from "react-i18next"; +import deCommon from "./locales/de/common.json"; +import deDashboard from "./locales/de/dashboard.json"; import enCommon from "./locales/en/common.json"; import enDashboard from "./locales/en/dashboard.json"; import zhTWCommon from "./locales/zh_TW/common.json"; @@ -29,6 +31,7 @@ import zhTWDashboard from "./locales/zh_TW/dashboard.json"; // import Backend from 'i18next-http-backend'; export const supportedLanguages = [ + { code: "de", name: "Deutsch" }, { code: "en", name: "English" }, { code: "zh_TW", name: "繁體中文" }, ] as const; @@ -37,6 +40,10 @@ export const defaultLanguage = "en"; export const namespaces = ["common", "dashboard"] as const; const resources = { + de: { + common: deCommon, + dashboard: deDashboard, + }, en: { common: enCommon, dashboard: enDashboard, diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json b/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json new file mode 100644 index 0000000000000..3740a90132147 --- /dev/null +++ b/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json @@ -0,0 +1,47 @@ +{ + "defaultToGraphView": "Graph-Ansicht als Standard", + "defaultToGridView": "Gitter-Ansicht als Standard", + "logout": "Abelden", + "switchToDarkMode": "Zum Dunkelmodus wechseln", + "switchToLightMode": "Zum Hellmodus wechseln", + "timezone": "Zeitzone", + "user": "Benutzer", + "language": { + "chinese": "Traditionelles Chinesisch", + "english": "Englisch", + "german": "Deutsch", + "select": "Select Language" + }, + "nav": { + "home": "Start", + "assets": "Assets", + "browse": "Browsen", + "admin": "Verwaltung", + "docs": "Dokumentation", + "plugins": "Plug-ins" + }, + "browse": { + "auditLog": "Prüf-Log", + "xcoms": "XComs" + }, + "admin": { + "Variables": "Variablen", + "Pools": "Pools", + "Providers": "Providers", + "Plugins": "Plug-ins", + "Connections": "Verbindungen", + "Config": "Konfiguration" + }, + "timeRange": { + "duration": "Laufzeit", + "lastHour": "Letzte Stunde", + "last12Hours": "Vergangene 12 Stunden", + "last24Hours": "Vergangene 24 Stunden", + "pastWeek": "Letzte Woche" + }, + "docs": { + "documentation": "Dokumentation", + "githubRepo": "GitHub Ablage", + "restApiReference": "REST API Referenz" + } +} diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json b/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json new file mode 100644 index 0000000000000..a4a4226990fd7 --- /dev/null +++ b/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json @@ -0,0 +1,49 @@ +{ + "welcome": "Willkommen", + "stats": { + "stats": "Statistiken", + "failedDags": "Fehlgeschlagene Dags", + "runningDags": "Laufende Dags", + "activeDags": "Aktive Dags", + "queuedDags": "Dags in Warteschlange" + }, + "health": { + "health": "System-Gesundheit", + "metaDatabase": "Meta-Datenbank", + "scheduler": "Scheduler", + "triggerer": "Triggerer", + "dagProcessor": "Dag Prozessor" + }, + "poolSlots": "Pool Plätze", + "managePools": "Pools Verwalten", + "history": "Historie", + "dagRun_one": "Dag Lauf", + "dagRun_other": "Dag Läufe", + "taskInstance_one": "Task Instanz", + "taskInstance_other": "Task Instanzen", + "assetEvent_one": "Asset-Ereignis", + "assetEvent_other": "Asset-Ereignisse", + "states": { + "queued": "Wartend", + "running": "Laufend", + "success": "Erfolgreich", + "failed": "Fehlgeschlagen", + "skipped": "Übersprungen", + "removed": "Gelöscht", + "scheduled": "Geplant", + "restarting": "Im Neustart", + "up_for_retry": "Warte auf neuen Versuch", + "up_for_reschedule": "Warte auf Neuplanung", + "upstream_failed": "Vorgelagerte fehlgeschlagen", + "deferred": "Ausgesetzt", + "no_status": "Kein Status" + }, + "noAssetEvents": "Keine Asset-Ereignisse vorliegend.", + "sortBy": { + "newestFirst": "Neueste zuerst", + "oldestFirst": "Älteste zuerst" + }, + "source": "Quellcode", + "group": "Gruppe", + "uri": "Uri" +} From 27db935baa3c5f178ccfb2dbbc09c6515de827fc Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Wed, 21 May 2025 23:25:21 +0200 Subject: [PATCH 2/5] Add German UI translation, small nit --- .../src/airflow/ui/src/i18n/locales/de/common.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json b/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json index 3740a90132147..c2131fb0b9c7b 100644 --- a/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json +++ b/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json @@ -1,7 +1,7 @@ { "defaultToGraphView": "Graph-Ansicht als Standard", "defaultToGridView": "Gitter-Ansicht als Standard", - "logout": "Abelden", + "logout": "Abmelden", "switchToDarkMode": "Zum Dunkelmodus wechseln", "switchToLightMode": "Zum Hellmodus wechseln", "timezone": "Zeitzone", @@ -10,7 +10,7 @@ "chinese": "Traditionelles Chinesisch", "english": "Englisch", "german": "Deutsch", - "select": "Select Language" + "select": "Sprache wählen" }, "nav": { "home": "Start", @@ -35,8 +35,8 @@ "timeRange": { "duration": "Laufzeit", "lastHour": "Letzte Stunde", - "last12Hours": "Vergangene 12 Stunden", - "last24Hours": "Vergangene 24 Stunden", + "last12Hours": "Letzte 12 Stunden", + "last24Hours": "Letzte 24 Stunden", "pastWeek": "Letzte Woche" }, "docs": { From 1990839c1854f32f05893d0c6ccadc5b61220881 Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Thu, 22 May 2025 21:02:21 +0200 Subject: [PATCH 3/5] Review fedback --- .../src/airflow/ui/src/i18n/locales/de/dashboard.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json b/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json index a4a4226990fd7..151d49b607682 100644 --- a/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json +++ b/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json @@ -15,7 +15,7 @@ "dagProcessor": "Dag Prozessor" }, "poolSlots": "Pool Plätze", - "managePools": "Pools Verwalten", + "managePools": "Pools verwalten", "history": "Historie", "dagRun_one": "Dag Lauf", "dagRun_other": "Dag Läufe", @@ -29,13 +29,13 @@ "success": "Erfolgreich", "failed": "Fehlgeschlagen", "skipped": "Übersprungen", - "removed": "Gelöscht", + "removed": "Entfernt", "scheduled": "Geplant", "restarting": "Im Neustart", - "up_for_retry": "Warte auf neuen Versuch", - "up_for_reschedule": "Warte auf Neuplanung", + "up_for_retry": "Wartet auf neuen Versuch", + "up_for_reschedule": "Wartet auf Neuplanung", "upstream_failed": "Vorgelagerte fehlgeschlagen", - "deferred": "Ausgesetzt", + "deferred": "Delegiert", "no_status": "Kein Status" }, "noAssetEvents": "Keine Asset-Ereignisse vorliegend.", From 65e3f75ceea77536fb08e493226d18ea43f0bd29 Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Thu, 22 May 2025 21:23:21 +0200 Subject: [PATCH 4/5] Rebase translation and some rework --- .../ui/src/i18n/locales/de/common.json | 37 +++++++++++++++-- .../ui/src/i18n/locales/de/dashboard.json | 41 +++++++------------ 2 files changed, 49 insertions(+), 29 deletions(-) diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json b/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json index c2131fb0b9c7b..ca06191273db5 100644 --- a/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json +++ b/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json @@ -14,7 +14,7 @@ }, "nav": { "home": "Start", - "assets": "Assets", + "assets": "Datenbestände", "browse": "Browsen", "admin": "Verwaltung", "docs": "Dokumentation", @@ -22,12 +22,12 @@ }, "browse": { "auditLog": "Prüf-Log", - "xcoms": "XComs" + "xcoms": "Datenwerte" }, "admin": { "Variables": "Variablen", "Pools": "Pools", - "Providers": "Providers", + "Providers": "Provider", "Plugins": "Plug-ins", "Connections": "Verbindungen", "Config": "Konfiguration" @@ -43,5 +43,36 @@ "documentation": "Dokumentation", "githubRepo": "GitHub Ablage", "restApiReference": "REST API Referenz" + }, + "states": { + "queued": "Wartend", + "running": "Laufend", + "success": "Erfolgreich", + "failed": "Fehlgeschlagen", + "skipped": "Übersprungen", + "removed": "Entfernt", + "scheduled": "Geplant", + "restarting": "Im Neustart", + "up_for_retry": "Wartet auf neuen Versuch", + "up_for_reschedule": "Wartet auf Neuplanung", + "upstream_failed": "Vorgelagerte fehlgeschlagen", + "deferred": "Delegiert", + "no_status": "Kein Status" + }, + "dagRun_one": "Dag Lauf", + "dagRun_other": "Dag Läufe", + "taskInstance_one": "Task Instanz", + "taskInstance_other": "Task Instanzen", + "assetEvent_one": "Ereignis zum Datenbestand", + "assetEvent_other": "Ereignisse zum Datenbestand", + "triggered": "Angestoßen", + "pools": { + "open": "Frei", + "running": "Laufend", + "queued": "Wartend", + "scheduled": "Geplant", + "deferred": "Delegiert", + "pools_one": "Pool", + "pools_other": "Pools" } } diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json b/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json index 151d49b607682..a3288e56fe892 100644 --- a/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json +++ b/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json @@ -10,40 +10,29 @@ "health": { "health": "System-Gesundheit", "metaDatabase": "Meta-Datenbank", - "scheduler": "Scheduler", + "scheduler": "Planer", "triggerer": "Triggerer", - "dagProcessor": "Dag Prozessor" + "dagProcessor": "Dag Prozessor", + "status": "Status", + "lastHeartbeat": "Letztes Lebenszeichen", + "healthy": "Gut", + "unhealthy": "Nicht in Ordnung" }, - "poolSlots": "Pool Plätze", + "importErrors": { + "searchByFile": "Nach Datei suchen", + "dagImportError_one": "Fehler beim Laden des Dag", + "dagImportError_other": "Fehler beim Laden des Dags", + "timestamp": "Zeitstempel" + }, + "poolSlots": "Pool Belegung", "managePools": "Pools verwalten", "history": "Historie", - "dagRun_one": "Dag Lauf", - "dagRun_other": "Dag Läufe", - "taskInstance_one": "Task Instanz", - "taskInstance_other": "Task Instanzen", - "assetEvent_one": "Asset-Ereignis", - "assetEvent_other": "Asset-Ereignisse", - "states": { - "queued": "Wartend", - "running": "Laufend", - "success": "Erfolgreich", - "failed": "Fehlgeschlagen", - "skipped": "Übersprungen", - "removed": "Entfernt", - "scheduled": "Geplant", - "restarting": "Im Neustart", - "up_for_retry": "Wartet auf neuen Versuch", - "up_for_reschedule": "Wartet auf Neuplanung", - "upstream_failed": "Vorgelagerte fehlgeschlagen", - "deferred": "Delegiert", - "no_status": "Kein Status" - }, - "noAssetEvents": "Keine Asset-Ereignisse vorliegend.", "sortBy": { "newestFirst": "Neueste zuerst", "oldestFirst": "Älteste zuerst" }, "source": "Quellcode", "group": "Gruppe", - "uri": "Uri" + "uri": "Uri", + "noAssetEvents": "Keine Ereignisse zu Datenbeständen vorliegend." } From 02db93cc042ff88c86a52cc42a5e85a1a79b8052 Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Fri, 23 May 2025 21:26:45 +0200 Subject: [PATCH 5/5] Second review round --- .../src/airflow/ui/src/i18n/locales/de/common.json | 10 +++++----- .../src/airflow/ui/src/i18n/locales/de/dashboard.json | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json b/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json index ca06191273db5..a60ae023a3e1d 100644 --- a/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json +++ b/airflow-core/src/airflow/ui/src/i18n/locales/de/common.json @@ -14,7 +14,7 @@ }, "nav": { "home": "Start", - "assets": "Datenbestände", + "assets": "Datensets (Assets)", "browse": "Browsen", "admin": "Verwaltung", "docs": "Dokumentation", @@ -22,12 +22,12 @@ }, "browse": { "auditLog": "Prüf-Log", - "xcoms": "Datenwerte" + "xcoms": "Task Kommunikation (XComs)" }, "admin": { "Variables": "Variablen", "Pools": "Pools", - "Providers": "Provider", + "Providers": "Providers", "Plugins": "Plug-ins", "Connections": "Verbindungen", "Config": "Konfiguration" @@ -63,8 +63,8 @@ "dagRun_other": "Dag Läufe", "taskInstance_one": "Task Instanz", "taskInstance_other": "Task Instanzen", - "assetEvent_one": "Ereignis zum Datenbestand", - "assetEvent_other": "Ereignisse zum Datenbestand", + "assetEvent_one": "Ereignis zu Datensets (Asset)", + "assetEvent_other": "Ereignisse zu Datensets (Asset)", "triggered": "Angestoßen", "pools": { "open": "Frei", diff --git a/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json b/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json index a3288e56fe892..53e27af44aad4 100644 --- a/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json +++ b/airflow-core/src/airflow/ui/src/i18n/locales/de/dashboard.json @@ -20,8 +20,8 @@ }, "importErrors": { "searchByFile": "Nach Datei suchen", - "dagImportError_one": "Fehler beim Laden des Dag", - "dagImportError_other": "Fehler beim Laden des Dags", + "dagImportError_one": "Fehler beim Laden des Dags", + "dagImportError_other": "Fehler beim Laden der Dags", "timestamp": "Zeitstempel" }, "poolSlots": "Pool Belegung", @@ -34,5 +34,5 @@ "source": "Quellcode", "group": "Gruppe", "uri": "Uri", - "noAssetEvents": "Keine Ereignisse zu Datenbeständen vorliegend." + "noAssetEvents": "Keine Ereignisse zu Datensets vorliegend." }