[PyQt] Can't load UI files under Turkish locale
Phil Thompson
phil at riverbankcomputing.co.uk
Fri Aug 10 08:42:49 BST 2007
On Friday 10 August 2007 1:21 am, Ismail Dönmez wrote:
> Ping?
I'm waiting for your reply to Giovanni's question.
Phil
> On Thursday 02 August 2007 14:08:57 Ismail Dönmez wrote:
> > Hi all,
> >
> > uic/properties.py line 220 says :
> >
> > getattr(widget, "set%s%s" % (propname[0].upper(), propname[1:]))(
> >
> > The propname[0].upper() part is problematic for Turkish locale, because
> > uppercase of "i" is not "I" in Turkish locale but its i-with-a-dot-above
> > (İ) .
> >
> > So trying to load a UI file results in an error :
> >
> > File "/usr/lib/python2.4/site-packages/PyQt4/uic/properties.py", line
> > 220, in setProperties
> > getattr(widget, "set%s%s" % (propname[0].upper(), propname[1:]))(
> > AttributeError: seticon
> >
> > Notice the method name is seticon and not setIcon. Somehow ascii only
> > upper should be done, something like :
> >
> > import ascii
> >
> > def ascii_upper(s):
> > trans_table = string.maketrans(string.ascii_lowercase,
> > string.ascii_uppercase)
> > return s.translate(trans_table)
> >
> > What do you think?
> >
> > Regards,
> > ismail
More information about the PyQt
mailing list