19 from python_qt_binding
import QtGui
20 from python_qt_binding
import QtCore
28 QtCore.QObject.__init__(self)
30 def __call__(self, texte, context='MainWindow', disambig=None, n=-1):
31 return QtGui.QApplication.translate(context, texte, disambig,
32 QtGui.QApplication.CodecForTr, n)
38 translate = QtCore.Signal()
42 QtCore.QObject.__init__(self)
46 def load(self, lng_name, qm_file):
49 self.translator.load(qm_file)
52 return text[0].upper()+text[1:]
61 trad = self.translator.translate(context, text, disambig,
62 QtGui.QApplication.UnicodeUTF8)
64 if trad ==
'' or trad ==
'##########' or trad
is None:
65 rospy.logwarn(
'No translation "en to %s" available for "%s"!'