diff --git a/src/uucore/locales/en-US.ftl b/src/uucore/locales/en-US.ftl index 358eda0d5..676f9ad3b 100644 --- a/src/uucore/locales/en-US.ftl +++ b/src/uucore/locales/en-US.ftl @@ -13,6 +13,7 @@ clap-error-unexpected-argument = { $error_word }: unexpected argument '{ $arg }' clap-error-similar-argument = { $tip_word }: a similar argument exists: '{ $suggestion }' clap-error-pass-as-value = { $tip_word }: to pass '{ $arg }' as a value, use '{ $tip_command }' clap-error-help-suggestion = For more information, try '{ $command } --help'. +common-help-suggestion = For more information, try '--help'. # Common help text patterns help-flag-help = Print help information diff --git a/src/uucore/locales/fr-FR.ftl b/src/uucore/locales/fr-FR.ftl index cbeab358d..8bd69e0f6 100644 --- a/src/uucore/locales/fr-FR.ftl +++ b/src/uucore/locales/fr-FR.ftl @@ -13,6 +13,7 @@ clap-error-unexpected-argument = { $error_word } : argument inattendu '{ $arg }' clap-error-similar-argument = { $tip_word } : un argument similaire existe : '{ $suggestion }' clap-error-pass-as-value = { $tip_word } : pour passer '{ $arg }' comme valeur, utilisez '{ $tip_command }' clap-error-help-suggestion = Pour plus d'informations, essayez '{ $command } --help'. +common-help-suggestion = Pour plus d'informations, essayez '--help'. # Modèles de texte d'aide communs help-flag-help = Afficher les informations d'aide diff --git a/src/uucore/src/lib/mods/clap_localization.rs b/src/uucore/src/lib/mods/clap_localization.rs index 581330a41..d5d3aa042 100644 --- a/src/uucore/src/lib/mods/clap_localization.rs +++ b/src/uucore/src/lib/mods/clap_localization.rs @@ -178,7 +178,7 @@ pub fn handle_clap_error_with_exit_code(err: Error, util_name: &str, exit_code: let usage_label = translate!("common-usage"); eprintln!("{}: {}", usage_label, formatted_usage); eprintln!(); - eprintln!("For more information, try '--help'."); + eprintln!("{}", translate!("common-help-suggestion")); std::process::exit(exit_code); } else { @@ -198,7 +198,7 @@ pub fn handle_clap_error_with_exit_code(err: Error, util_name: &str, exit_code: eprintln!("{}", main_error_line); eprintln!(); // Use the execution phrase for the help suggestion to match test expectations - eprintln!("For more information, try '--help'."); + eprintln!("{}", translate!("common-help-suggestion")); } else { // Fallback to original rendering if we can't parse eprint!("{}", err.render()); @@ -232,7 +232,7 @@ pub fn handle_clap_error_with_exit_code(err: Error, util_name: &str, exit_code: // For other errors, just show help suggestion eprintln!(); - eprintln!("For more information, try '--help'."); + eprintln!("{}", translate!("common-help-suggestion")); std::process::exit(exit_code); }