[PyQt] Issues with PyKDE4 and i18n API
Chusslove Illich
caslav.ilic at gmx.net
Sun Apr 20 22:13:24 BST 2008
> [: Chusslove Illich :]
> [...] but one could provide same i18n* calls in pure Python: [...]
It cannot work exactly as I've put it before, as ki18n* calls are also by
suffixes. The (hopefully) corrected version:
def i18n_helper (ki18nx, base_args, subs_args):
kstr = ki18nx(*base_args)
for arg in subs_args:
kstr = kstr.subs(arg)
return kstr.toString()
def i18n (*args):
return i18n_helper(ki18n, args[:1], args[1:])
def i18nc (*args):
return i18n_helper(ki18nc, args[:2], args[2:])
def i18np (*args):
return i18n_helper(ki18np, args[:2], args[2:])
def i18ncp (*args):
return i18n_helper(ki18ncp, args[:3], args[3:])
--
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080420/c4cf1165/attachment.bin
More information about the PyQt
mailing list