Opened 11 years ago
Last modified 3 years ago
#22617 closed Cleanup/optimization
Allow to fix translation -> Fix makemessages to not delete debug data and hide errors (and all similar modules using "msgmerge") — at Initial Version
Description ¶
Please replace code in make messages to not delete *.po files if error occured and show messages (fix exception later).
Replace this code:
if errors:
if status != STATUS_OK:
raise CommandError(
"errors happened while running msgmerge\n%s" % errors)
elif self.verbosity > 0:
self.stdout.write(errors)
With this code (it shows error root cause and save/copy *.po need to solve this error):
if errors:
if status != STATUS_OK:
self.stdout.write(errors) # bug exception bellow not shows errors
import shutil
shutil.copyfile(pofile, '%s.debug' % pofile)
raise CommandError(
"errors happened while running msgmerge\n%s" % errors)
elif self.verbosity > 0:
self.stdout.write(errors)
All modules using command line tools should report errors and not delete input if error occured.