コード例 #1
0
 def tr(string_to_translate):
     """
     Translate a string using the QCoreApplication translation framework
     @param string_to_translate: a unicode string
     @return: the translated unicode string if it was possible to translate
     """
     return text_type(QtCore.QCoreApplication.translate('MyPostProConfig', string_to_translate))
コード例 #2
0
ファイル: messagebox.py プロジェクト: bsrnesraa/dxf2gcode-prj
 def tr(self, string_to_translate):
     """
     Translate a string using the QCoreApplication translation framework
     @param: string_to_translate: a unicode string
     @return: the translated unicode string if it was possible to translate
     """
     return text_type(QtCore.QCoreApplication.translate('MessageBox',
                                                        string_to_translate))