[patch] make make-messages.py a bit more careful with errors in gettext tools
|Reported by:||hugo||Owned by:||adrian|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The current version of make-messages.py has a rather dumb error handling: if you run make-messages.py on a .po file with errors (for example duplicate IDs or syntax errors), it will throw out the error (usually in the msgmerge step) and leave you with an empty .po file - rather nasty if you just added a load of new translations. The attached patch uses os.popen3 instead of os.popen and watches stderr of the gettext utilities for output. if there is some output, it will write that to stdout and just end the make-messages.py run without overwriting the .po file.