Remove concat! macro from localized strings

This is done in preparation for a proc macro which extracts strings which are
passed to `gettext`. Because the `concat!` macro would get expanded after the
proc macro, the proc macro would still see the `concat!`, which it cannot
handle.
This commit is contained in:
Daniel Rainer
2025-05-28 01:38:40 +02:00
parent 08bf5c92a9
commit 98b3ba5e8e
4 changed files with 5 additions and 16 deletions

View File

@@ -97,10 +97,7 @@ pub fn fg(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> Built
job_pos = Some(pos);
job = if !j.wants_job_control() {
streams.err.append(wgettext_fmt!(
concat!(
"%ls: Can't put job %d, '%ls' to foreground because ",
"it is not under job control\n"
),
"%ls: Can't put job %d, '%ls' to foreground because it is not under job control\n",
cmd,
raw_pid,
j.command()

View File

@@ -107,10 +107,7 @@ fn parse_cmd_opts(
}
'i' => {
streams.err.append(wgettext_fmt!(
concat!(
"%ls: usage of -i for --silent is deprecated. Please ",
"use -s or --silent instead.\n"
),
"%ls: usage of -i for --silent is deprecated. Please use -s or --silent instead.\n",
cmd
));
return Err(STATUS_INVALID_ARGS);

View File

@@ -26,10 +26,8 @@
pub const BUILTIN_ERR_MISSING: &str = "%ls: %ls: option requires an argument\n";
/// Error message on missing man page.
pub const BUILTIN_ERR_MISSING_HELP: &str = concat!(
"fish: %ls: missing man page\nDocumentation may not be installed.\n`help %ls` will ",
"show an online version\n"
);
pub const BUILTIN_ERR_MISSING_HELP: &str =
"fish: %ls: missing man page\nDocumentation may not be installed.\n`help %ls` will show an online version\n";
/// Error message on multiple scope levels for variables.
pub const BUILTIN_ERR_GLOCAL: &str =

View File

@@ -278,10 +278,7 @@ fn handle_command_not_found(
ctx,
STATUS_NOT_EXECUTABLE,
&statement.command,
concat!(
"Unknown command. A component of '%ls' is not a ",
"directory. Check your $PATH."
),
"Unknown command. A component of '%ls' is not a directory. Check your $PATH.",
cmd
);
} else {