From 5f75c371abd10f8bfe046765618857742f753a93 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 1 Jul 2025 09:29:01 +0200 Subject: [PATCH] nice: remove useless translations --- src/uu/nice/locales/en-US.ftl | 2 -- src/uu/nice/src/nice.rs | 13 ++----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/uu/nice/locales/en-US.ftl b/src/uu/nice/locales/en-US.ftl index fad0b19e5..1630b2925 100644 --- a/src/uu/nice/locales/en-US.ftl +++ b/src/uu/nice/locales/en-US.ftl @@ -4,11 +4,9 @@ nice-about = Run COMMAND with an adjusted niceness, which affects process schedu nice-usage = nice [OPTION] [COMMAND [ARG]...] # Error messages -nice-error-getpriority = getpriority: { $error } nice-error-command-required-with-adjustment = A command must be given with an adjustment. nice-error-invalid-number = "{ $value }" is not a valid number: { $error } nice-warning-setpriority = { $util_name }: warning: setpriority: { $error } -nice-error-execvp = execvp: { $error } # Help text for command-line arguments nice-help-adjustment = add N to the niceness (default is 10) diff --git a/src/uu/nice/src/nice.rs b/src/uu/nice/src/nice.rs index 943e72c7c..b5e659399 100644 --- a/src/uu/nice/src/nice.rs +++ b/src/uu/nice/src/nice.rs @@ -111,10 +111,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { if Error::last_os_error().raw_os_error().unwrap() != 0 { return Err(USimpleError::new( 125, - get_message_with_args( - "nice-error-getpriority", - HashMap::from([("error".to_string(), Error::last_os_error().to_string())]), - ), + format!("getpriority: {}", Error::last_os_error()), )); } @@ -183,13 +180,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { execvp(args[0], args.as_mut_ptr()); } - show_error!( - "{}", - get_message_with_args( - "nice-error-execvp", - HashMap::from([("error".to_string(), Error::last_os_error().to_string())]) - ) - ); + show_error!("execvp: {}", Error::last_os_error()); let exit_code = if Error::last_os_error().raw_os_error().unwrap() as c_int == libc::ENOENT { 127