[PythonCAD] Start of Native Language Support in PythonCAD

Art Haas ahaas at airmail.net
Mon Jun 5 23:26:59 CEST 2006

On Sat, Jun 03, 2006 at 03:58:33PM -0500, Art Haas wrote:
> Hi.
> A goal for the next release is to make PythonCAD work using translations
> to a user's native language. Achieving this goal requires the use of
> the 'gettext' module in Python, then enclosing the translatable strings
> in the program within the special _() function. I've started making
> these changes today, and the first bits of code are at the repo. The
> 'gtkpycad.py' file imports the gettext module, and I've gone through
> the files under the PythonCAD/Interface/Gtk directory and changed all
> the setPrompt() calls as needed. There are still many more strings that
> must be enclosed within _(), so numerous more changes still need to
> be made. The various menus and window titles need changing still, for
> example. I'll be tackling them in the coming days. The current changes
> are available at the repo; get them with 'svn update'.

Following up on the post above, I've added the magic _() function
in many more calls in the interface code, so the menu items, dialog
boxes, and other GTK interface pieces can be translated as well. I've
not tried to adjust any of the message raised during exceptions, and
I suspect that eventually they'll be translated as well, but it would be
nice to get the first efforts for translation to concentrate on the
normal interface components.

Art Haas
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822

More information about the PythonCAD mailing list