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

Antoine Pitrou solipsis at pitrou.net
Mon May 27 21:31:52 CEST 2013


On Mon, 27 May 2013 21:01:08 +0200
Masklinn <masklinn at masklinn.net> wrote:
> 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?

I think that would be a good start. Note that I'm not a gettext expert,
and I could be totally talking nonsense here.

Regards

Antoine.






More information about the Python-ideas mailing list