Opened 8 years ago

Closed 6 years ago

Last modified 5 years ago

#8536 closed (fixed)

Some fixes for the makemessages management command

Reported by: Ramiro Morales Owned by: Ramiro Morales
Component: Internationalization Version: master
Severity: Keywords: makemessages pot templatize
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by Ramiro Morales)

The command doesn't correctly clean up after itself if an error condition is found when forking external GNU gettext utilities (xgettext, msgmerge, msgfmt), potentially leaving spurious temporary files (.pot, .js.py, .html.py) in the tree.

Also, some optimizations were made.

Attachments (2)

t8536-r8534.diff (4.1 KB) - added by Ramiro Morales 8 years ago.
Patch, applies to trunk as of r8534
8536-r9833.diff (4.5 KB) - added by Ramiro Morales 8 years ago.
Updated patch

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by Ramiro Morales

Attachment: t8536-r8534.diff added

Patch, applies to trunk as of r8534

comment:1 Changed 8 years ago by Ramiro Morales

Description: modified (diff)
Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 8 years ago by Jannis Leidel

As far as I know it's not encouraged to combine patches for different tickets

comment:3 Changed 8 years ago by Malcolm Tredinnick

Triage Stage: UnreviewedAccepted

I've deleted the patch that combines the two tickets so that it doesn't distract us. #7084 is a genuine bug fix. This ticket is about a clean up that, whilst useful to have, isn't critical. Leaving a couple of in-progress files around in the odd failure case is survivable. So we'll apply this, but it's lower priority than the other one.

comment:4 in reply to:  3 Changed 8 years ago by Ramiro Morales

Replying to mtredinnick:

I've deleted the patch that combines the two tickets so that it doesn't distract us.

Sorry, I was in a rush to leave for work and posted that extra 'noisy' patch without too much thought. Because the same reason, the patch isn't what I meant to post: it is a cumulative one and I wanted to add an interdiff.

I agree this is low priority, just wanted to have it noted in a place more robust than my Hg repos so I don't forget this issue.

Changed 8 years ago by Ramiro Morales

Attachment: 8536-r9833.diff added

Updated patch

comment:5 Changed 8 years ago by Ramiro Morales

Owner: changed from nobody to Ramiro Morales

comment:6 Changed 6 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

In [15506]:

Fixed #8536 -- Made sure the makemessages management command cleans up after throwing an error. Thanks to Ramiro for the initial patch.

comment:7 Changed 5 years ago by Julien Phalip

In [17240]:

Ensured that makemessages doesn't leave any temporary file over if the parsing of a template file fails. Refs #8536.

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