Edgewall Software
Modify

Ticket #91 (assigned enhancement)

Opened 4 years ago

Last modified 11 months ago

pybabel extract should support specifying modules

Reported by: anonymous Owned by: jruigrok
Priority: minor Milestone: 1.0
Component: Message Extraction Version: devel
Keywords: patch Cc:

Description

The pybabel extract command currently only supports directories, which doesn't allow you to extract strings from specific modules.

There's extract_from_file in messages.extract, so it seems like it would just be a matter of adding support in the front-end for it.

Attachments

extract_file.patch (4.4 KB) - added by dackze+babel@… 4 years ago.
Patch that implements module support
extract_file.2.patch (4.4 KB) - added by dackze+babel@… 4 years ago.
Patch that implements module support (and logs each extraction)

Change History

Changed 4 years ago by dackze+babel@…

Patch that implements module support

comment:1 Changed 4 years ago by dackze+babel@…

I've attached a patch that implements what I've suggested. The indentation starts to get pretty hair with the extra if/else block, but it all works fine.

Changed 4 years ago by dackze+babel@…

Patch that implements module support (and logs each extraction)

comment:2 Changed 2 years ago by jruigrok

  • Owner changed from cmlenz to jruigrok
  • Status changed from new to assigned
  • Milestone set to 1.0

comment:3 Changed 11 months ago by fschwarz

  • Keywords patch added

Thanks a lot for your patch. I'll try to get this in for 1.0

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as assigned
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from jruigrok. Next status will be 'new'
Author


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

 
Note: See TracTickets for help on using tickets.