Hi,

when using other names for the self idiom referring to the current 
instance (like "inst" for example - see [1]), the application is not 
correctly translated.

If I open the generated ts file in Qt Linguist it shows two "contexts" 
("MainWindow" and "inst") instead of just one ("MainWindow) when using 
"self".

The translation for the text in the script ("inst.tr('Ready')" for 
example) shows still English - while the ones from the resource file 
work.

Is that a problem with pyuic or with pylupdate4?


Thorsten

[1]
from PyQt4 import QtGui, QtCore
import resource.ui

class MainWindow(QtGui.QMainWindow, resource.ui.Ui_MainWindow):
    def __init__(inst):
        QtGui.QMainWindow.__init__(inst)
        inst.setupUi(inst)
        inst.statusBar().showMessage(inst.tr('Ready'))

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to