Opened 6 years ago

Closed 3 years ago

Last modified 2 years ago

#8536 closed (fixed)

Some fixes for the makemessages management command

Reported by: ramiro Owned by: ramiro
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)

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,, in the tree.

Also, some optimizations were made.

Attachments (2)

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

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by ramiro

Patch, applies to trunk as of r8534

comment:1 Changed 6 years ago by ramiro

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

comment:2 Changed 6 years ago by jezdez

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

comment:3 follow-up: Changed 6 years ago by mtredinnick

  • Triage Stage changed from Unreviewed to Accepted

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 6 years ago by ramiro

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 5 years ago by ramiro

Updated patch

comment:5 Changed 5 years ago by ramiro

  • Owner changed from nobody to ramiro

comment:6 Changed 3 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

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 2 years ago by julien

In [17240]:

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

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.