From e4e41a8da4c4611429ca54add1ead88835b44dff Mon Sep 17 00:00:00 2001 From: Bono Fox Date: Sun, 7 Dec 2025 22:05:33 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20#126:=20Added=20missing=20ar?= =?UTF-8?q?g=20`lang`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - argument is evaluated manually - clap has to know its existence --- src/cli/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cli/main.rs b/src/cli/main.rs index 5fb96a0..e1d6443 100644 --- a/src/cli/main.rs +++ b/src/cli/main.rs @@ -15,6 +15,9 @@ struct Args { subcommand: Command, #[arg(short, long, help = "Turns the debug logging on", global = true)] verbose: bool, + // lang is being evaluated manually (without clap) + #[arg(long, help = "Setting the language for the current command execution", global = true)] + lang: Option, } #[derive(Subcommand)] From d2beaf2fa176b774b273de1fd682e52202f0d079 Mon Sep 17 00:00:00 2001 From: Bono Fox Date: Sun, 7 Dec 2025 22:09:48 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8C=90=20Translated=20the=20CLI=20arg?= =?UTF-8?q?uments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cli/main.rs | 4 ++-- src/locales/de.json | 6 +++++- src/locales/en.json | 6 +++++- src/locales/es.json | 6 +++++- src/locales/fr.json | 6 +++++- src/locales/it.json | 6 +++++- src/locales/tr.json | 6 +++++- src/locales/uk.json | 6 +++++- 8 files changed, 37 insertions(+), 9 deletions(-) diff --git a/src/cli/main.rs b/src/cli/main.rs index e1d6443..ebd50d4 100644 --- a/src/cli/main.rs +++ b/src/cli/main.rs @@ -13,10 +13,10 @@ i18n!("src/locales", fallback = "en"); struct Args { #[command(subcommand)] subcommand: Command, - #[arg(short, long, help = "Turns the debug logging on", global = true)] + #[arg(short, long, help = t!("cli.help.args.debug_logging"), global = true)] verbose: bool, // lang is being evaluated manually (without clap) - #[arg(long, help = "Setting the language for the current command execution", global = true)] + #[arg(long, help = t!("cli.help.args.lang"), global = true)] lang: Option, } diff --git a/src/locales/de.json b/src/locales/de.json index f7738cd..23d560b 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -135,7 +135,11 @@ "exposure": "Steuert den Belichtungsmodus der Kamera", "info": "Zeigt Informationen über den aktuellen Zustand der Kamera", "version": "Zeigt die Version des CLI-Tools", - "completions": "Erzeugt Shell-Vervollständigungs-Skripte für das CLI-Tool" + "completions": "Erzeugt Shell-Vervollständigungs-Skripte für das CLI-Tool", + "args": { + "debug_logging": "Das Debug-Logging einschalten", + "lang": "Die Sprache für die aktuelle Kommandoausführung festlegen" + } } }, "display": { diff --git a/src/locales/en.json b/src/locales/en.json index 334b7b4..85824dd 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -135,7 +135,11 @@ "exposure": "Controls the exposure-mode of the camera", "info": "Displays information about the current state of the camera", "version": "Displays the version of the CLI-tool", - "completions": "Generates shell-completion scripts for the CLI-tool" + "completions": "Generates shell-completion scripts for the CLI-tool", + "args": { + "debug_logging": "Turning the debug logging on", + "lang": "Setting the language for the current command execution" + } } }, "display": { diff --git a/src/locales/es.json b/src/locales/es.json index afd55e7..b6b4f70 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -135,7 +135,11 @@ "exposure": "Controla el modo de exposición", "info": "Muestra información del estado actual", "version": "Muestra la versión de la herramienta CLI", - "completions": "Genera scripts de autocompletado" + "completions": "Genera scripts de autocompletado", + "args": { + "debug_logging": "Activar el registro de depuración", + "lang": "Configurar el idioma para la ejecución del comando actual" + } } }, "display": { diff --git a/src/locales/fr.json b/src/locales/fr.json index 71f6c5f..3dd60ab 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -135,7 +135,11 @@ "exposure": "Contrôle le mode d’exposition", "info": "Affiche les informations de la caméra", "version": "Affiche la version de l’outil CLI", - "completions": "Génère des scripts d’auto-complétion" + "completions": "Génère des scripts d’auto-complétion", + "args": { + "debug_logging": "Activer la journalisation de débogage", + "lang": "Définir la langue pour l’exécution de la commande en cours" + } } }, "display": { diff --git a/src/locales/it.json b/src/locales/it.json index 91c37c8..c8a96a9 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -135,7 +135,11 @@ "exposure": "Controlla la modalità esposizione", "info": "Mostra le informazioni della fotocamera", "version": "Mostra la versione dello strumento CLI", - "completions": "Genera script di completamento" + "completions": "Genera script di completamento", + "args": { + "debug_logging": "Attivare la registrazione di debug", + "lang": "Impostare la lingua per l’esecuzione del comando corrente" + } } }, "display": { diff --git a/src/locales/tr.json b/src/locales/tr.json index e7cc25d..0b5256d 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -135,7 +135,11 @@ "exposure": "Pozlama modunu kontrol eder", "info": "Kameranın mevcut durumunu gösterir", "version": "CLI aracının sürümünü gösterir", - "completions": "CLI için kabuk tamamlama betikleri oluşturur" + "completions": "CLI için kabuk tamamlama betikleri oluşturur", + "args": { + "debug_logging": "Hata ayıklama günlüğünü açma", + "lang": "Geçerli komut yürütme için dili ayarlama" + } } }, "display": { diff --git a/src/locales/uk.json b/src/locales/uk.json index 37ed325..b0b04c4 100644 --- a/src/locales/uk.json +++ b/src/locales/uk.json @@ -135,7 +135,11 @@ "exposure": "Керує режимом експозиції", "info": "Показує інформацію про стан камери", "version": "Показує версію CLI", - "completions": "Генерує скрипти автодоповнення" + "completions": "Генерує скрипти автодоповнення", + "args": { + "debug_logging": "Увімкнення журналювання зневадження", + "lang": "Встановлення мови для виконання поточної команди" + } } }, "display": {