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.
This commit is contained in:
Érico Rolim 2020-11-13 02:35:11 -03:00 committed by Fabian Homborg
parent 036ed36887
commit 21041e3cc7
4 changed files with 4 additions and 8 deletions

View file

@ -79,8 +79,7 @@ maybe_t<int> 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); streams.err.append_format(_(L"%ls: No suitable job: %d\n"), cmd, pid);
job = nullptr; job = nullptr;
} else if (!job->wants_job_control()) { } else if (!job->wants_job_control()) {
streams.err.append_format(_(L"%ls: Can't put job %d, '%ls' to foreground because " streams.err.append_format(_(L"%ls: Can't put job %d, '%ls' to foreground because it is not under job control\n"),
L"it is not under job control\n"),
cmd, pid, job->command_wcstr()); cmd, pid, job->command_wcstr());
job = nullptr; job = nullptr;
} }

View file

@ -286,8 +286,7 @@ maybe_t<int> builtin_functions(parser_t &parser, io_streams_t &streams, wchar_t
wcstring new_func; wcstring new_func;
if (argc - optind != 2) { if (argc - optind != 2) {
streams.err.append_format(_(L"%ls: Expected exactly two names (current function name, " streams.err.append_format(_(L"%ls: Expected exactly two names (current function name, and new function name)\n"),
L"and new function name)\n"),
cmd); cmd);
builtin_print_error_trailer(parser, streams.err, cmd); builtin_print_error_trailer(parser, streams.err, cmd);
return STATUS_INVALID_ARGS; return STATUS_INVALID_ARGS;

View file

@ -208,8 +208,7 @@ enum class pipeline_position_t {
/// Error message on reaching maximum call stack depth. /// Error message on reaching maximum call stack depth.
#define CALL_STACK_LIMIT_EXCEEDED_ERR_MSG \ #define CALL_STACK_LIMIT_EXCEEDED_ERR_MSG \
_(L"The function call stack limit has been exceeded. Do you have an accidental infinite " \ _(L"The function call stack limit has been exceeded. Do you have an accidental infinite loop?")
L"loop?")
/// Error message when encountering an illegal command name. /// Error message when encountering an illegal command name.
#define ILLEGAL_CMD_ERR_MSG _(L"Illegal command name '%ls'") #define ILLEGAL_CMD_ERR_MSG _(L"Illegal command name '%ls'")

View file

@ -2072,8 +2072,7 @@ static void acquire_tty_or_exit(pid_t shell_pgid) {
if (check_for_orphaned_process(loop_count, shell_pgid)) { if (check_for_orphaned_process(loop_count, shell_pgid)) {
// We're orphaned, so we just die. Another sad statistic. // We're orphaned, so we just die. Another sad statistic.
const wchar_t *fmt = const wchar_t *fmt =
_(L"I appear to be an orphaned process, so I am quitting politely. " _(L"I appear to be an orphaned process, so I am quitting politely. My pid is %d.");
L"My pid is %d.");
FLOGF(warning, fmt, static_cast<int>(getpid())); FLOGF(warning, fmt, static_cast<int>(getpid()));
exit_without_destructors(1); exit_without_destructors(1);
} }