mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 23:11:14 -03:00
Make help error message localizable
This commit is contained in:
@@ -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),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user