diff --git a/src/Mod/Part/BOPTools/JoinFeatures.py b/src/Mod/Part/BOPTools/JoinFeatures.py index 05960b2fc..91b41fbb5 100644 --- a/src/Mod/Part/BOPTools/JoinFeatures.py +++ b/src/Mod/Part/BOPTools/JoinFeatures.py @@ -33,26 +33,29 @@ import Part if FreeCAD.GuiUp: import FreeCADGui from PySide import QtCore, QtGui - - -# -------------------------- common stuff -------------------------------------------------- - -#-------------------------- translation-related code ---------------------------------------- -#Thanks, yorik! (see forum thread "A new Part tool is being born... JoinFeatures!" -#http://forum.freecadweb.org/viewtopic.php?f=22&t=11112&start=30#p90239 ) -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except Exception: - def _fromUtf8(s): - return s -try: - _encoding = QtGui.QApplication.UnicodeUTF8 + # -------------------------- common stuff -------------------------------------------------- + + #-------------------------- translation-related code ---------------------------------------- + #Thanks, yorik! (see forum thread "A new Part tool is being born... JoinFeatures!" + #http://forum.freecadweb.org/viewtopic.php?f=22&t=11112&start=30#p90239 ) + + try: + _fromUtf8 = QtCore.QString.fromUtf8 + 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) +else: 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) -#--------------------------/translation-related code ---------------------------------------- + return text + #--------------------------/translation-related code ---------------------------------------- + def getParamRefine(): return FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Part/Boolean").GetBool("RefineModel")