Engrave translation cleanup
This commit is contained in:
@@ -27,23 +27,21 @@ import PathScripts.PathLog as PathLog
|
||||
import PathScripts.PathOp as PathOp
|
||||
import PathScripts.PathUtils as PathUtils
|
||||
|
||||
from PySide import QtCore
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
__doc__ = "Class and implementation of Path Engrave operation"
|
||||
|
||||
if False:
|
||||
PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule())
|
||||
PathLog.trackModule(PathLog.thisModule())
|
||||
else:
|
||||
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||
|
||||
# lazily loaded modules
|
||||
from lazy_loader.lazy_loader import LazyLoader
|
||||
|
||||
Part = LazyLoader("Part", globals(), "Part")
|
||||
|
||||
__doc__ = "Class and implementation of Path Engrave operation"
|
||||
|
||||
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||
# PathLog.trackModule(PathLog.thisModule())
|
||||
|
||||
|
||||
# Qt translation handling
|
||||
def translate(context, text, disambig=None):
|
||||
return QtCore.QCoreApplication.translate(context, text, disambig)
|
||||
|
||||
|
||||
class ObjectEngrave(PathEngraveBase.ObjectOp):
|
||||
"""Proxy class for Engrave operation."""
|
||||
@@ -69,8 +67,8 @@ class ObjectEngrave(PathEngraveBase.ObjectOp):
|
||||
"App::PropertyLinkList",
|
||||
"BaseShapes",
|
||||
"Path",
|
||||
QtCore.QT_TRANSLATE_NOOP(
|
||||
"PathEngrave", "Additional base objects to be engraved"
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property", "Additional base objects to be engraved"
|
||||
),
|
||||
)
|
||||
obj.setEditorMode("BaseShapes", 2) # hide
|
||||
@@ -79,8 +77,8 @@ class ObjectEngrave(PathEngraveBase.ObjectOp):
|
||||
"App::PropertyLink",
|
||||
"BaseObject",
|
||||
"Path",
|
||||
QtCore.QT_TRANSLATE_NOOP(
|
||||
"PathEngrave", "Additional base objects to be engraved"
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property", "Additional base objects to be engraved"
|
||||
),
|
||||
)
|
||||
obj.setEditorMode("BaseObject", 2) # hide
|
||||
@@ -91,8 +89,8 @@ class ObjectEngrave(PathEngraveBase.ObjectOp):
|
||||
"App::PropertyInteger",
|
||||
"StartVertex",
|
||||
"Path",
|
||||
QtCore.QT_TRANSLATE_NOOP(
|
||||
"PathEngrave", "The vertex index to start the path from"
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property", "The vertex index to start the path from"
|
||||
),
|
||||
)
|
||||
self.setupAdditionalProperties(obj)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
from lazy_loader.lazy_loader import LazyLoader
|
||||
import Path
|
||||
import PathScripts.PathGeom as PathGeom
|
||||
import PathScripts.PathLog as PathLog
|
||||
@@ -27,22 +28,17 @@ import PathScripts.PathOp as PathOp
|
||||
import PathScripts.PathOpTools as PathOpTools
|
||||
import copy
|
||||
|
||||
# lazily loaded modules
|
||||
from lazy_loader.lazy_loader import LazyLoader
|
||||
__doc__ = "Base class for all ops in the engrave family."
|
||||
|
||||
# lazily loaded modules
|
||||
DraftGeomUtils = LazyLoader("DraftGeomUtils", globals(), "DraftGeomUtils")
|
||||
Part = LazyLoader("Part", globals(), "Part")
|
||||
|
||||
from PySide import QtCore
|
||||
|
||||
__doc__ = "Base class for all ops in the engrave family."
|
||||
|
||||
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||
# PathLog.trackModule(PathLog.thisModule())
|
||||
|
||||
# Qt translation handling
|
||||
def translate(context, text, disambig=None):
|
||||
return QtCore.QCoreApplication.translate(context, text, disambig)
|
||||
if False:
|
||||
PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule())
|
||||
PathLog.trackModule(PathLog.thisModule())
|
||||
else:
|
||||
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||
|
||||
|
||||
class ObjectOp(PathOp.ObjectOp):
|
||||
|
||||
@@ -30,17 +30,20 @@ import PathScripts.PathUtils as PathUtils
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
|
||||
|
||||
__title__ = "Path Engrave Operation UI"
|
||||
__author__ = "sliptonic (Brad Collette)"
|
||||
__url__ = "https://www.freecadweb.org"
|
||||
__doc__ = "Engrave operation page controller and command implementation."
|
||||
|
||||
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||
# PathLog.trackModule(PathLog.thisModule())
|
||||
if False:
|
||||
PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule())
|
||||
PathLog.trackModule(PathLog.thisModule())
|
||||
else:
|
||||
PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||
|
||||
|
||||
def translate(context, text, disambig=None):
|
||||
return QtCore.QCoreApplication.translate(context, text, disambig)
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
|
||||
class TaskPanelBaseGeometryPage(PathOpGui.TaskPanelBaseGeometryPage):
|
||||
@@ -86,7 +89,7 @@ class TaskPanelBaseGeometryPage(PathOpGui.TaskPanelBaseGeometryPage):
|
||||
# selectively add some elements of the drawing to the Base
|
||||
for sub in sel.SubElementNames:
|
||||
if "Vertex" in sub:
|
||||
PathLog.info(translate("Path", "Ignoring vertex"))
|
||||
PathLog.info("Ignoring vertex")
|
||||
else:
|
||||
self.obj.Proxy.addBase(self.obj, base, sub)
|
||||
else:
|
||||
@@ -166,9 +169,9 @@ Command = PathOpGui.SetupOperation(
|
||||
PathEngrave.Create,
|
||||
TaskPanelOpPage,
|
||||
"Path_Engrave",
|
||||
QtCore.QT_TRANSLATE_NOOP("PathEngrave", "Engrave"),
|
||||
QtCore.QT_TRANSLATE_NOOP("Path_Engrave", "Engrave"),
|
||||
QtCore.QT_TRANSLATE_NOOP(
|
||||
"PathEngrave", "Creates an Engraving Path around a Draft ShapeString"
|
||||
"Path_Engrave", "Creates an Engraving Path around a Draft ShapeString"
|
||||
),
|
||||
PathEngrave.SetupProperties,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user