From 21041e3cc7281485ffcce0a0ecd2f037918d2580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Fri, 13 Nov 2020 02:35:11 -0300 Subject: [PATCH] src: don't split wide char strings that are used with gettext. A bug in xgettext leads to the generation of useless msgids in the po files for these strings. --- src/builtin_fg.cpp | 3 +-- src/builtin_functions.cpp | 3 +-- src/parse_constants.h | 3 +-- src/reader.cpp | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/builtin_fg.cpp b/src/builtin_fg.cpp index 1211c27c1..70e072333 100644 --- a/src/builtin_fg.cpp +++ b/src/builtin_fg.cpp @@ -79,8 +79,7 @@ maybe_t builtin_fg(parser_t &parser, io_streams_t &streams, wchar_t **argv) streams.err.append_format(_(L"%ls: No suitable job: %d\n"), cmd, pid); job = nullptr; } else if (!job->wants_job_control()) { - streams.err.append_format(_(L"%ls: Can't put job %d, '%ls' to foreground because " - L"it is not under job control\n"), + streams.err.append_format(_(L"%ls: Can't put job %d, '%ls' to foreground because it is not under job control\n"), cmd, pid, job->command_wcstr()); job = nullptr; } diff --git a/src/builtin_functions.cpp b/src/builtin_functions.cpp index 23cf62ea2..813f4ed4c 100644 --- a/src/builtin_functions.cpp +++ b/src/builtin_functions.cpp @@ -286,8 +286,7 @@ maybe_t builtin_functions(parser_t &parser, io_streams_t &streams, wchar_t wcstring new_func; if (argc - optind != 2) { - streams.err.append_format(_(L"%ls: Expected exactly two names (current function name, " - L"and new function name)\n"), + streams.err.append_format(_(L"%ls: Expected exactly two names (current function name, and new function name)\n"), cmd); builtin_print_error_trailer(parser, streams.err, cmd); return STATUS_INVALID_ARGS; diff --git a/src/parse_constants.h b/src/parse_constants.h index b8a03989f..a1e41a383 100644 --- a/src/parse_constants.h +++ b/src/parse_constants.h @@ -208,8 +208,7 @@ enum class pipeline_position_t { /// Error message on reaching maximum call stack depth. #define CALL_STACK_LIMIT_EXCEEDED_ERR_MSG \ - _(L"The function call stack limit has been exceeded. Do you have an accidental infinite " \ - L"loop?") + _(L"The function call stack limit has been exceeded. Do you have an accidental infinite loop?") /// Error message when encountering an illegal command name. #define ILLEGAL_CMD_ERR_MSG _(L"Illegal command name '%ls'") diff --git a/src/reader.cpp b/src/reader.cpp index a3d476f59..74054d1d6 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -2072,8 +2072,7 @@ static void acquire_tty_or_exit(pid_t shell_pgid) { if (check_for_orphaned_process(loop_count, shell_pgid)) { // We're orphaned, so we just die. Another sad statistic. const wchar_t *fmt = - _(L"I appear to be an orphaned process, so I am quitting politely. " - L"My pid is %d."); + _(L"I appear to be an orphaned process, so I am quitting politely. My pid is %d."); FLOGF(warning, fmt, static_cast(getpid())); exit_without_destructors(1); }