From bd5ea80aff5092118920ea897af6c3f5f9fb2a3b Mon Sep 17 00:00:00 2001 From: "Max P." Date: Wed, 28 May 2025 18:09:16 +0200 Subject: [PATCH] feat(i18n): add German and English translations for CLI tool - Introduce localization files for German and English languages - Provide translations for CLI tool options and error messages --- src/i18n/de.json | 22 ++++++++++++++++++++++ src/i18n/en.json | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 src/i18n/de.json create mode 100644 src/i18n/en.json diff --git a/src/i18n/de.json b/src/i18n/de.json new file mode 100644 index 0000000..3a672e5 --- /dev/null +++ b/src/i18n/de.json @@ -0,0 +1,22 @@ +{ + "cli_description": "CLI-Tool zum Erzeugen von systemd .timer und .service Units", + "cli_create_description": "Erzeugt eine systemd .service und .timer Unit", + "option_name": "Name der Unit-Dateien (optional, wird sonst aus dem Exec generiert)", + "option_exec": "Kommando, das durch systemd ausgeführt werden soll", + "option_calendar": "OnCalendar-Ausdruck für den Timer", + "option_description": "Beschreibung des Timers", + "option_user": "Erstellt die Unit als User-Timer", + "option_run_as": "Führe den systemweiten Timer als bestimmter Benutzer aus (setzt User= in der Service-Unit)", + "option_home": "HOME-Variable für den Service setzen", + "option_cwd": "Arbeitsverzeichnis (WorkingDirectory) für den Service-Prozess", + "option_output": "Zielverzeichnis der Unit-Dateien", + "option_after": "Optionales After= für die Service-Unit", + "option_environment": "Environment-Variablen im Format KEY=VALUE", + "option_logfile": "Dateipfad für Log-Ausgabe (stdout/stderr)", + "option_dry_run": "Gibt die Unit-Dateien nur aus, ohne sie zu schreiben", + "unit_written_service": "Service Unit geschrieben in: {path}", + "unit_written_timer": "Timer Unit geschrieben in: {path}", + "hint_header": "\nℹ️ Hinweis:", + "error_write_units": "Fehler beim Schreiben der Units:", + "rollback_failed": "Rollback fehlgeschlagen:" +} \ No newline at end of file diff --git a/src/i18n/en.json b/src/i18n/en.json new file mode 100644 index 0000000..2ee0402 --- /dev/null +++ b/src/i18n/en.json @@ -0,0 +1,22 @@ +{ + "cli_description": "CLI tool for generating systemd .timer and .service units", + "cli_create_description": "Generates a systemd .service and .timer unit", + "option_name": "Name of the unit files (optional, otherwise derived from the exec command)", + "option_exec": "Command to be executed by systemd", + "option_calendar": "OnCalendar expression for the timer", + "option_description": "Description of the timer", + "option_user": "Creates the unit as a user timer", + "option_run_as": "Runs the system-wide timer as a specific user (sets User= in the service unit)", + "option_home": "Sets the HOME variable for the service", + "option_cwd": "Working directory (WorkingDirectory) for the service process", + "option_output": "Target directory for the unit files", + "option_after": "Optional After= directive for the service unit", + "option_environment": "Environment variables in the format KEY=VALUE", + "option_logfile": "File path for log output (stdout/stderr)", + "option_dry_run": "Only outputs the unit files without writing them", + "unit_written_service": "Service unit written to: {path}", + "unit_written_timer": "Timer unit written to: {path}", + "hint_header": "\nℹ️ Note:", + "error_write_units": "Error while writing unit files:", + "rollback_failed": "Rollback failed:" +} \ No newline at end of file