[Panel-devel] getThemePath broken in SK

Petri Damsten petri.damsten at iki.fi
Tue Jun 7 08:39:16 CEST 2005


> Is it possible to embed i18n() calls into our text functions such as
> createText()? That way translations are handled inside SuperKaramba instead
> of by the theme writers.

.theme file translation should be handled automatically in superkaramba. 
Python is a different story. e.g. following line doesn't work if it's 
translated in superkaramba.
karamba.changeText(widget, txt, '%d Apples' % 2)

I would use existing python functions for this. Here is example of a theme 
that translates texts to Finnish. Translations are included in skz file.
http://susku.pyhaselka.fi/damu/sk/i18n.skz

So the code looks like:
karamba.changeText(widget, txt, _('%d Apples') % 2)

Benefits:
- This is the way people have used to do translations in python.
- Existing tested GNU gettext / python implementation.
- Translations can be made with existing tools like xgettext, KBabel.

TODO:
- karamba_helpers.py module that gets installed to python path and includes 
functions to initialize translation, dcop, etc... (Not a necessity)
- translation of .theme texts

For python only themes this already works and for .theme files modifications 
to superkaramba are small and could be implemented (by me) pretty quickly. 
Could this be the preferred way to do i18n in superkaramba themes?

Petri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20050607/45560ed5/attachment.pgp


More information about the Panel-devel mailing list