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

Antoine Pitrou solipsis at pitrou.net
Mon May 27 20:11:09 CEST 2013


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).

Regards

Antoine.




More information about the Python-ideas mailing list