Fix messageboxes

This commit is contained in:
DeepSOIC 2015-10-19 12:49:39 +03:00
parent ce56578c61
commit b078b39779
5 changed files with 12 additions and 12 deletions

View File

@ -231,8 +231,8 @@ class _CommandCompoundFilter:
else:
mb = QtGui.QMessageBox()
mb.setIcon(mb.Icon.Warning)
mb.setText(_translate("Lattice_CompoundFilter", "Select a shape that is a compound, first! Second selected item (optional) will be treated as a stencil.", None))
mb.setWindowTitle(_translate("Lattice_CompoundFilter","Bad selection", None))
mb.setText(translate("Lattice_CompoundFilter", "Select a shape that is a compound, first! Second selected item (optional) will be treated as a stencil.", None))
mb.setWindowTitle(translate("Lattice_CompoundFilter","Bad selection", None))
mb.exec_()
def IsActive(self):
@ -276,8 +276,8 @@ class _CommandExplode:
else:
mb = QtGui.QMessageBox()
mb.setIcon(mb.Icon.Warning)
mb.setText(_translate("Lattice_CompoundFilter", "Select a shape that is a compound, first!", None))
mb.setWindowTitle(_translate("Lattice_CompoundFilter","Bad selection", None))
mb.setText(translate("Lattice_CompoundFilter", "Select a shape that is a compound, first!", None))
mb.setWindowTitle(translate("Lattice_CompoundFilter","Bad selection", None))
mb.exec_()
def IsActive(self):

View File

@ -130,8 +130,8 @@ class _CommandFuseCompound:
else:
mb = QtGui.QMessageBox()
mb.setIcon(mb.Icon.Warning)
mb.setText(_translate("Lattice_FuseCompound", "Select a shape that is a compound whose children intersect, first!", None))
mb.setWindowTitle(_translate("Lattice_FuseCompound","Bad selection", None))
mb.setText(translate("Lattice_FuseCompound", "Select a shape that is a compound whose children intersect, first!", None))
mb.setWindowTitle(translate("Lattice_FuseCompound","Bad selection", None))
mb.exec_()
def IsActive(self):

View File

@ -206,8 +206,8 @@ class _CommandBoundBox:
else:
mb = QtGui.QMessageBox()
mb.setIcon(mb.Icon.Warning)
mb.setText(_translate("Lattice_BoundBox", "Select a shape to make a bounding box for, first!", None))
mb.setWindowTitle(_translate("Lattice_BoundBox","Bad selection", None))
mb.setText(translate("Lattice_BoundBox", "Select a shape to make a bounding box for, first!", None))
mb.setWindowTitle(translate("Lattice_BoundBox","Bad selection", None))
mb.exec_()
def IsActive(self):

View File

@ -36,10 +36,10 @@ except AttributeError:
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
def translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
def translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
#--------------------------/translation-related code ----------------------------------------

View File

@ -170,8 +170,8 @@ class _CommandLatticeDowngrade:
else:
mb = QtGui.QMessageBox()
mb.setIcon(mb.Icon.Warning)
mb.setText(_translate("Lattice_Downgrade", "Select a shape to downgrade, first!", None))
mb.setWindowTitle(_translate("Lattice_Downgrade","Bad selection", None))
mb.setText(translate("Lattice_Downgrade", "Select a shape to downgrade, first!", None))
mb.setWindowTitle(translate("Lattice_Downgrade","Bad selection", None))
mb.exec_()
def IsActive(self):