Part: Change _translate to translate

This commit is contained in:
Chris Hennes
2022-05-31 10:05:44 -05:00
parent b8952aaeb8
commit 33556d8a56
5 changed files with 91 additions and 135 deletions

View File

@@ -39,13 +39,7 @@ if FreeCAD.GuiUp:
except Exception:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
translate = FreeCAD.Qt.translate
# command class
@@ -65,8 +59,8 @@ class _CommandExplodeCompound:
else:
mb = QtGui.QMessageBox()
mb.setIcon(mb.Icon.Warning)
mb.setText(_translate("Part_ExplodeCompound", "First select a shape that is a compound.", None))
mb.setWindowTitle(_translate("Part_ExplodeCompound", "Bad selection", None))
mb.setText(translate("Part_ExplodeCompound", "First select a shape that is a compound.", None))
mb.setWindowTitle(translate("Part_ExplodeCompound", "Bad selection", None))
mb.exec_()
def IsActive(self):