]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Perl: Improve heuristic for format strings.
authorBruno Haible <bruno@clisp.org>
Sun, 1 Jun 2025 23:16:11 +0000 (01:16 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 2 Jun 2025 00:22:47 +0000 (02:22 +0200)
commit64784c018a65ee59828c7ef648e7186750bcbe42
tree50a007e63ba65ffbc9425b56b97ffbdba8c4e0ba
parent93da58d7a92258e99af67e29232df48cacfd01fd
xgettext: Perl: Improve heuristic for format strings.

* gettext-tools/src/format-perl.c (struct spec): Add field
'likely_intentional_directives'.
(format_parse): Set it to the number of directives that don't contain a space.
(format_is_unlikely_intentional): New function.
(formatstring_perl): Use it.
* gettext-tools/tests/format-perl-3: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
gettext-tools/src/format-perl.c
gettext-tools/tests/Makefile.am
gettext-tools/tests/format-perl-3 [new file with mode: 0755]