From a50bd5dc880f76c3ba8b7af5bd5d19799db4cbf1 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Fri, 7 Oct 2016 22:21:02 -0300 Subject: [PATCH] Made Path objects properties translatable - fixes #2524 --- src/Mod/Draft/Draft.py | 4 +- src/Mod/Path/PathScripts/DragknifeDressup.py | 8 +-- src/Mod/Path/PathScripts/PathArray.py | 6 +- src/Mod/Path/PathScripts/PathComment.py | 2 +- .../Path/PathScripts/PathCompoundExtended.py | 10 +-- src/Mod/Path/PathScripts/PathCopy.py | 2 +- src/Mod/Path/PathScripts/PathCustom.py | 2 +- src/Mod/Path/PathScripts/PathDressup.py | 6 +- src/Mod/Path/PathScripts/PathDrilling.py | 24 +++---- src/Mod/Path/PathScripts/PathEngrave.py | 22 +++---- src/Mod/Path/PathScripts/PathFacePocket.py | 12 ++-- src/Mod/Path/PathScripts/PathFaceProfile.py | 8 +-- src/Mod/Path/PathScripts/PathFixture.py | 4 +- src/Mod/Path/PathScripts/PathFromShape.py | 2 +- src/Mod/Path/PathScripts/PathHop.py | 8 +-- src/Mod/Path/PathScripts/PathLoadTool.py | 10 +-- src/Mod/Path/PathScripts/PathMachine.py | 26 ++++---- src/Mod/Path/PathScripts/PathPlane.py | 4 +- src/Mod/Path/PathScripts/PathPocket.py | 54 ++++++++-------- src/Mod/Path/PathScripts/PathProfile.py | 62 +++++++++---------- src/Mod/Path/PathScripts/PathProject.py | 6 +- src/Mod/Path/PathScripts/PathRemote.py | 28 ++++----- src/Mod/Path/PathScripts/PathStock.py | 9 ++- src/Mod/Path/PathScripts/PathStop.py | 2 +- src/Mod/Path/PathScripts/PathSurface.py | 28 ++++----- src/Mod/Path/PathScripts/PathToolLenOffset.py | 6 +- 26 files changed, 175 insertions(+), 180 deletions(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 96891a763..a46ac2724 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -4378,8 +4378,8 @@ class _Wire(_DraftObject): obj.addProperty("App::PropertyBool","Closed","Draft",QT_TRANSLATE_NOOP("App::Property","If the wire is closed or not")) obj.addProperty("App::PropertyLink","Base","Draft",QT_TRANSLATE_NOOP("App::Property","The base object is the wire is formed from 2 objects")) obj.addProperty("App::PropertyLink","Tool","Draft",QT_TRANSLATE_NOOP("App::Property","The tool object is the wire is formed from 2 objects")) - obj.addProperty("App::PropertyVectorDistance","Start",QT_TRANSLATE_NOOP("App::Property","Draft","The start point of this line")) - obj.addProperty("App::PropertyVectorDistance","End",QT_TRANSLATE_NOOP("App::Property","Draft","The end point of this line")) + obj.addProperty("App::PropertyVectorDistance","Start","Draft",QT_TRANSLATE_NOOP("App::Property","The start point of this line")) + obj.addProperty("App::PropertyVectorDistance","End","Draft",QT_TRANSLATE_NOOP("App::Property","The end point of this line")) obj.addProperty("App::PropertyLength","Length","Draft",QT_TRANSLATE_NOOP("App::Property","The length of this line")) obj.addProperty("App::PropertyLength","FilletRadius","Draft",QT_TRANSLATE_NOOP("App::Property","Radius to use to fillet the corners")) obj.addProperty("App::PropertyLength","ChamferSize","Draft",QT_TRANSLATE_NOOP("App::Property","Size of the chamfer to give to the corners")) diff --git a/src/Mod/Path/PathScripts/DragknifeDressup.py b/src/Mod/Path/PathScripts/DragknifeDressup.py index 03a3b1aeb..07612d0da 100644 --- a/src/Mod/Path/PathScripts/DragknifeDressup.py +++ b/src/Mod/Path/PathScripts/DragknifeDressup.py @@ -53,10 +53,10 @@ currLocation = {} class ObjectDressup: def __init__(self, obj): - obj.addProperty("App::PropertyLink", "Base", "Path", "The base path to modify") - obj.addProperty("App::PropertyAngle", "filterangle", "Filter Angle", "Angles less than filter angle will not receive corner actions") - obj.addProperty("App::PropertyFloat", "offset", "Offset", "Distance the point trails behind the spindle") - obj.addProperty("App::PropertyFloat", "pivotheight", "Pivot Height", "Height to raise during corner action") + obj.addProperty("App::PropertyLink", "Base", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The base path to modify")) + obj.addProperty("App::PropertyAngle", "filterangle", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","Angles less than filter angle will not receive corner actions")) + obj.addProperty("App::PropertyFloat", "offset", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","Distance the point trails behind the spindle")) + obj.addProperty("App::PropertyFloat", "pivotheight", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","Height to raise during corner action")) obj.Proxy = self diff --git a/src/Mod/Path/PathScripts/PathArray.py b/src/Mod/Path/PathScripts/PathArray.py index 8b0604acb..b209c4658 100644 --- a/src/Mod/Path/PathScripts/PathArray.py +++ b/src/Mod/Path/PathScripts/PathArray.py @@ -41,9 +41,9 @@ class ObjectArray: def __init__(self,obj): - obj.addProperty("App::PropertyLink","Base","Path","The path to array") - obj.addProperty("App::PropertyVectorDistance","Offset","Path","The spacing between the array copies") - obj.addProperty("App::PropertyInteger","Copies","Path","The number of copies") + obj.addProperty("App::PropertyLink","Base","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The path to array")) + obj.addProperty("App::PropertyVectorDistance","Offset","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The spacing between the array copies")) + obj.addProperty("App::PropertyInteger","Copies","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The number of copies")) obj.Proxy = self def __getstate__(self): diff --git a/src/Mod/Path/PathScripts/PathComment.py b/src/Mod/Path/PathScripts/PathComment.py index b6ec19a33..b3d6cb833 100644 --- a/src/Mod/Path/PathScripts/PathComment.py +++ b/src/Mod/Path/PathScripts/PathComment.py @@ -38,7 +38,7 @@ except AttributeError: class Comment: def __init__(self,obj): - obj.addProperty("App::PropertyString","Comment","Path","Comment or note for CNC program") + obj.addProperty("App::PropertyString","Comment","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","Comment or note for CNC program")) obj.Proxy = self mode = 2 obj.setEditorMode('Placement',mode) diff --git a/src/Mod/Path/PathScripts/PathCompoundExtended.py b/src/Mod/Path/PathScripts/PathCompoundExtended.py index 6a9349436..cdcc48ebb 100644 --- a/src/Mod/Path/PathScripts/PathCompoundExtended.py +++ b/src/Mod/Path/PathScripts/PathCompoundExtended.py @@ -41,11 +41,11 @@ class ObjectCompoundExtended: def __init__(self,obj): - obj.addProperty("App::PropertyString","Description", "Path","An optional description of this compounded operation") -# obj.addProperty("App::PropertySpeed", "FeedRate", "Path","The feed rate of the paths in these compounded operations") -# obj.addProperty("App::PropertyFloat", "SpindleSpeed", "Path","The spindle speed, in revolutions per minute, of the tool used in these compounded operations") - obj.addProperty("App::PropertyLength","SafeHeight", "Path","The safe height for this operation") - obj.addProperty("App::PropertyLength","RetractHeight","Path","The retract height, above top surface of part, between compounded operations inside clamping area") + obj.addProperty("App::PropertyString","Description", "Path",QtCore.QT_TRANSLATE_NOOP("App::Property","An ptional description of this compounded operation")) +# obj.addProperty("App::PropertySpeed", "FeedRate", "Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The feed rate of the paths in these compounded operations")) +# obj.addProperty("App::PropertyFloat", "SpindleSpeed", "Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The spindle speed, in revolutions per minute, of the tool used in these compounded operations")) + obj.addProperty("App::PropertyLength","SafeHeight", "Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The safe height for this operation")) + obj.addProperty("App::PropertyLength","RetractHeight","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The retract height, above top surface of part, between compounded operations inside clamping area")) obj.Proxy = self def __getstate__(self): diff --git a/src/Mod/Path/PathScripts/PathCopy.py b/src/Mod/Path/PathScripts/PathCopy.py index 7031d303d..d2c25dd01 100644 --- a/src/Mod/Path/PathScripts/PathCopy.py +++ b/src/Mod/Path/PathScripts/PathCopy.py @@ -41,7 +41,7 @@ class ObjectPathCopy: def __init__(self,obj): - obj.addProperty("App::PropertyLink","Base","Path","The path to be copied") + obj.addProperty("App::PropertyLink","Base","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The path to be copied")) obj.Proxy = self def __getstate__(self): diff --git a/src/Mod/Path/PathScripts/PathCustom.py b/src/Mod/Path/PathScripts/PathCustom.py index 3745239ed..9ba1c3b25 100644 --- a/src/Mod/Path/PathScripts/PathCustom.py +++ b/src/Mod/Path/PathScripts/PathCustom.py @@ -41,7 +41,7 @@ class ObjectCustom: def __init__(self,obj): - obj.addProperty("App::PropertyStringList","Gcode","Path","The gcode to be inserted") + obj.addProperty("App::PropertyStringList","Gcode","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The gcode to be inserted")) obj.Proxy = self def __getstate__(self): diff --git a/src/Mod/Path/PathScripts/PathDressup.py b/src/Mod/Path/PathScripts/PathDressup.py index f4ff2cb2a..d87fbed82 100644 --- a/src/Mod/Path/PathScripts/PathDressup.py +++ b/src/Mod/Path/PathScripts/PathDressup.py @@ -45,9 +45,9 @@ except AttributeError: class ObjectDressup: def __init__(self, obj): - obj.addProperty("App::PropertyLink", "Base","Path", "The base path to modify") - obj.addProperty("App::PropertyInteger", "Position", "Path", "The position of this dressup in the base path") - obj.addProperty("Path::PropertyPath", "Modification", "Path", "The modification to be added") + obj.addProperty("App::PropertyLink", "Base","Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The base path to modify")) + obj.addProperty("App::PropertyInteger", "Position", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The position of this dressup in the base path")) + obj.addProperty("Path::PropertyPath", "Modification", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The modification to be added")) obj.Proxy = self def __getstate__(self): diff --git a/src/Mod/Path/PathScripts/PathDrilling.py b/src/Mod/Path/PathScripts/PathDrilling.py index 3348641cc..ffe5d9957 100644 --- a/src/Mod/Path/PathScripts/PathDrilling.py +++ b/src/Mod/Path/PathScripts/PathDrilling.py @@ -49,23 +49,23 @@ except AttributeError: class ObjectDrilling: def __init__(self, obj): - obj.addProperty("App::PropertyLinkSubList", "Base","Path", "The base geometry of this toolpath") - obj.addProperty("App::PropertyBool", "Active", "Path", "Make False, to prevent operation from generating code") - obj.addProperty("App::PropertyString", "Comment", "Path", "An optional comment for this profile") - obj.addProperty("App::PropertyString", "UserLabel", "Path", "User Assigned Label") + obj.addProperty("App::PropertyLinkSubList", "Base","Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The base geometry of this toolpath")) + obj.addProperty("App::PropertyBool", "Active", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","Make False, to prevent operation from generating code")) + obj.addProperty("App::PropertyString", "Comment", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","An optional comment for this profile")) + obj.addProperty("App::PropertyString", "UserLabel", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","User Assigned Label")) - obj.addProperty("App::PropertyLength", "PeckDepth", "Depth", "Incremental Drill depth before retracting to clear chips") - obj.addProperty("App::PropertyLength", "StartDepth", "Depth", "Starting Depth of Tool- first cut depth in Z") - obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", "The height needed to clear clamps and obstructions") - obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", "Final Depth of Tool- lowest value in Z") - obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", "Height to clear top of materil") - obj.addProperty("App::PropertyDistance", "RetractHeight", "Depth", "The height where feed starts and height during retract tool when path is finished") + obj.addProperty("App::PropertyLength", "PeckDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Drill depth before retracting to clear chips")) + obj.addProperty("App::PropertyLength", "StartDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Starting Depth of Tool- first cut depth in Z")) + obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions")) + obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Final Depth of Tool- lowest value in Z")) + obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Height to clear top of materil")) + obj.addProperty("App::PropertyDistance", "RetractHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height where feed starts and height during retract tool when path is finished")) # Tool Properties - obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", "The tool number in use") + obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The tool number in use")) obj.ToolNumber = (0, 0, 1000, 1) obj.setEditorMode('ToolNumber', 1) # make this read only - obj.addProperty("App::PropertyString", "ToolDescription", "Tool", "The description of the tool ") + obj.addProperty("App::PropertyString", "ToolDescription", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The description of the tool ")) obj.setEditorMode('ToolDescription', 1) # make this read onlyt diff --git a/src/Mod/Path/PathScripts/PathEngrave.py b/src/Mod/Path/PathScripts/PathEngrave.py index 70139b040..de6683cf7 100644 --- a/src/Mod/Path/PathScripts/PathEngrave.py +++ b/src/Mod/Path/PathScripts/PathEngrave.py @@ -47,26 +47,26 @@ except AttributeError: class ObjectPathEngrave: def __init__(self, obj): - obj.addProperty("App::PropertyLinkSubList", "Base", "Path", "The base geometry of this object") - obj.addProperty("App::PropertyBool", "Active", "Path", "Make False, to prevent operation from generating code") - obj.addProperty("App::PropertyString", "Comment", "Path", "An optional comment for this profile") - obj.addProperty("App::PropertyString", "UserLabel", "Path", "User Assigned Label") + obj.addProperty("App::PropertyLinkSubList", "Base", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The base geometry of this object")) + obj.addProperty("App::PropertyBool", "Active", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","Make False, to prevent operation from generating code")) + obj.addProperty("App::PropertyString", "Comment", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","An optional comment for this profile")) + obj.addProperty("App::PropertyString", "UserLabel", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","User Assigned Label")) - obj.addProperty("App::PropertyEnumeration", "Algorithm", "Algorithm", "The library or Algorithm used to generate the path") + obj.addProperty("App::PropertyEnumeration", "Algorithm", "Algorithm", QtCore.QT_TRANSLATE_NOOP("App::Property","The library or Algorithm used to generate the path")) obj.Algorithm = ['OCC Native'] # Tool Properties - obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", "The tool number in use") + obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The tool number in use")) obj.ToolNumber = (0, 0, 1000, 1) obj.setEditorMode('ToolNumber', 1) # make this read only - obj.addProperty("App::PropertyString", "ToolDescription", "Tool", "The description of the tool ") + obj.addProperty("App::PropertyString", "ToolDescription", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The description of the tool ")) obj.setEditorMode('ToolDescription', 1) # make this read onlyt # Depth Properties - obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", "The height needed to clear clamps and obstructions") - obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", "Rapid Safety Height between locations.") - obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", "Final Depth of Tool- lowest value in Z") - obj.addProperty("App::PropertyInteger", "StartVertex", "Path", "The vertex index to start the path from") + obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions")) + obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Rapid Safety Height between locations.")) + obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Final Depth of Tool- lowest value in Z")) + obj.addProperty("App::PropertyInteger", "StartVertex", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The vertex index to start the path from")) if FreeCAD.GuiUp: _ViewProviderEngrave(obj.ViewObject) diff --git a/src/Mod/Path/PathScripts/PathFacePocket.py b/src/Mod/Path/PathScripts/PathFacePocket.py index 8723e5c6f..75007cac2 100644 --- a/src/Mod/Path/PathScripts/PathFacePocket.py +++ b/src/Mod/Path/PathScripts/PathFacePocket.py @@ -41,12 +41,12 @@ class ObjectFacePocket: def __init__(self,obj): - obj.addProperty("App::PropertyLinkSub","Base","Path","The base geometry of this object") - obj.addProperty("App::PropertyDistance","Offset","Path","The distance between the face and the path") - obj.addProperty("App::PropertyInteger","StartVertex","Path","The vertex index to start the path from") - obj.addProperty("App::PropertyEnumeration","FirstMove","Path","The type of the first move") - obj.addProperty("App::PropertyDistance","RetractHeight","Path","The height to travel at between loops") - obj.addProperty("App::PropertyBool","Fill","Path","Perform only one loop or fill the whole shape") + obj.addProperty("App::PropertyLinkSub","Base","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The base geometry of this object")) + obj.addProperty("App::PropertyDistance","Offset","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The distance between the face and the path")) + obj.addProperty("App::PropertyInteger","StartVertex","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The vertex index to start the path from")) + obj.addProperty("App::PropertyEnumeration","FirstMove","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The type of the first move")) + obj.addProperty("App::PropertyDistance","RetractHeight","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The height to travel at between loops")) + obj.addProperty("App::PropertyBool","Fill","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","Perform only one loop or fill the whole shape")) obj.FirstMove = ["G0","G1"] obj.Proxy = self diff --git a/src/Mod/Path/PathScripts/PathFaceProfile.py b/src/Mod/Path/PathScripts/PathFaceProfile.py index 12d312a6c..4349b7012 100644 --- a/src/Mod/Path/PathScripts/PathFaceProfile.py +++ b/src/Mod/Path/PathScripts/PathFaceProfile.py @@ -41,10 +41,10 @@ class ObjectFaceProfile: def __init__(self,obj): - obj.addProperty("App::PropertyLinkSub","Base","Path","The base geometry of this object") - obj.addProperty("App::PropertyDistance","Offset","Path","The distance between the face and the path") - obj.addProperty("App::PropertyInteger","StartVertex","Path","The vertex index to start the path from") - obj.addProperty("App::PropertyEnumeration","FirstMove","Path","The type of the first move") + obj.addProperty("App::PropertyLinkSub","Base","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The base geometry of this object")) + obj.addProperty("App::PropertyDistance","Offset","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The distance between the face and the path")) + obj.addProperty("App::PropertyInteger","StartVertex","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The vertex index to start the path from")) + obj.addProperty("App::PropertyEnumeration","FirstMove","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","The type of the first move")) obj.FirstMove = ["G0","G1"] obj.Proxy = self diff --git a/src/Mod/Path/PathScripts/PathFixture.py b/src/Mod/Path/PathScripts/PathFixture.py index 0b5769158..50e191181 100644 --- a/src/Mod/Path/PathScripts/PathFixture.py +++ b/src/Mod/Path/PathScripts/PathFixture.py @@ -38,9 +38,9 @@ except AttributeError: class Fixture: def __init__(self,obj): - obj.addProperty("App::PropertyEnumeration", "Fixture", "Fixture Parameters","Fixture Offset Number") + obj.addProperty("App::PropertyEnumeration", "Fixture", "Path",QtCore.QT_TRANSLATE_NOOP("App::Property","Fixture Offset Number")) obj.Fixture=['G53','G54','G55','G56','G57','G58','G59','G59.1', 'G59.2', 'G59.3', 'G59.4', 'G59.5','G59.6','G59.7', 'G59.8', 'G59.9'] - obj.addProperty("App::PropertyBool","Active","Sequence Parameters","Make False, to prevent operation from generating code") + obj.addProperty("App::PropertyBool","Active","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","Make False, to prevent operation from generating code")) obj.Proxy = self diff --git a/src/Mod/Path/PathScripts/PathFromShape.py b/src/Mod/Path/PathScripts/PathFromShape.py index de215b1d1..98812e3de 100644 --- a/src/Mod/Path/PathScripts/PathFromShape.py +++ b/src/Mod/Path/PathScripts/PathFromShape.py @@ -41,7 +41,7 @@ class FromShape: def __init__(self,obj): - obj.addProperty("App::PropertyLink","Base","Shape","The base Shape of this toolpath") + obj.addProperty("App::PropertyLink","Base","Shape",QtCore.QT_TRANSLATE_NOOP("App::Property","The base Shape of this toolpath")) obj.Proxy = self def __getstate__(self): diff --git a/src/Mod/Path/PathScripts/PathHop.py b/src/Mod/Path/PathScripts/PathHop.py index a54053309..94311065a 100644 --- a/src/Mod/Path/PathScripts/PathHop.py +++ b/src/Mod/Path/PathScripts/PathHop.py @@ -43,10 +43,8 @@ except AttributeError: class ObjectHop: def __init__(self, obj): - obj.addProperty("App::PropertyLink", "NextObject", - "Path", "The object to be reached by this hop") - obj.addProperty("App::PropertyDistance", "HopHeight", - "Path", "The Z height of the hop") + obj.addProperty("App::PropertyLink", "NextObject", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The object to be reached by this hop")) + obj.addProperty("App::PropertyDistance", "HopHeight", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The Z height of the hop")) obj.Proxy = self def __getstate__(self): @@ -123,7 +121,7 @@ class CommandPathHop: return FreeCAD.ActiveDocument.openTransaction( - translate("Pat_hHop", "Create Hop")) + translate("Path_Hop", "Create Hop")) FreeCADGui.addModule("PathScripts.PathHop") FreeCADGui.addModule("PathScripts.PathUtils") FreeCADGui.doCommand( diff --git a/src/Mod/Path/PathScripts/PathLoadTool.py b/src/Mod/Path/PathScripts/PathLoadTool.py index 28829e361..71562f41c 100644 --- a/src/Mod/Path/PathScripts/PathLoadTool.py +++ b/src/Mod/Path/PathScripts/PathLoadTool.py @@ -46,13 +46,13 @@ except AttributeError: class LoadTool(): def __init__(self, obj): - obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", "The active tool") + obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The active tool")) obj.ToolNumber = (0, 0, 10000, 1) - obj.addProperty("App::PropertyFloat", "SpindleSpeed", "Tool", "The speed of the cutting spindle in RPM") - obj.addProperty("App::PropertyEnumeration", "SpindleDir", "Tool", "Direction of spindle rotation") + obj.addProperty("App::PropertyFloat", "SpindleSpeed", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The speed of the cutting spindle in RPM")) + obj.addProperty("App::PropertyEnumeration", "SpindleDir", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","Direction of spindle rotation")) obj.SpindleDir = ['Forward', 'Reverse'] - obj.addProperty("App::PropertySpeed", "VertFeed", "Feed", "Feed rate for vertical moves in Z") - obj.addProperty("App::PropertySpeed", "HorizFeed", "Feed", "Feed rate for horizontal moves") + obj.addProperty("App::PropertySpeed", "VertFeed", "Feed", QtCore.QT_TRANSLATE_NOOP("App::Property","Feed rate for vertical moves in Z")) + obj.addProperty("App::PropertySpeed", "HorizFeed", "Feed", QtCore.QT_TRANSLATE_NOOP("App::Property","Feed rate for horizontal moves")) obj.Proxy = self mode = 2 diff --git a/src/Mod/Path/PathScripts/PathMachine.py b/src/Mod/Path/PathScripts/PathMachine.py index 33dc05e6b..29d8a942e 100644 --- a/src/Mod/Path/PathScripts/PathMachine.py +++ b/src/Mod/Path/PathScripts/PathMachine.py @@ -46,25 +46,25 @@ class Machine: def __init__(self, obj): - obj.addProperty("App::PropertyString", "MachineName", "Base", "Name of the Machine that will use the CNC program") + obj.addProperty("App::PropertyString", "MachineName", "Base", QtCore.QT_TRANSLATE_NOOP("App::Property","Name of the Machine that will use the CNC program")) - obj.addProperty("App::PropertyFile", "PostProcessor", "CodeOutput", "Select the Post Processor file for this machine") - obj.addProperty("App::PropertyEnumeration", "MachineUnits", "CodeOutput", "Units that the machine works in, ie Metric or Inch") + obj.addProperty("App::PropertyFile", "PostProcessor", "CodeOutput", QtCore.QT_TRANSLATE_NOOP("App::Property","Select the Post Processor file for this machine")) + obj.addProperty("App::PropertyEnumeration", "MachineUnits", "CodeOutput", QtCore.QT_TRANSLATE_NOOP("App::Property","Units that the machine works in, ie Metric or Inch")) obj.MachineUnits = ['Metric', 'Inch'] - obj.addProperty("Path::PropertyTooltable", "Tooltable", "Base", "The tooltable used for this CNC program") + obj.addProperty("Path::PropertyTooltable", "Tooltable", "Base", QtCore.QT_TRANSLATE_NOOP("App::Property","The tooltable used for this CNC program")) - obj.addProperty("App::PropertyDistance", "X_Max", "Limits", "The Maximum distance in X the machine can travel") - obj.addProperty("App::PropertyDistance", "Y_Max", "Limits", "The Maximum distance in X the machine can travel") - obj.addProperty("App::PropertyDistance", "Z_Max", "Limits", "The Maximum distance in X the machine can travel") + obj.addProperty("App::PropertyDistance", "X_Max", "Limits", QtCore.QT_TRANSLATE_NOOP("App::Property","The Maximum distance in X the machine can travel")) + obj.addProperty("App::PropertyDistance", "Y_Max", "Limits", QtCore.QT_TRANSLATE_NOOP("App::Property","The Maximum distance in Y the machine can travel")) + obj.addProperty("App::PropertyDistance", "Z_Max", "Limits", QtCore.QT_TRANSLATE_NOOP("App::Property","The Maximum distance in Z the machine can travel")) - obj.addProperty("App::PropertyDistance", "X_Min", "Limits", "The Minimum distance in X the machine can travel") - obj.addProperty("App::PropertyDistance", "Y_Min", "Limits", "The Minimum distance in X the machine can travel") - obj.addProperty("App::PropertyDistance", "Z_Min", "Limits", "The Minimum distance in X the machine can travel") + obj.addProperty("App::PropertyDistance", "X_Min", "Limits", QtCore.QT_TRANSLATE_NOOP("App::Property","The Minimum distance in X the machine can travel")) + obj.addProperty("App::PropertyDistance", "Y_Min", "Limits", QtCore.QT_TRANSLATE_NOOP("App::Property","The Minimum distance in Y the machine can travel")) + obj.addProperty("App::PropertyDistance", "Z_Min", "Limits", QtCore.QT_TRANSLATE_NOOP("App::Property","The Minimum distance in Z the machine can travel")) - obj.addProperty("App::PropertyDistance", "X", "HomePosition", "Home position of machine, in X (mainly for visualization)") - obj.addProperty("App::PropertyDistance", "Y", "HomePosition", "Home position of machine, in Y (mainly for visualization)") - obj.addProperty("App::PropertyDistance", "Z", "HomePosition", "Home position of machine, in Z (mainly for visualization)") + obj.addProperty("App::PropertyDistance", "X", "HomePosition", QtCore.QT_TRANSLATE_NOOP("App::Property","Home position of machine, in X (mainly for visualization)")) + obj.addProperty("App::PropertyDistance", "Y", "HomePosition", QtCore.QT_TRANSLATE_NOOP("App::Property","Home position of machine, in Y (mainly for visualization)")) + obj.addProperty("App::PropertyDistance", "Z", "HomePosition", QtCore.QT_TRANSLATE_NOOP("App::Property","Home position of machine, in Z (mainly for visualization)")) obj.Proxy = self mode = 2 diff --git a/src/Mod/Path/PathScripts/PathPlane.py b/src/Mod/Path/PathScripts/PathPlane.py index 7383a7744..94c26c0b4 100644 --- a/src/Mod/Path/PathScripts/PathPlane.py +++ b/src/Mod/Path/PathScripts/PathPlane.py @@ -38,9 +38,9 @@ except AttributeError: class Plane: def __init__(self,obj): - obj.addProperty("App::PropertyEnumeration", "SelectionPlane","Plane","Orientation plane of CNC path") + obj.addProperty("App::PropertyEnumeration", "SelectionPlane","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","Orientation plane of CNC path")) obj.SelectionPlane=['XY', 'XZ', 'YZ'] - obj.addProperty("App::PropertyBool","Active","Sequence Parameters","Make False, to prevent operation from generating code") + obj.addProperty("App::PropertyBool","Active","Path",QtCore.QT_TRANSLATE_NOOP("App::Property","Make False, to prevent operation from generating code")) obj.Proxy = self def execute(self,obj): diff --git a/src/Mod/Path/PathScripts/PathPocket.py b/src/Mod/Path/PathScripts/PathPocket.py index 5c1f9bd9f..719e67484 100644 --- a/src/Mod/Path/PathScripts/PathPocket.py +++ b/src/Mod/Path/PathScripts/PathPocket.py @@ -47,55 +47,55 @@ except AttributeError: class ObjectPocket: def __init__(self, obj): - obj.addProperty("App::PropertyLinkSubList", "Base", "Path", "The base geometry of this object") - obj.addProperty("App::PropertyBool", "Active", "Path", "Make False, to prevent operation from generating code") - obj.addProperty("App::PropertyString", "Comment", "Path", "An optional comment for this profile") - obj.addProperty("App::PropertyString", "UserLabel", "Path", "User Assigned Label") + obj.addProperty("App::PropertyLinkSubList", "Base", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The base geometry of this object")) + obj.addProperty("App::PropertyBool", "Active", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","Make False, to prevent operation from generating code")) + obj.addProperty("App::PropertyString", "Comment", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","An optional comment for this profile")) + obj.addProperty("App::PropertyString", "UserLabel", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","User Assigned Label")) - obj.addProperty("App::PropertyEnumeration", "Algorithm", "Algorithm", "The library to use to generate the path") + obj.addProperty("App::PropertyEnumeration", "Algorithm", "Algorithm", QtCore.QT_TRANSLATE_NOOP("App::Property","The library to use to generate the path")) obj.Algorithm = ['OCC Native', 'libarea'] # Tool Properties - obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", "The tool number in use") + obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The tool number in use")) obj.ToolNumber = (0, 0, 1000, 0) obj.setEditorMode('ToolNumber', 1) # make this read only - obj.addProperty("App::PropertyString", "ToolDescription", "Tool", "The description of the tool ") + obj.addProperty("App::PropertyString", "ToolDescription", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The description of the tool ")) obj.setEditorMode('ToolDescription', 1) # make this read only # Depth Properties - obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", "The height needed to clear clamps and obstructions") - obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", "Rapid Safety Height between locations.") - obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Depth", "Incremental Step Down of Tool") + obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions")) + obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Rapid Safety Height between locations.")) + obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool")) obj.StepDown = (0.0, 0.01, 100.0, 0.5) - obj.addProperty("App::PropertyDistance", "StartDepth", "Depth", "Starting Depth of Tool- first cut depth in Z") - obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", "Final Depth of Tool- lowest value in Z") - obj.addProperty("App::PropertyDistance", "FinishDepth", "Depth", "Maximum material removed on final pass.") + obj.addProperty("App::PropertyDistance", "StartDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Starting Depth of Tool- first cut depth in Z")) + obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Final Depth of Tool- lowest value in Z")) + obj.addProperty("App::PropertyDistance", "FinishDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Maximum material removed on final pass.")) # Pocket Properties - obj.addProperty("App::PropertyEnumeration", "CutMode", "Pocket", "The direction that the toolpath should go around the part ClockWise CW or CounterClockWise CCW") + obj.addProperty("App::PropertyEnumeration", "CutMode", "Pocket", QtCore.QT_TRANSLATE_NOOP("App::Property","The direction that the toolpath should go around the part ClockWise CW or CounterClockWise CCW")) obj.CutMode = ['Climb', 'Conventional'] - obj.addProperty("App::PropertyDistance", "MaterialAllowance", "Pocket", "Amount of material to leave") - obj.addProperty("App::PropertyEnumeration", "StartAt", "Pocket", "Start pocketing at center or boundary") + obj.addProperty("App::PropertyDistance", "MaterialAllowance", "Pocket", QtCore.QT_TRANSLATE_NOOP("App::Property","Amount of material to leave")) + obj.addProperty("App::PropertyEnumeration", "StartAt", "Pocket", QtCore.QT_TRANSLATE_NOOP("App::Property","Start pocketing at center or boundary")) obj.StartAt = ['Center', 'Edge'] - obj.addProperty("App::PropertyPercent", "StepOver", "Pocket", "Percent of cutter diameter to step over on each pass") + obj.addProperty("App::PropertyPercent", "StepOver", "Pocket", QtCore.QT_TRANSLATE_NOOP("App::Property","Percent of cutter diameter to step over on each pass")) # obj.StepOver = (0.0, 0.01, 100.0, 0.5) - obj.addProperty("App::PropertyBool", "KeepToolDown", "Pocket", "Attempts to avoid unnecessary retractions.") - obj.addProperty("App::PropertyBool", "ZigUnidirectional", "Pocket", "Lifts tool at the end of each pass to respect cut mode.") - obj.addProperty("App::PropertyBool", "UseZigZag", "Pocket", "Use Zig Zag pattern to clear area.") - obj.addProperty("App::PropertyFloat", "ZigZagAngle", "Pocket", "Angle of the zigzag pattern") + obj.addProperty("App::PropertyBool", "KeepToolDown", "Pocket", QtCore.QT_TRANSLATE_NOOP("App::Property","Attempts to avoid unnecessary retractions.")) + obj.addProperty("App::PropertyBool", "ZigUnidirectional", "Pocket", QtCore.QT_TRANSLATE_NOOP("App::Property","Lifts tool at the end of each pass to respect cut mode.")) + obj.addProperty("App::PropertyBool", "UseZigZag", "Pocket", QtCore.QT_TRANSLATE_NOOP("App::Property","Use Zig Zag pattern to clear area.")) + obj.addProperty("App::PropertyFloat", "ZigZagAngle", "Pocket", QtCore.QT_TRANSLATE_NOOP("App::Property","Angle of the zigzag pattern")) # Entry Properties - obj.addProperty("App::PropertyBool", "UseEntry", "Entry", "Allow Cutter enter material with a straight plunge.") - obj.addProperty("App::PropertyFloatConstraint", "RampSize", "Entry", "The minimum fraction of tool diameter to use for ramp length") + obj.addProperty("App::PropertyBool", "UseEntry", "Entry", QtCore.QT_TRANSLATE_NOOP("App::Property","Allow Cutter enter material with a straight plunge.")) + obj.addProperty("App::PropertyFloatConstraint", "RampSize", "Entry", QtCore.QT_TRANSLATE_NOOP("App::Property","The minimum fraction of tool diameter to use for ramp length")) obj.RampSize = (0.0, 0.01, 100.0, 0.5) - obj.addProperty("App::PropertyFloatConstraint", "HelixSize", "Entry", "The fraction of tool diameter to use for calculating helix size.") + obj.addProperty("App::PropertyFloatConstraint", "HelixSize", "Entry", QtCore.QT_TRANSLATE_NOOP("App::Property","The fraction of tool diameter to use for calculating helix size.")) obj.HelixSize = (0.0, 0.01, 100.0, 0.5) - obj.addProperty("App::PropertyFloatConstraint", "RampAngle", "Entry", "The Angle of the ramp entry.") + obj.addProperty("App::PropertyFloatConstraint", "RampAngle", "Entry", QtCore.QT_TRANSLATE_NOOP("App::Property","The Angle of the ramp entry.")) obj.RampAngle = (0.0, 0.01, 100.0, 0.5) # Start Point Properties - obj.addProperty("App::PropertyVector", "StartPoint", "Start Point", "The start point of this path") - obj.addProperty("App::PropertyBool", "UseStartPoint", "Start Point", "make True, if specifying a Start Point") + obj.addProperty("App::PropertyVector", "StartPoint", "Start Point", QtCore.QT_TRANSLATE_NOOP("App::Property","The start point of this path")) + obj.addProperty("App::PropertyBool", "UseStartPoint", "Start Point", QtCore.QT_TRANSLATE_NOOP("App::Property","make True, if specifying a Start Point")) obj.Proxy = self diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py index 559e77aba..43aefa624 100644 --- a/src/Mod/Path/PathScripts/PathProfile.py +++ b/src/Mod/Path/PathScripts/PathProfile.py @@ -54,57 +54,57 @@ __url__ = "http://www.freecadweb.org" class ObjectProfile: def __init__(self, obj): - obj.addProperty("App::PropertyLinkSubList", "Base", "Path", "The base geometry of this toolpath") - obj.addProperty("App::PropertyBool", "Active", "Path", "Make False, to prevent operation from generating code") - obj.addProperty("App::PropertyString", "Comment", "Path", "An optional comment for this profile") - obj.addProperty("App::PropertyString", "UserLabel", "Path", "User Assigned Label") + obj.addProperty("App::PropertyLinkSubList", "Base", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The base geometry of this toolpath")) + obj.addProperty("App::PropertyBool", "Active", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","Make False, to prevent operation from generating code")) + obj.addProperty("App::PropertyString", "Comment", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","An optional comment for this profile")) + obj.addProperty("App::PropertyString", "UserLabel", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","User Assigned Label")) - obj.addProperty("App::PropertyEnumeration", "Algorithm", "Algorithm", "The library or algorithm used to generate the path") + obj.addProperty("App::PropertyEnumeration", "Algorithm", "Algorithm", QtCore.QT_TRANSLATE_NOOP("App::Property","The library or algorithm used to generate the path")) obj.Algorithm = ['OCC Native', 'libarea'] - obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", "The tool number in use") + obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The tool number in use")) obj.ToolNumber = (0, 0, 1000, 1) obj.setEditorMode('ToolNumber', 1) # make this read only - obj.addProperty("App::PropertyString", "ToolDescription", "Tool", "The description of the tool ") + obj.addProperty("App::PropertyString", "ToolDescription", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The description of the tool ")) obj.setEditorMode('ToolDescription', 1) # make this read onlyt # Depth Properties - obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", "The height needed to clear clamps and obstructions") - obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", "Rapid Safety Height between locations.") - obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Depth", "Incremental Step Down of Tool") + obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions")) + obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Rapid Safety Height between locations.")) + obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool")) obj.StepDown = (1, 0.01, 1000, 0.5) - obj.addProperty("App::PropertyDistance", "StartDepth", "Depth", "Starting Depth of Tool- first cut depth in Z") - obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", "Final Depth of Tool- lowest value in Z") + obj.addProperty("App::PropertyDistance", "StartDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Starting Depth of Tool- first cut depth in Z")) + obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Final Depth of Tool- lowest value in Z")) # Start Point Properties - obj.addProperty("App::PropertyVector", "StartPoint", "Start Point", "The start point of this path") - obj.addProperty("App::PropertyBool", "UseStartPoint", "Start Point", "make True, if specifying a Start Point") - obj.addProperty("App::PropertyLength", "ExtendAtStart", "Start Point", "extra length of tool path before start of part edge") - obj.addProperty("App::PropertyLength", "LeadInLineLen", "Start Point", "length of straight segment of toolpath that comes in at angle to first part edge") + obj.addProperty("App::PropertyVector", "StartPoint", "Start Point", QtCore.QT_TRANSLATE_NOOP("App::Property","The start point of this path")) + obj.addProperty("App::PropertyBool", "UseStartPoint", "Start Point", QtCore.QT_TRANSLATE_NOOP("App::Property","make True, if specifying a Start Point")) + obj.addProperty("App::PropertyLength", "ExtendAtStart", "Start Point", QtCore.QT_TRANSLATE_NOOP("App::Property","extra length of tool path before start of part edge")) + obj.addProperty("App::PropertyLength", "LeadInLineLen", "Start Point", QtCore.QT_TRANSLATE_NOOP("App::Property","length of straight segment of toolpath that comes in at angle to first part edge")) # End Point Properties - obj.addProperty("App::PropertyBool", "UseEndPoint", "End Point", "make True, if specifying an End Point") - obj.addProperty("App::PropertyLength", "ExtendAtEnd", "End Point", "extra length of tool path after end of part edge") - obj.addProperty("App::PropertyLength", "LeadOutLineLen", "End Point", "length of straight segment of toolpath that comes in at angle to last part edge") - obj.addProperty("App::PropertyVector", "EndPoint", "End Point", "The end point of this path") + obj.addProperty("App::PropertyBool", "UseEndPoint", "End Point", QtCore.QT_TRANSLATE_NOOP("App::Property","make True, if specifying an End Point")) + obj.addProperty("App::PropertyLength", "ExtendAtEnd", "End Point", QtCore.QT_TRANSLATE_NOOP("App::Property","extra length of tool path after end of part edge")) + obj.addProperty("App::PropertyLength", "LeadOutLineLen", "End Point", QtCore.QT_TRANSLATE_NOOP("App::Property","length of straight segment of toolpath that comes in at angle to last part edge")) + obj.addProperty("App::PropertyVector", "EndPoint", "End Point", QtCore.QT_TRANSLATE_NOOP("App::Property","The end point of this path")) # Profile Properties - obj.addProperty("App::PropertyEnumeration", "Side", "Profile", "Side of edge that tool should cut") + obj.addProperty("App::PropertyEnumeration", "Side", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Side of edge that tool should cut")) obj.Side = ['Left', 'Right', 'On'] # side of profile that cutter is on in relation to direction of profile - obj.addProperty("App::PropertyEnumeration", "Direction", "Profile", "The direction that the toolpath should go around the part ClockWise CW or CounterClockWise CCW") + obj.addProperty("App::PropertyEnumeration", "Direction", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","The direction that the toolpath should go around the part ClockWise CW or CounterClockWise CCW")) obj.Direction = ['CW', 'CCW'] # this is the direction that the profile runs - obj.addProperty("App::PropertyBool", "UseComp", "Profile", "make True, if using Cutter Radius Compensation") + obj.addProperty("App::PropertyBool", "UseComp", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","make True, if using Cutter Radius Compensation")) - obj.addProperty("App::PropertyDistance", "RollRadius", "Profile", "Radius at start and end") - obj.addProperty("App::PropertyDistance", "OffsetExtra", "Profile", "Extra value to stay away from final profile- good for roughing toolpath") - obj.addProperty("App::PropertyLength", "SegLen", "Profile", "Tesselation value for tool paths made from beziers, bsplines, and ellipses") - obj.addProperty("App::PropertyAngle", "PlungeAngle", "Profile", "Plunge angle with which the tool enters the work piece. Straight down is 90 degrees, if set small enough or zero the tool will descent exactly one layer depth down per turn") + obj.addProperty("App::PropertyDistance", "RollRadius", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Radius at start and end")) + obj.addProperty("App::PropertyDistance", "OffsetExtra", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Extra value to stay away from final profile- good for roughing toolpath")) + obj.addProperty("App::PropertyLength", "SegLen", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Tesselation value for tool paths made from beziers, bsplines, and ellipses")) + obj.addProperty("App::PropertyAngle", "PlungeAngle", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Plunge angle with which the tool enters the work piece. Straight down is 90 degrees, if set small enough or zero the tool will descent exactly one layer depth down per turn")) - obj.addProperty("App::PropertyVectorList", "locs", "Tags", "List of holding tag locations") + obj.addProperty("App::PropertyVectorList", "locs", "Tags", QtCore.QT_TRANSLATE_NOOP("App::Property","List of holding tag locations")) - obj.addProperty("App::PropertyFloatList", "angles", "Tags", "List of angles for the holding tags") - obj.addProperty("App::PropertyFloatList", "heights", "Tags", "List of angles for the holding tags") - obj.addProperty("App::PropertyFloatList", "lengths", "Tags", "List of angles for the holding tags") + obj.addProperty("App::PropertyFloatList", "angles", "Tags", QtCore.QT_TRANSLATE_NOOP("App::Property","List of angles for the holding tags")) + obj.addProperty("App::PropertyFloatList", "heights", "Tags", QtCore.QT_TRANSLATE_NOOP("App::Property","List of angles for the holding tags")) + obj.addProperty("App::PropertyFloatList", "lengths", "Tags", QtCore.QT_TRANSLATE_NOOP("App::Property","List of angles for the holding tags")) locations = [] angles = [] lengths = [] diff --git a/src/Mod/Path/PathScripts/PathProject.py b/src/Mod/Path/PathScripts/PathProject.py index a73e5ca4b..6189a55a9 100644 --- a/src/Mod/Path/PathScripts/PathProject.py +++ b/src/Mod/Path/PathScripts/PathProject.py @@ -47,11 +47,9 @@ class ObjectPathProject: def __init__(self, obj): # obj.addProperty("App::PropertyFile", "PostProcessor", "CodeOutput", "Select the Post Processor file for this project") - obj.addProperty("App::PropertyFile", "OutputFile", - "CodeOutput", "The NC output file for this project") + obj.addProperty("App::PropertyFile", "OutputFile", "CodeOutput", QtCore.QT_TRANSLATE_NOOP("App::Property","The NC output file for this project")) obj.setEditorMode("OutputFile", 0) # set to default mode - obj.addProperty("App::PropertyString", "Description", - "Path", "An optional description for this project") + obj.addProperty("App::PropertyString", "Description", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","An optional description for this project")) obj.Proxy = self def __getstate__(self): diff --git a/src/Mod/Path/PathScripts/PathRemote.py b/src/Mod/Path/PathScripts/PathRemote.py index 11f4bc87e..a4778a328 100644 --- a/src/Mod/Path/PathScripts/PathRemote.py +++ b/src/Mod/Path/PathScripts/PathRemote.py @@ -57,30 +57,30 @@ class ObjectRemote: def __init__(self, obj): - obj.addProperty("App::PropertyLinkSubList", "Base", "Path", "The base geometry of this toolpath") - obj.addProperty("App::PropertyBool", "Active", "Path", "Make False, to prevent operation from generating code") - obj.addProperty("App::PropertyString", "Comment", "Path", "An optional comment for this profile") - obj.addProperty("App::PropertyString", "UserLabel", "Path", "User Assigned Label") + obj.addProperty("App::PropertyLinkSubList", "Base", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The base geometry of this toolpath")) + obj.addProperty("App::PropertyBool", "Active", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","Make False, to prevent operation from generating code")) + obj.addProperty("App::PropertyString", "Comment", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","An optional comment for this profile")) + obj.addProperty("App::PropertyString", "UserLabel", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","User Assigned Label")) - obj.addProperty("App::PropertyString", "URL", "API", "The Base URL of the remote path service") - obj.addProperty("App::PropertyStringList", "proplist", "Path", "list of remote properties") + obj.addProperty("App::PropertyString", "URL", "API", QtCore.QT_TRANSLATE_NOOP("App::Property","The Base URL of the remote path service")) + obj.addProperty("App::PropertyStringList", "proplist", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","list of remote properties")) obj.setEditorMode('proplist', 2) # make this hidden # Tool Properties - obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", "The tool number in use") + obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool",QtCore.QT_TRANSLATE_NOOP("App::Property","The tool number in use")) obj.ToolNumber = (0, 0, 1000, 0) obj.setEditorMode('ToolNumber', 1) # make this read only - obj.addProperty("App::PropertyString", "ToolDescription", "Tool", "The description of the tool ") + obj.addProperty("App::PropertyString", "ToolDescription", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The description of the tool ")) obj.setEditorMode('ToolDescription', 1) # make this read onlyt # Depth Properties - obj.addProperty("App::PropertyFloat", "ClearanceHeight", "Depth", "The height needed to clear clamps and obstructions") - obj.addProperty("App::PropertyFloat", "SafeHeight", "Depth", "Rapid Safety Height between locations.") - obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Step", "Incremental Step Down of Tool") + obj.addProperty("App::PropertyFloat", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions")) + obj.addProperty("App::PropertyFloat", "SafeHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Rapid Safety Height between locations.")) + obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Step", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool")) obj.StepDown = (0.0, 0.01, 100.0, 0.5) - obj.addProperty("App::PropertyFloat", "StartDepth", "Depth", "Starting Depth of Tool- first cut depth in Z") - obj.addProperty("App::PropertyFloat", "FinalDepth", "Depth", "Final Depth of Tool- lowest value in Z") - obj.addProperty("App::PropertyFloat", "FinishDepth", "Depth", "Maximum material removed on final pass.") + obj.addProperty("App::PropertyFloat", "StartDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Starting Depth of Tool- first cut depth in Z")) + obj.addProperty("App::PropertyFloat", "FinalDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Final Depth of Tool- lowest value in Z")) + obj.addProperty("App::PropertyFloat", "FinishDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Maximum material removed on final pass.")) obj.Proxy = self diff --git a/src/Mod/Path/PathScripts/PathStock.py b/src/Mod/Path/PathScripts/PathStock.py index dbd6f756a..c79c6ec68 100644 --- a/src/Mod/Path/PathScripts/PathStock.py +++ b/src/Mod/Path/PathScripts/PathStock.py @@ -40,11 +40,10 @@ except AttributeError: class Stock: def __init__(self, obj): "Make stock" - obj.addProperty("App::PropertyFloat","Length_Allowance","Stock","extra allownace from part width").Length_Allowance = 1.0 - obj.addProperty("App::PropertyFloat","Width_Allowance","Stock","extra allownace from part width").Width_Allowance = 1.0 - obj.addProperty("App::PropertyFloat","Height_Allowance","Stock","extra allownace from part width").Height_Allowance = 1.0 - obj.addProperty("App::PropertyLink","Base","Base", - "The base object this represents") + obj.addProperty("App::PropertyFloat","Length_Allowance","Stock",QtCore.QT_TRANSLATE_NOOP("App::Property","extra allownace from part width")).Length_Allowance = 1.0 + obj.addProperty("App::PropertyFloat","Width_Allowance","Stock",QtCore.QT_TRANSLATE_NOOP("App::Property","extra allownace from part width")).Width_Allowance = 1.0 + obj.addProperty("App::PropertyFloat","Height_Allowance","Stock",QtCore.QT_TRANSLATE_NOOP("App::Property","extra allownace from part width")).Height_Allowance = 1.0 + obj.addProperty("App::PropertyLink","Base","Base",QtCore.QT_TRANSLATE_NOOP("App::Property","The base object this represents")) obj.Proxy = self def __getstate__(self): diff --git a/src/Mod/Path/PathScripts/PathStop.py b/src/Mod/Path/PathScripts/PathStop.py index 09033bd32..2e340a61b 100644 --- a/src/Mod/Path/PathScripts/PathStop.py +++ b/src/Mod/Path/PathScripts/PathStop.py @@ -38,7 +38,7 @@ except AttributeError: class Stop: def __init__(self,obj): - obj.addProperty("App::PropertyEnumeration", "Stop", "Path", "Add Optional or Mandatory Stop to the program") + obj.addProperty("App::PropertyEnumeration", "Stop", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","Add Optional or Mandatory Stop to the program")) obj.Stop=['Optional', 'Mandatory'] obj.Proxy = self mode = 2 diff --git a/src/Mod/Path/PathScripts/PathSurface.py b/src/Mod/Path/PathScripts/PathSurface.py index 7ce3e73fc..b49319bea 100644 --- a/src/Mod/Path/PathScripts/PathSurface.py +++ b/src/Mod/Path/PathScripts/PathSurface.py @@ -54,33 +54,33 @@ except AttributeError: class ObjectSurface: def __init__(self, obj): - obj.addProperty("App::PropertyLinkSubList", "Base", "Path", "The base geometry of this toolpath") - obj.addProperty("App::PropertyBool", "Active", "Path", "Make False, to prevent operation from generating code") - obj.addProperty("App::PropertyString", "Comment", "Path", "An optional comment for this profile") - obj.addProperty("App::PropertyString", "UserLabel", "Path", "User Assigned Label") + obj.addProperty("App::PropertyLinkSubList", "Base", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","The base geometry of this toolpath")) + obj.addProperty("App::PropertyBool", "Active", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","Make False, to prevent operation from generating code")) + obj.addProperty("App::PropertyString", "Comment", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","An optional comment for this profile")) + obj.addProperty("App::PropertyString", "UserLabel", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property","User Assigned Label")) - obj.addProperty("App::PropertyEnumeration", "Algorithm", "Algorithm", "The library to use to generate the path") + obj.addProperty("App::PropertyEnumeration", "Algorithm", "Algorithm", QtCore.QT_TRANSLATE_NOOP("App::Property","The library to use to generate the path")) obj.Algorithm = ['OCL Dropcutter', 'OCL Waterline'] # Tool Properties - obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", "The tool number in use") + obj.addProperty("App::PropertyIntegerConstraint", "ToolNumber", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The tool number in use")) obj.ToolNumber = (0, 0, 1000, 0) obj.setEditorMode('ToolNumber', 1) # make this read only - obj.addProperty("App::PropertyString", "ToolDescription", "Tool", "The description of the tool ") + obj.addProperty("App::PropertyString", "ToolDescription", "Tool", QtCore.QT_TRANSLATE_NOOP("App::Property","The description of the tool ")) obj.setEditorMode('ToolDescription', 1) # make this read onlyt # Surface Properties - obj.addProperty("App::PropertyFloatConstraint", "SampleInterval", "Surface", "The Sample Interval. Small values cause long wait") + obj.addProperty("App::PropertyFloatConstraint", "SampleInterval", "Surface", QtCore.QT_TRANSLATE_NOOP("App::Property","The Sample Interval. Small values cause long wait")) obj.SampleInterval = (0, 0, 1, 0) # Depth Properties - obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", "The height needed to clear clamps and obstructions") - obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", "Rapid Safety Height between locations.") - obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Depth", "Incremental Step Down of Tool") + obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions")) + obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Rapid Safety Height between locations.")) + obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool")) obj.StepDown = (0.0, 0.01, 100.0, 0.5) - obj.addProperty("App::PropertyDistance", "StartDepth", "Depth", "Starting Depth of Tool- first cut depth in Z") - obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", "Final Depth of Tool- lowest value in Z") - obj.addProperty("App::PropertyDistance", "FinishDepth", "Depth", "Maximum material removed on final pass.") + obj.addProperty("App::PropertyDistance", "StartDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Starting Depth of Tool- first cut depth in Z")) + obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Final Depth of Tool- lowest value in Z")) + obj.addProperty("App::PropertyDistance", "FinishDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Maximum material removed on final pass.")) obj.Proxy = self diff --git a/src/Mod/Path/PathScripts/PathToolLenOffset.py b/src/Mod/Path/PathScripts/PathToolLenOffset.py index c66e6b877..7c14d078b 100644 --- a/src/Mod/Path/PathScripts/PathToolLenOffset.py +++ b/src/Mod/Path/PathScripts/PathToolLenOffset.py @@ -38,10 +38,10 @@ except AttributeError: class ToolLenOffset: def __init__(self,obj): - obj.addProperty("App::PropertyIntegerConstraint", "HeightNumber","HeightOffset","The Height offset number of the active tool") + obj.addProperty("App::PropertyIntegerConstraint", "HeightNumber","HeightOffset",QtCore.QT_TRANSLATE_NOOP("App::Property","The Height offset number of the active tool")) obj.HeightNumber = (0,0,10000,1) - obj.addProperty("App::PropertyLength", "Height", "HeightOffset","The first height value in Z, to rapid to, before making a feed move in Z") - obj.addProperty("App::PropertyBool","Active","HeightOffset","Make False, to prevent operation from generating code") + obj.addProperty("App::PropertyLength", "Height", "HeightOffset",QtCore.QT_TRANSLATE_NOOP("App::Property","The first height value in Z, to rapid to, before making a feed move in Z")) + obj.addProperty("App::PropertyBool","Active","HeightOffset",QtCore.QT_TRANSLATE_NOOP("App::Property","Make False, to prevent operation from generating code")) obj.Proxy = self mode = 2 obj.setEditorMode('Placement',mode)