mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
allow translation of "For more information, try '--help'."
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -179,7 +179,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 {
|
||||
@@ -199,7 +199,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());
|
||||
@@ -233,7 +233,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user