On Wed, Feb 17, 2010 at 8:10 PM, Glynn Clements <[email protected]> wrote: > Markus Neteler wrote: >> >> some messages (see below/screenshot) are not shown in translation. ... >> Looking around I found other .py files lacking the gettext stuff. >> What's the right way to do it? Add everywhere or is there a better way? >> Or can it be inherited from globalvar.py or another file? > > For any process, the __main__ module (the one which is executed rather > than "import"ed) should call gettext.install. This inserts the "_" > function into the global namespace. > > The call in wxgui.py should be sufficient for the GUI itself, but > menuform.py also requires it for the case where it is executed from > G_gui(). > > IOW, any module which uses: > > if __name__ == '__main__': > .... > > (other than for debug/test/demonstration purposes) should call > gettext.install within that section of code (calling it from the top > level is suboptimal, but probably harmless).
So, I would add it after __main__ in: svn status gui/wxpython/ M gui/wxpython/gui_modules/location_wizard.py M gui/wxpython/gui_modules/mcalc_builder.py M gui/wxpython/gui_modules/render.py ? This would also activate preferences.py? I am not on my development machine, so I cannot test. Markus _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
