[PyQt] Can't load UI files under Turkish locale
Phil Thompson
phil at riverbankcomputing.co.uk
Sat Aug 11 19:16:15 BST 2007
On Thursday 02 August 2007 12:08 pm, 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?
Added to tonight's snapshot.
Thanks,
Phil
More information about the PyQt
mailing list