]> git.ipfire.org Git - thirdparty/gettext.git/commit
libgettextpo: Add API for the workflow flags and the sticky flags.
authorBruno Haible <bruno@clisp.org>
Tue, 30 Sep 2025 13:35:06 +0000 (15:35 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 30 Sep 2025 13:35:06 +0000 (15:35 +0200)
commit1dba8793ec5714d6c8f10723a2172c99934219ea
treeda51ac35e50bb270cae65a4ad401a4a4b8ab1a71
parentf5fd381b40b8e5a0f93d6c69edb63a09f08b35d2
libgettextpo: Add API for the workflow flags and the sticky flags.

Reported by Alexander Potashev <aspotashev@gmail.com>
at <https://savannah.gnu.org/bugs/?67470>.

* gettext-tools/src/message.h (format_flag, not_format_p): New declarations.
* gettext-tools/src/message.c (format_flag): New variable.
(not_format_p): New function.
* gettext-tools/src/write-po.c (make_format_description_string): Add comments.
(significant_format_p): Likewise.
* gettext-tools/libgettextpo/gettext-po.in.h (po_flag_iterator_t): New type.
(po_message_has_workflow_flag, po_message_set_workflow_flag,
po_message_workflow_flags_iterator): New declarations.
(po_message_has_sticky_flag, po_message_set_sticky_flag,
po_message_sticky_flags_iterator): New declarations.
(po_flag_iterator_free, po_flag_next): New declarations.
* gettext-tools/libgettextpo/gettext-po.c (struct po_flag_iterator): New type.
(po_message_has_workflow_flag, po_message_set_workflow_flag,
po_message_workflow_flags_iterator): New functions.
(po_message_get_format): Simplify by using not_format_p.
(po_message_has_sticky_flag, po_message_set_sticky_flag,
po_message_sticky_flags_iterator): New functions.
(po_flag_iterator_free, po_flag_next): New functions.
* gettext-tools/tests/gettextpo-1-prg.c (main): Add more test cases.
* gettext-tools/doc/gettext.texi (po_message_t API): Document the new functions.
(po_flag_iterator_t API): New subsection.
* NEWS: Mention the new functions.
NEWS
gettext-tools/doc/gettext.texi
gettext-tools/libgettextpo/gettext-po.c
gettext-tools/libgettextpo/gettext-po.in.h
gettext-tools/src/message.c
gettext-tools/src/message.h
gettext-tools/src/write-po.c
gettext-tools/tests/gettextpo-1-prg.c