]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Perl: Report warnings instead of fatal errors.
authorBruno Haible <bruno@clisp.org>
Thu, 19 Sep 2024 10:34:02 +0000 (12:34 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 19 Sep 2024 10:34:02 +0000 (12:34 +0200)
commit6120a2cd4a0a8e01168d0e768a035438b0c4ff97
tree9eec5125361d5bf589f6ed9166cc8ee9e8044f79
parent3065c4cfb954cd25bc50168bd642154d42dff7c9
xgettext: Perl: Report warnings instead of fatal errors.

* gettext-tools/doc/lang-perl.texi (Interpolation I, Interpolation II): Say
"unsupported" instead of "invalid". Say "warning" instead of "fatal error".
* gettext-tools/doc/gettext.texi: Update menu.
* gettext-tools/src/x-perl.c (token_type_string_interpol): New enum item.
(token2string): Handle token_type_string_interpol.
(extract_quotelike_pass3): Remove error_level parameter; use IF_SEVERITY_WARNING
instead. Say "unsupported" instead of "invalid". When encountering an
unsupported variable interpolation, change the token's type to
token_type_string_interpol.
(interpolate_keywords): After calling extract_quotelike_pass3, test the token's
type.
(prefer_regexp_over_division): Handle token_type_string_interpol.
(collect_message): Remove error_level parameter; use IF_SEVERITY_WARNING
instead. After calling extract_quotelike_pass3, test the token's type. Possibly
return NULL.
(extract_balanced): Handle token_type_string_interpol. Test the return value of
collect_message.
* NEWS: Mention the change.
NEWS
gettext-tools/doc/gettext.texi
gettext-tools/doc/lang-perl.texi
gettext-tools/src/x-perl.c