[PyKDE] QTranslator not working at all?
Andreas Pakulat
apaku at gmx.de
Thu Jun 29 10:04:49 BST 2006
Hi,
I've got a small problem here with QTranslator: It doesn't work.
I attached the .ts and .qm files for reference, with those the following
code snippet returns an empty string:
>>> from PyQt4 import QtCore
>>> app=QtCore.QCoreApplication()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: insufficient number of arguments to QCoreApplication()
>>> import sys
>>> import os
>>> app=QtCore.QCoreApplication(sys.argv)
>>> qtrans = QtCore.QTranslator()
>>> qtrans.load("xpathevaluator_de", os.getcwd() )
True
>>> qtrans.translate('BasicModel','Node')
<PyQt4.QtCore.QString object at 0xb7c7f4ec>
>>> print "'%s'" %qtrans.translate('BasicModel','Node')
''
Anybody got ideas? However the i18n example works perfectly..
Andreas
--
It's a very *__UN*lucky week in which to be took dead.
-- Churchy La Femme
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xpathevaluator_de.ts
Type: text/texmacs
Size: 1849 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20060629/86a8a9fa/xpathevaluator_de.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xpathevaluator_de.qm
Type: application/octet-stream
Size: 327 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20060629/86a8a9fa/xpathevaluator_de.obj
More information about the PyQt
mailing list