Translation cleanup PathUtils/PathUtil
This commit is contained in:
@@ -30,15 +30,17 @@ So if you add to this file and think about importing anything from PathScripts
|
|||||||
other than PathLog, then it probably doesn't belong here.
|
other than PathLog, then it probably doesn't belong here.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import FreeCAD
|
||||||
import six
|
import six
|
||||||
import PathScripts.PathLog as PathLog
|
import PathScripts.PathLog as PathLog
|
||||||
import PySide
|
|
||||||
|
|
||||||
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
translate = FreeCAD.Qt.translate
|
||||||
|
|
||||||
|
if False:
|
||||||
def translate(context, text, disambig=None):
|
PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule())
|
||||||
return PySide.QtCore.QCoreApplication.translate(context, text, disambig)
|
PathLog.trackModule(PathLog.thisModule())
|
||||||
|
else:
|
||||||
|
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||||
|
|
||||||
|
|
||||||
def _getProperty(obj, prop):
|
def _getProperty(obj, prop):
|
||||||
|
|||||||
@@ -41,12 +41,14 @@ DraftGeomUtils = LazyLoader("DraftGeomUtils", globals(), "DraftGeomUtils")
|
|||||||
Part = LazyLoader("Part", globals(), "Part")
|
Part = LazyLoader("Part", globals(), "Part")
|
||||||
TechDraw = LazyLoader("TechDraw", globals(), "TechDraw")
|
TechDraw = LazyLoader("TechDraw", globals(), "TechDraw")
|
||||||
|
|
||||||
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
translate = FreeCAD.Qt.translate
|
||||||
# PathLog.trackModule(PathLog.thisModule())
|
|
||||||
|
|
||||||
|
|
||||||
def translate(context, text, disambig=None):
|
if False:
|
||||||
return QtCore.QCoreApplication.translate(context, text, disambig)
|
PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule())
|
||||||
|
PathLog.trackModule(PathLog.thisModule())
|
||||||
|
else:
|
||||||
|
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||||
|
|
||||||
|
|
||||||
UserInput = None
|
UserInput = None
|
||||||
@@ -179,7 +181,7 @@ def isDrillable(obj, candidate, tooldiameter=None, includePartials=False):
|
|||||||
PathLog.debug("candidate is drillable: {}".format(drillable))
|
PathLog.debug("candidate is drillable: {}".format(drillable))
|
||||||
except Exception as ex: # pylint: disable=broad-except
|
except Exception as ex: # pylint: disable=broad-except
|
||||||
PathLog.warning(
|
PathLog.warning(
|
||||||
translate("PathUtils", "Issue determine drillability: {}").format(ex)
|
translate("Path", "Issue determine drillability: {}").format(ex)
|
||||||
)
|
)
|
||||||
return drillable
|
return drillable
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user