Wish: poabc should check c-format

Bug #907345 reported by Byrial Jensen
6
This bug affects 1 person
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"

Revision history for this message
Ask Hjorth Larsen (askhl) wrote :

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?

Revision history for this message
Byrial Jensen (byrial-t) wrote : Re: [Bug 907345] Re: Wish: poabc should check c-format

Den 22-12-2011 01:05, Ask Hjorth Larsen skrev:
> Logically this should be extended to string substitutions in all
> programming languages.

Yes.

 > Perhaps poabc should simply invoke msgfmt to
> obtain this. This would be pretty easy to implement. Any comments?

Good idea.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.