From 51a57870ebd67268ef9782b8e935ed6d7af95240 Mon Sep 17 00:00:00 2001 From: Daniel Rainer Date: Sun, 1 Jun 2025 15:42:42 +0200 Subject: [PATCH] Make help error message localizable --- src/print_help.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/print_help.rs b/src/print_help.rs index 6f5c0ce2c..caad55532 100644 --- a/src/print_help.rs +++ b/src/print_help.rs @@ -1,6 +1,8 @@ //! Helper for executables (not builtins) to print a help message //! Uses the fish in PATH, not necessarily the matching fish binary +use crate::wgettext; + use std::ffi::{OsStr, OsString}; use std::process::Command; @@ -16,9 +18,8 @@ pub fn print_help(command: &str) { .spawn() .and_then(|mut c| c.wait()) { - // TODO: should be translated - Ok(status) if !status.success() => eprintf!("%s\n", HELP_ERR), - Err(e) => eprintf!("%s: %s\n", HELP_ERR, e), + Ok(status) if !status.success() => eprintf!("%s\n", wgettext!(HELP_ERR)), + Err(e) => eprintf!("%s: %s\n", wgettext!(HELP_ERR), e), _ => (), } }