[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] How does sip.setapi("QString",2) work with translations?
From: "Brett Stottlemyer" <brett () stottlemyer ! com>
Date: 2010-11-27 20:27:13
Message-ID: 000301cb8e71$7a0de250$6e29a6f0$ () com
[Download RAW message or body]
Hi, all-
I'd like to use sip.setapi("QString",2), but I'm using internationalization
as well and it is giving me some trouble.
If I try:
> qApp.translate("test","Internationalize")
I get Unicode "Internationalize" as the result (as expected)
When I try:
> qApp.translate("test","Internationalize %1").arg("42")
I get
AttributeError: 'unicode' object has no attribute 'arg'. I guess this is
expected, too, but I was hoping Phil had done some magic to have it work as
expected.
Is there a way to get this to work using Qt style formatting? Or do I need
to convert everything to python-style, like this:
> qApp.translate("test","Internationalize %d")%42
Thanks,
Brett
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic