Previous: , Up: Writing your own programs that process PO files   [Contents][Index]


9.13.8 Checking API

Function: void po_file_check_all (po_file_t file, po_xerror_handler_t handler)

Tests whether the entire file is valid, like msgfmt does it. If it is invalid, passes the reasons to handler.

Function: void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler)

Tests message, to be inserted at iterator in a PO file in memory, like msgfmt does it. If it is invalid, passes the reasons to handler. iterator is not modified by this call; it only specifies the file and the domain.

Function: void po_message_check_format (po_message_t message, po_xerror_handler_t handler)

Tests whether the message translation from message is a valid format string if the message is marked as being a format string. If it is invalid, passes the reasons to handler.

This function is exported as ‘po_message_check_format_v2’ at ABI level, but is defined as po_message_check_format in C code after the inclusion of ‘<gettext-po.h>’.