Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#748 closed defect (fixed)

[patch] make make-messages.py a bit more careful with errors in gettext tools

Reported by: hugo Owned by: Adrian Holovaty
Component: Tools Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Attachments (1)

make-messages.diff (2.0 KB ) - added by hugo 19 years ago.
patch for better error handling in make-messages.py

Download all attachments as: .zip

Change History (2)

by hugo, 19 years ago

Attachment: make-messages.diff added

patch for better error handling in make-messages.py

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

(In [1120]) Fixed #748 -- Improved error handling in make-messages.py. It no longer clobbers files on error. Thanks, Hugo

Note: See TracTickets for help on using tickets.
Back to Top