[Python-ideas] Make gettext support direct PO files input

Masklinn masklinn at masklinn.net
Mon May 27 21:01:08 CEST 2013


On 2013-05-27, at 20:11 , Antoine Pitrou wrote:
> On Mon, 27 May 2013 15:53:34 +0200
> Masklinn <masklinn at masklinn.net> wrote:
>> * The standard Python distribution provides an msgfmt tool able to
>>  compile PO files to MO files.
>> * The gettext module only looks for MO files.
>> 
>> This leads to 2 questions:
>> * Why isn't the msgfmt behavior available programmatically from the stdlib
>>  even though all the pieces seem present? (as far as I can see,
>>  everything is implemented in msgfmt directly)
> 
> Because noone did the job yet, I guess. Any stdlib addition to make
> gettext more usable would probably be welcome :-)
> 
>> * Why can't gettext use PO files directly, but requires separately
>>  generating MO files?
> 
> I don't know, perhaps it's supposed to make loading times smaller.
> gettext is an old tool, some of its design decisions may not make sense
> nowadays (perhaps they didn't make sense at the time, either).

So assuming somebody'd be interested in trying to fix these, what would
be the best route, opening an issue on the tracker and providing some
sort of proof of concept?


More information about the Python-ideas mailing list