On 06/08/2025 02:59, Collin Funk wrote:
Collin Funk <collin.fu...@gmail.com> writes:
Bernhard Voelker <m...@bernhard-voelker.de> writes:
Do we need/want more patterns, e.g. for translated strings?
$ GIT_PAGER= git grep -E '_\("[^"]*std(in|out|err)' -- '*/*.c'
src/du.c: error (0, 0, _("when reading file names from stdin, "
src/nohup.c: ? N_("ignoring input and redirecting stderr to
stdout")
src/nohup.c: : N_("redirecting stderr to stdout")));
src/sort.c: error (SORT_FAILURE, 0, _("when reading file names
from stdin, "
src/split.c: error (0, 0, _("--filter does not process a chunk extracted to
stdout"));
src/stdbuf.c: error (0, 0, _("line buffering stdin is
meaningless"));
src/wc.c: error (0, 0, _("when reading file names from stdin, "
I think that it would be strange not to change these as well.
I'll write a patch later. Good catch.
Your regex won't catch the following example:
error (0, 0, _("very long line printed"
"to stderr"));
But it seems good enough. And maybe it will be useful if we ever want it
printed to messages. That is similar to what is done to allow
false-positives for sc_error_quotes.
I'll hold off pushing the attached patch in case anyone disagrees. Or
wants to practice perl regex to catch them across multiple lines. :)
Looks perfect.
thanks everyone,
Padraig