Wish: poabc should check c-format
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyG3T |
New
|
Undecided
|
Unassigned |
Bug Description
String marked with c-format should be checked to see if the translation have the same format as the original text.
This should give errors:
#: test.c:1
#, c-format
msgid "protocol version %d not supported"
msgstr "protokolversion %s er ikke understøttet"
#: test.c:2
#, c-format
msgid "protocol version %d (%s) not supported"
msgstr "protokolversion %s (%d) er ikke understøttet"
#: test.c:3
#, c-format
msgid "protocol version %d (%s) not supported"
msgstr "protokolversion %2d (%1s) er ikke understøttet"
This should not give errors:
#: test.c:11
#, c-format
msgid "protocol version %d (%s) not supported"
msgstr "protokolversion %2s (%1d) er ikke understøttet"
#: test.c:12
#, no-c-format
msgid "protocol version %d not supported"
msgstr "protokolversion %s er ikke understøttet"
#: test.c:13
#, no-c-format
msgid "protocol version %d (%s) not supported"
msgstr "protokolversion %s (%d) er ikke understøttet"
Logically this should be extended to string substitutions in all programming languages. Perhaps poabc should simply invoke msgfmt to obtain this. This would be pretty easy to implement. Any comments?