From 84b60f4487a5460d83ace30f59c0c0f4a6ba4416 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 7 Jun 2025 19:03:31 +0200 Subject: [PATCH] l10n: port true to translation + add french --- src/uu/true/locales/en-US.ftl | 3 +++ src/uu/true/locales/fr-FR.ftl | 8 ++++++++ src/uu/true/src/true.rs | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/uu/true/locales/fr-FR.ftl diff --git a/src/uu/true/locales/en-US.ftl b/src/uu/true/locales/en-US.ftl index e75e9e670..c5806a10d 100644 --- a/src/uu/true/locales/en-US.ftl +++ b/src/uu/true/locales/en-US.ftl @@ -3,3 +3,6 @@ true-about = Returns true, a successful exit status. Immediately returns with the exit status 0, except when invoked with one of the recognized options. In those cases it will try to write the help or version text. Any IO error during this operation causes the program to return 1 instead. + +true-help-text = Print help information +true-version-text = Print version information diff --git a/src/uu/true/locales/fr-FR.ftl b/src/uu/true/locales/fr-FR.ftl new file mode 100644 index 000000000..491d11d35 --- /dev/null +++ b/src/uu/true/locales/fr-FR.ftl @@ -0,0 +1,8 @@ + +true-about = Renvoie true, un code de sortie indiquant le succès. + + Retourne immédiatement avec le code de sortie 0, sauf si l'une des options reconnues est utilisée. + Dans ce cas, il essaiera d'afficher l'aide ou la version. Une erreur d'entrée/sortie pendant cette + opération entraîne un retour avec le code de sortie 1. +true-help-text = Afficher l'aide +true-version-text = Afficher les informations de version diff --git a/src/uu/true/src/true.rs b/src/uu/true/src/true.rs index 4036024a4..188884e79 100644 --- a/src/uu/true/src/true.rs +++ b/src/uu/true/src/true.rs @@ -49,13 +49,13 @@ pub fn uu_app() -> Command { .arg( Arg::new("help") .long("help") - .help("Print help information") + .help(get_message("true-help-text")) .action(ArgAction::Help), ) .arg( Arg::new("version") .long("version") - .help("Print version information") + .help(get_message("true-version-text")) .action(ArgAction::Version), ) }