When using printf-like format strings in a translated text msgfmt --check checks that the translation still contains the placeholders. For example, running xgettext on the following code
printf( gettext( "string: %s, int: %d" ), str, i )
produces a .po file with a msgid flagged as c-format and whose value is "string: %s, int: %d". If the translator forgets either %s or %d in the translation then msgfmt complains:
number of format specifications in 'msgid' and 'msgstr' does not match
Unfortunately this check does not apply to format strings using positional notation, like
boost::format( gettext( "string: %1%, int %2%" ) ) % str % i
How can I validate the presence of the positional notation placeholders in my translations?
 
    