diff --git a/src/Mod/Path/Gui/Resources/Path.qrc b/src/Mod/Path/Gui/Resources/Path.qrc
index 832d8c7ab..d4b8df68e 100644
--- a/src/Mod/Path/Gui/Resources/Path.qrc
+++ b/src/Mod/Path/Gui/Resources/Path.qrc
@@ -30,31 +30,31 @@
icons/Path-Inspect.svg
icons/Path-ToolChange.svg
icons/Path-SimpleCopy.svg
- translations/Path_de.qm
- translations/Path_af.qm
- translations/Path_zh-CN.qm
- translations/Path_zh-TW.qm
- translations/Path_hr.qm
- translations/Path_cs.qm
- translations/Path_nl.qm
- translations/Path_fi.qm
- translations/Path_fr.qm
- translations/Path_hu.qm
- translations/Path_ja.qm
- translations/Path_no.qm
- translations/Path_pl.qm
- translations/Path_pt-PT.qm
- translations/Path_ro.qm
- translations/Path_ru.qm
- translations/Path_sr.qm
- translations/Path_es-ES.qm
- translations/Path_sv-SE.qm
- translations/Path_uk.qm
- translations/Path_it.qm
- translations/Path_pt-BR.qm
- translations/Path_el.qm
- translations/Path_sk.qm
- translations/Path_tr.qm
- translations/Path_sl.qm
+ translations/Path_de.qm
+ translations/Path_af.qm
+ translations/Path_zh-CN.qm
+ translations/Path_zh-TW.qm
+ translations/Path_hr.qm
+ translations/Path_cs.qm
+ translations/Path_nl.qm
+ translations/Path_fi.qm
+ translations/Path_fr.qm
+ translations/Path_hu.qm
+ translations/Path_ja.qm
+ translations/Path_no.qm
+ translations/Path_pl.qm
+ translations/Path_pt-PT.qm
+ translations/Path_ro.qm
+ translations/Path_ru.qm
+ translations/Path_sr.qm
+ translations/Path_es-ES.qm
+ translations/Path_sv-SE.qm
+ translations/Path_uk.qm
+ translations/Path_it.qm
+ translations/Path_pt-BR.qm
+ translations/Path_el.qm
+ translations/Path_sk.qm
+ translations/Path_tr.qm
+ translations/Path_sl.qm
diff --git a/src/Mod/Path/InitGui.py b/src/Mod/Path/InitGui.py
index 93d8428ea..36d693994 100644
--- a/src/Mod/Path/InitGui.py
+++ b/src/Mod/Path/InitGui.py
@@ -61,6 +61,9 @@ class PathWorkbench ( Workbench ):
# load the builtin modules
import Path
import PathGui
+ from PySide import QtGui
+ FreeCADGui.addLanguagePath(":/translations")
+ FreeCADGui.addIconPath(":/icons")
# load python modules
from PathScripts import PathProfile
from PathScripts import PathPocket
@@ -98,16 +101,19 @@ class PathWorkbench ( Workbench ):
# Add commands to menu and toolbar
- def QT_TRANSLATE_NOOP(scope, text): return text
- self.appendToolbar(QT_TRANSLATE_NOOP("PathWorkbench","Commands for setting up Project"),projcmdlist)
- self.appendToolbar(QT_TRANSLATE_NOOP("PathWorkbench","Partial Commands"),prepcmdlist)
- self.appendToolbar(QT_TRANSLATE_NOOP("PathWorkbench","Operations"),opcmdlist)
- self.appendToolbar(QT_TRANSLATE_NOOP("PathWorkbench","Commands for grouping,copying, and organizing operations"),modcmdlist)
+ def QT_TRANSLATE_NOOP(scope, text):
+ return text
+ def translate(context,text):
+ return QtGui.QApplication.translate(context, text, None, QtGui.QApplication.UnicodeUTF8).encode("utf8")
+ self.appendToolbar(translate("Path","Project Setup"),projcmdlist)
+ self.appendToolbar(translate("Path","Partial Commands"),prepcmdlist)
+ self.appendToolbar(translate("Path","New Operations"),opcmdlist)
+ self.appendToolbar(translate("Path","Path Modification"),modcmdlist)
- self.appendMenu([QT_TRANSLATE_NOOP("PathWorkbench","Path"),QT_TRANSLATE_NOOP("Path","Project Setup")],projcmdlist)
- self.appendMenu([QT_TRANSLATE_NOOP("PathWorkbench","Path"),QT_TRANSLATE_NOOP("Path","Partial Commands")],prepcmdlist)
- self.appendMenu([QT_TRANSLATE_NOOP("PathWorkbench","Path"),QT_TRANSLATE_NOOP("Path","New Operations")],opcmdlist)
- self.appendMenu([QT_TRANSLATE_NOOP("PathWorkbench","Path"),QT_TRANSLATE_NOOP("Path","Path Modification")],modcmdlist)
+ self.appendMenu([translate("Path","Path"),translate("Path","Project Setup")],projcmdlist)
+ self.appendMenu([translate("Path","Path"),translate("Path","Partial Commands")],prepcmdlist)
+ self.appendMenu([translate("Path","Path"),translate("Path","New Operations")],opcmdlist)
+ self.appendMenu([translate("Path","Path"),translate("Path","Path Modification")],modcmdlist)
# Add preferences pages
import os
@@ -119,6 +125,8 @@ class PathWorkbench ( Workbench ):
return "Gui::PythonWorkbench"
def Activated(self):
+ # update the translation engine
+ FreeCADGui.updateLocale()
Msg("Path workbench activated\n")
def Deactivated(self):
diff --git a/src/Mod/Path/PathScripts/PathArray.py b/src/Mod/Path/PathScripts/PathArray.py
index c9e9be883..8b0604acb 100644
--- a/src/Mod/Path/PathScripts/PathArray.py
+++ b/src/Mod/Path/PathScripts/PathArray.py
@@ -103,8 +103,8 @@ class CommandPathArray:
def GetResources(self):
return {'Pixmap' : 'Path-Array',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathArray","Array"),
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathArray","Creates an array from a selected path")}
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Array","Array"),
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Array","Creates an array from a selected path")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -114,10 +114,10 @@ class CommandPathArray:
# check that the selection contains exactly what we want
selection = FreeCADGui.Selection.getSelection()
if len(selection) != 1:
- FreeCAD.Console.PrintError(translate("PathArray","Please select exactly one path object\n"))
+ FreeCAD.Console.PrintError(translate("Path_Array","Please select exactly one path object\n"))
return
if not(selection[0].isDerivedFrom("Path::Feature")):
- FreeCAD.Console.PrintError(translate("PathArray","Please select exactly one path object\n"))
+ FreeCAD.Console.PrintError(translate("Path_Array","Please select exactly one path object\n"))
return
# if everything is ok, execute and register the transaction in the undo/redo stack
diff --git a/src/Mod/Path/PathScripts/PathComment.py b/src/Mod/Path/PathScripts/PathComment.py
index db22d83e6..098fdb145 100644
--- a/src/Mod/Path/PathScripts/PathComment.py
+++ b/src/Mod/Path/PathScripts/PathComment.py
@@ -105,15 +105,15 @@ class _ViewProviderComment:
class CommandPathComment:
def GetResources(self):
return {'Pixmap' : 'Path-Comment',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathComment","Comment"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Comment","Comment"),
'Accel': "P, C",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathComment","Add a Comment to your CNC program")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Comment","Add a Comment to your CNC program")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
- FreeCAD.ActiveDocument.openTransaction(translate("PathComment","Create a Comment in your CNC program"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Comment","Create a Comment in your CNC program"))
FreeCADGui.addModule("PathScripts.PathComment")
snippet = '''
import Path
diff --git a/src/Mod/Path/PathScripts/PathCompoundExtended.py b/src/Mod/Path/PathScripts/PathCompoundExtended.py
index 655accdfc..a19184d86 100644
--- a/src/Mod/Path/PathScripts/PathCompoundExtended.py
+++ b/src/Mod/Path/PathScripts/PathCompoundExtended.py
@@ -92,16 +92,16 @@ class CommandCompoundExtended:
def GetResources(self):
return {'Pixmap' : 'Path-Compound',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathCompoundExtended","Compound"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_CompoundExtended","Compound"),
'Accel': "P, C",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathCompoundExtended","Creates a Path Compound object")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_CompoundExtended","Creates a Path Compound object")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
- FreeCAD.ActiveDocument.openTransaction(translate("PathCompoundExtended","Create Compound"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_CompoundExtended","Create Compound"))
FreeCADGui.addModule("PathScripts.PathCompoundExtended")
snippet = '''
import Path
diff --git a/src/Mod/Path/PathScripts/PathCopy.py b/src/Mod/Path/PathScripts/PathCopy.py
index 07c0887f8..5337b3ca0 100644
--- a/src/Mod/Path/PathScripts/PathCopy.py
+++ b/src/Mod/Path/PathScripts/PathCopy.py
@@ -80,16 +80,16 @@ class CommandPathCopy:
def GetResources(self):
return {'Pixmap' : 'Path-Copy',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathCopy","Copy"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Copy","Copy"),
'Accel': "P, Y",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathCopy","Creates a linked copy of another path")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Copy","Creates a linked copy of another path")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
- FreeCAD.ActiveDocument.openTransaction(translate("PathCopy","Create Copy"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Copy","Create Copy"))
FreeCADGui.addModule("PathScripts.PathCopy")
consolecode = '''
diff --git a/src/Mod/Path/PathScripts/PathDressup.py b/src/Mod/Path/PathScripts/PathDressup.py
index d38a6c17a..c3b4c82ec 100644
--- a/src/Mod/Path/PathScripts/PathDressup.py
+++ b/src/Mod/Path/PathScripts/PathDressup.py
@@ -95,9 +95,9 @@ class CommandPathDressup:
def GetResources(self):
return {'Pixmap' : 'Path-Dressup',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathDressup","Dress-up"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Dressup","Dress-up"),
'Accel': "P, S",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathDressup","Creates a Path Dess-up object from a selected path")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Dressup","Creates a Path Dess-up object from a selected path")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -107,17 +107,17 @@ class CommandPathDressup:
# check that the selection contains exactly what we want
selection = FreeCADGui.Selection.getSelection()
if len(selection) != 1:
- FreeCAD.Console.PrintError(translate("PathDressup","Please select one path object\n"))
+ FreeCAD.Console.PrintError(translate("Path_Dressup","Please select one path object\n"))
return
if not selection[0].isDerivedFrom("Path::Feature"):
- FreeCAD.Console.PrintError(translate("PathDressup","The selected object is not a path\n"))
+ FreeCAD.Console.PrintError(translate("Path_Dressup","The selected object is not a path\n"))
return
if selection[0].isDerivedFrom("Path::FeatureCompoundPython"):
- FreeCAD.Console.PrintError(translate("PathDressup", "Please select a Path object"))
+ FreeCAD.Console.PrintError(translate("Path_Dressup", "Please select a Path object"))
return
# everything ok!
- FreeCAD.ActiveDocument.openTransaction(translate("PathDressup","Create Dress-up"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Dressup","Create Dress-up"))
FreeCADGui.addModule("PathScripts.PathDressup")
FreeCADGui.addModule("PathScripts.PathUtils")
FreeCADGui.doCommand('obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython","Dressup")')
diff --git a/src/Mod/Path/PathScripts/PathDrilling.py b/src/Mod/Path/PathScripts/PathDrilling.py
index 9c12eba5c..98dfbd311 100644
--- a/src/Mod/Path/PathScripts/PathDrilling.py
+++ b/src/Mod/Path/PathScripts/PathDrilling.py
@@ -146,9 +146,9 @@ class CommandPathDrilling:
def GetResources(self):
return {'Pixmap' : 'Path-Drilling',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathDrilling","Drilling"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Drilling","Drilling"),
'Accel': "P, D",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathDrilling","Creates a Path Drilling object")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Drilling","Creates a Path Drilling object")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -164,7 +164,7 @@ class CommandPathDrilling:
if not selection:
return
# if everything is ok, execute and register the transaction in the undo/redo stack
- FreeCAD.ActiveDocument.openTransaction(translate("PathDrilling","Create Drilling"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Drilling","Create Drilling"))
FreeCADGui.addModule("PathScripts.PathDrilling")
obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython","Drilling")
diff --git a/src/Mod/Path/PathScripts/PathFacePocket.py b/src/Mod/Path/PathScripts/PathFacePocket.py
index 772bcc1e4..8723e5c6f 100644
--- a/src/Mod/Path/PathScripts/PathFacePocket.py
+++ b/src/Mod/Path/PathScripts/PathFacePocket.py
@@ -139,8 +139,8 @@ class CommandPathFacePocket:
def GetResources(self):
return {'Pixmap' : 'Path-FacePocket',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathFacePocket","Face Pocket"),
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathFacePocket","Creates a pocket inside a loop of edges or a face")}
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_FacePocket","Face Pocket"),
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_FacePocket","Creates a pocket inside a loop of edges or a face")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -150,22 +150,22 @@ class CommandPathFacePocket:
# check that the selection contains exactly what we want
selection = FreeCADGui.Selection.getSelectionEx()
if len(selection) != 1:
- FreeCAD.Console.PrintError(translate("PathFacePocket","Please select an edges loop from one object, or a single face\n"))
+ FreeCAD.Console.PrintError(translate("Path_FacePocket","Please select an edges loop from one object, or a single face\n"))
return
if len(selection[0].SubObjects) == 0:
- FreeCAD.Console.PrintError(translate("PathFacePocket","Please select an edges loop from one object, or a single face\n"))
+ FreeCAD.Console.PrintError(translate("Path_FacePocket","Please select an edges loop from one object, or a single face\n"))
return
for s in selection[0].SubObjects:
if s.ShapeType != "Edge":
if (s.ShapeType != "Face") or (len(selection[0].SubObjects) != 1):
- FreeCAD.Console.PrintError(translate("PathFacePocket","Please select only edges or a single face\n"))
+ FreeCAD.Console.PrintError(translate("Path_FacePocket","Please select only edges or a single face\n"))
return
if selection[0].SubObjects[0].ShapeType == "Edge":
try:
import Part
w = Part.Wire(selection[0].SubObjects)
except:
- FreeCAD.Console.PrintError(translate("PathFacePocket","The selected edges don't form a loop\n"))
+ FreeCAD.Console.PrintError(translate("Path_FacePocket","The selected edges don't form a loop\n"))
return
# if everything is ok, execute and register the transaction in the undo/redo stack
diff --git a/src/Mod/Path/PathScripts/PathFaceProfile.py b/src/Mod/Path/PathScripts/PathFaceProfile.py
index b5beeec4b..12d312a6c 100644
--- a/src/Mod/Path/PathScripts/PathFaceProfile.py
+++ b/src/Mod/Path/PathScripts/PathFaceProfile.py
@@ -111,8 +111,8 @@ class CommandPathFaceProfile:
def GetResources(self):
return {'Pixmap' : 'Path-FaceProfile',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathFaceProfile","Face Profile"),
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathFaceProfile","Creates a profile object around a selected face")}
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_FaceProfile","Face Profile"),
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_FaceProfile","Creates a profile object around a selected face")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -122,13 +122,13 @@ class CommandPathFaceProfile:
# check that the selection contains exactly what we want
selection = FreeCADGui.Selection.getSelectionEx()
if len(selection) != 1:
- FreeCAD.Console.PrintError(translate("PathFaceProfile","Please select one face or wire\n"))
+ FreeCAD.Console.PrintError(translate("Path_FaceProfile","Please select one face or wire\n"))
return
if len(selection[0].SubObjects) != 1:
- FreeCAD.Console.PrintError(translate("PathFaceProfile","Please select only one face or wire\n"))
+ FreeCAD.Console.PrintError(translate("Path_FaceProfile","Please select only one face or wire\n"))
return
if not selection[0].SubObjects[0].ShapeType in ["Face","Wire"]:
- FreeCAD.Console.PrintError(translate("PathFaceProfile","Please select only a face or a wire\n"))
+ FreeCAD.Console.PrintError(translate("Path_FaceProfile","Please select only a face or a wire\n"))
return
# if everything is ok, execute and register the transaction in the undo/redo stack
diff --git a/src/Mod/Path/PathScripts/PathFixture.py b/src/Mod/Path/PathScripts/PathFixture.py
index a65cd3fb7..946dc8740 100644
--- a/src/Mod/Path/PathScripts/PathFixture.py
+++ b/src/Mod/Path/PathScripts/PathFixture.py
@@ -116,15 +116,15 @@ class _ViewProviderFixture:
class CommandPathFixture:
def GetResources(self):
return {'Pixmap' : 'Path-Datums',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathFixture","Fixture"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Fixture","Fixture"),
'Accel': "P, F",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathFixture","Creates a Fixture Offset object")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Fixture","Creates a Fixture Offset object")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
- FreeCAD.ActiveDocument.openTransaction(translate("PathFixture","Create a Fixture Offset"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Fixture","Create a Fixture Offset"))
FreeCADGui.addModule("PathScripts.PathFixture")
snippet = '''
import Path
diff --git a/src/Mod/Path/PathScripts/PathHop.py b/src/Mod/Path/PathScripts/PathHop.py
index a8b11ef8d..a3bfc5287 100644
--- a/src/Mod/Path/PathScripts/PathHop.py
+++ b/src/Mod/Path/PathScripts/PathHop.py
@@ -101,9 +101,9 @@ class CommandPathHop:
def GetResources(self):
return {'Pixmap' : 'Path-Hop',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathHop","Hop"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Hop","Hop"),
'Accel': "P, H",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathHop","Creates a Path Hop object")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Hop","Creates a Path Hop object")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -113,13 +113,13 @@ class CommandPathHop:
# check that the selection contains exactly what we want
selection = FreeCADGui.Selection.getSelection()
if len(selection) != 1:
- FreeCAD.Console.PrintError(translate("PathHop","Please select one path object\n"))
+ FreeCAD.Console.PrintError(translate("Path_Hop","Please select one path object\n"))
return
if not selection[0].isDerivedFrom("Path::Feature"):
- FreeCAD.Console.PrintError(translate("PathHop","The selected object is not a path\n"))
+ FreeCAD.Console.PrintError(translate("Path_Hop","The selected object is not a path\n"))
return
- FreeCAD.ActiveDocument.openTransaction(translate("PathHop","Create Hop"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Pat_hHop","Create Hop"))
FreeCADGui.addModule("PathScripts.PathHop")
FreeCADGui.addModule("PathScripts.PathUtils")
FreeCADGui.doCommand('obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython","Hop")')
diff --git a/src/Mod/Path/PathScripts/PathInspect.py b/src/Mod/Path/PathScripts/PathInspect.py
index f97ec7c25..4b17c94b7 100644
--- a/src/Mod/Path/PathScripts/PathInspect.py
+++ b/src/Mod/Path/PathScripts/PathInspect.py
@@ -175,10 +175,10 @@ class CommandPathInspect:
# check that the selection contains exactly what we want
selection = FreeCADGui.Selection.getSelection()
if len(selection) != 1:
- FreeCAD.Console.PrintError(translate("PathInspect","Please select exactly one path object\n"))
+ FreeCAD.Console.PrintError(translate("Path_Inspect","Please select exactly one path object\n"))
return
if not(selection[0].isDerivedFrom("Path::Feature")):
- FreeCAD.Console.PrintError(translate("PathInspect","Please select exactly one path object\n"))
+ FreeCAD.Console.PrintError(translate("Path_Inspect","Please select exactly one path object\n"))
return
# if everything is ok, execute
diff --git a/src/Mod/Path/PathScripts/PathKurve.py b/src/Mod/Path/PathScripts/PathKurve.py
index 0ffb04a34..84758fb45 100644
--- a/src/Mod/Path/PathScripts/PathKurve.py
+++ b/src/Mod/Path/PathScripts/PathKurve.py
@@ -173,15 +173,15 @@ class _ViewProviderKurve:
class CommandPathKurve:
def GetResources(self):
return {'Pixmap' : 'Path-Kurve',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathProfile","Profile"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Kurve","Profile"),
'Accel': "P, P",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathProfile","Creates a Path Profile object from selected edges, using libarea for offset algorithm")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Kurve","Creates a Path Profile object from selected edges, using libarea for offset algorithm")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
- FreeCAD.ActiveDocument.openTransaction(translate("PathKurve","Create a Profile operation using libarea"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Kurve","Create a Profile operation using libarea"))
FreeCADGui.addModule("PathScripts.PathKurve")
snippet = '''
import Path
diff --git a/src/Mod/Path/PathScripts/PathLoadTool.py b/src/Mod/Path/PathScripts/PathLoadTool.py
index ec1a42478..4104528ea 100644
--- a/src/Mod/Path/PathScripts/PathLoadTool.py
+++ b/src/Mod/Path/PathScripts/PathLoadTool.py
@@ -126,9 +126,9 @@ class _ViewProviderLoadTool:
class CommandPathLoadTool:
def GetResources(self):
return {'Pixmap' : 'Path-LoadTool',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathLoadTool","Tool Number to Load"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_LoadTool","Tool Number to Load"),
'Accel': "P, T",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathLoadTool","Tool Number to Load")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_LoadTool","Tool Number to Load")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
diff --git a/src/Mod/Path/PathScripts/PathPlane.py b/src/Mod/Path/PathScripts/PathPlane.py
index 94a5009e3..0ada26706 100644
--- a/src/Mod/Path/PathScripts/PathPlane.py
+++ b/src/Mod/Path/PathScripts/PathPlane.py
@@ -111,15 +111,15 @@ class _ViewProviderPlane:
class CommandPathPlane:
def GetResources(self):
return {'Pixmap' : 'Path-Plane',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathPlane","Selection Plane"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Plane","Selection Plane"),
'Accel': "P, P",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathPlane","Create a Selection Plane object")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Plane","Create a Selection Plane object")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
- FreeCAD.ActiveDocument.openTransaction(translate("PathPlane","Create a Selection Plane object"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Plane","Create a Selection Plane object"))
FreeCADGui.addModule("PathScripts.PathPlane")
snippet = '''
import Path
diff --git a/src/Mod/Path/PathScripts/PathPocket.py b/src/Mod/Path/PathScripts/PathPocket.py
index 78029c75c..40b53aeeb 100644
--- a/src/Mod/Path/PathScripts/PathPocket.py
+++ b/src/Mod/Path/PathScripts/PathPocket.py
@@ -262,9 +262,9 @@ class CommandPathPocket:
def GetResources(self):
return {'Pixmap' : 'Path-Pocket',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathPocket","Pocket"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Pocket","Pocket"),
'Accel': "P, O",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathPocket","Creates a Path Pocket object from a loop of edges or a face")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Pocket","Creates a Path Pocket object from a loop of edges or a face")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -274,26 +274,26 @@ class CommandPathPocket:
# check that the selection contains exactly what we want
selection = FreeCADGui.Selection.getSelectionEx()
if len(selection) != 1:
- FreeCAD.Console.PrintError(translate("PathPocket","Please select an edges loop from one object, or a single face\n"))
+ FreeCAD.Console.PrintError(translate("Path_Pocket","Please select an edges loop from one object, or a single face\n"))
return
if len(selection[0].SubObjects) == 0:
- FreeCAD.Console.PrintError(translate("PathPocket","Please select an edges loop from one object, or a single face\n"))
+ FreeCAD.Console.PrintError(translate("Path_Pocket","Please select an edges loop from one object, or a single face\n"))
return
for s in selection[0].SubObjects:
if s.ShapeType != "Edge":
if (s.ShapeType != "Face") or (len(selection[0].SubObjects) != 1):
- FreeCAD.Console.PrintError(translate("PathPocket","Please select only edges or a single face\n"))
+ FreeCAD.Console.PrintError(translate("Path_Pocket","Please select only edges or a single face\n"))
return
if selection[0].SubObjects[0].ShapeType == "Edge":
try:
import Part
w = Part.Wire(selection[0].SubObjects)
except:
- FreeCAD.Console.PrintError(translate("PathPocket","The selected edges don't form a loop\n"))
+ FreeCAD.Console.PrintError(translate("Path_Pocket","The selected edges don't form a loop\n"))
return
# if everything is ok, execute and register the transaction in the undo/redo stack
- FreeCAD.ActiveDocument.openTransaction(translate("PathPocket","Create Pocket"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Pocket","Create Pocket"))
FreeCADGui.addModule("PathScripts.PathPocket")
FreeCADGui.doCommand('prjexists = False')
FreeCADGui.doCommand('obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython","Pocket")')
diff --git a/src/Mod/Path/PathScripts/PathPost.py b/src/Mod/Path/PathScripts/PathPost.py
index af6b336c5..0fa97dc97 100644
--- a/src/Mod/Path/PathScripts/PathPost.py
+++ b/src/Mod/Path/PathScripts/PathPost.py
@@ -42,15 +42,15 @@ except AttributeError:
class CommandPathPost:
def GetResources(self):
return {'Pixmap' : 'Path-Post',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathPost","Post Process"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Post","Post Process"),
'Accel': "P, P",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathPost","Post Process the selected Project")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Post","Post Process the selected Project")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
- FreeCAD.ActiveDocument.openTransaction(translate("PathPost","Post Process the Selected path(s)"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Post","Post Process the Selected path(s)"))
FreeCADGui.addModule("PathScripts.PathPost")
#select the PathProject that you want to post output from
obj = FreeCADGui.Selection.getSelection()
diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py
index aaf7a0051..6e3a8b16b 100644
--- a/src/Mod/Path/PathScripts/PathProfile.py
+++ b/src/Mod/Path/PathScripts/PathProfile.py
@@ -199,9 +199,9 @@ class ViewProviderProfile:
class CommandPathProfile:
def GetResources(self):
return {'Pixmap' : 'Path-Profile',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathProfile","Profile"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Profile","Profile"),
'Accel': "P, P",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathProfile","Creates a Path Profile object from selected faces")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Profile","Creates a Path Profile object from selected faces")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -216,7 +216,7 @@ class CommandPathProfile:
return
# if everything is ok, execute and register the transaction in the undo/redo stack
- FreeCAD.ActiveDocument.openTransaction(translate("PathProfile","Create Profile"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Profile","Create Profile"))
FreeCADGui.addModule("PathScripts.PathProfile")
obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython","Profile")
diff --git a/src/Mod/Path/PathScripts/PathProject.py b/src/Mod/Path/PathScripts/PathProject.py
index 004fe6b6e..d40cdd0ec 100644
--- a/src/Mod/Path/PathScripts/PathProject.py
+++ b/src/Mod/Path/PathScripts/PathProject.py
@@ -119,9 +119,9 @@ class CommandProject:
def GetResources(self):
return {'Pixmap' : 'Path-Project',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathProject","Project"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Project","Project"),
'Accel': "P, P",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathProject","Creates a Path Project object")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Project","Creates a Path Project object")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -132,7 +132,7 @@ class CommandProject:
for obj in sel:
if obj.isDerivedFrom("Path::Feature"):
incl.append(obj)
- FreeCAD.ActiveDocument.openTransaction(translate("PathProject","Create Project"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Project","Create Project"))
CommandProject.Create(incl)
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
diff --git a/src/Mod/Path/PathScripts/PathStop.py b/src/Mod/Path/PathScripts/PathStop.py
index e7186762f..a275f0f82 100644
--- a/src/Mod/Path/PathScripts/PathStop.py
+++ b/src/Mod/Path/PathScripts/PathStop.py
@@ -110,15 +110,15 @@ class _ViewProviderStop:
class CommandPathStop:
def GetResources(self):
return {'Pixmap' : 'Path-Stop',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathStop","Stop"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Stop","Stop"),
'Accel': "P, C",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathStop","Add Optional or Mandatory Stop to the program")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Stop","Add Optional or Mandatory Stop to the program")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
- FreeCAD.ActiveDocument.openTransaction(translate("PathStop","Add Optional or Mandatory Stop to the program"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_Stop","Add Optional or Mandatory Stop to the program"))
FreeCADGui.addModule("PathScripts.PathStop")
snippet = '''
import Path
diff --git a/src/Mod/Path/PathScripts/PathToolLenOffset.py b/src/Mod/Path/PathScripts/PathToolLenOffset.py
index 0675188d7..f2dc1bc09 100644
--- a/src/Mod/Path/PathScripts/PathToolLenOffset.py
+++ b/src/Mod/Path/PathScripts/PathToolLenOffset.py
@@ -123,15 +123,15 @@ class _ViewProviderTLO:
class CommandPathToolLenOffset:
def GetResources(self):
return {'Pixmap' : 'Path-LengthOffset',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathToolLenOffset","Tool Length Offset"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_ToolLenOffset","Tool Length Offset"),
'Accel': "P, T",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathToolLenOffset","Create a Tool Length Offset object")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_ToolLenOffset","Create a Tool Length Offset object")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
- FreeCAD.ActiveDocument.openTransaction(translate("PathPlane","Create a Selection Plane object"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_ToolLenOffset","Create a Selection Plane object"))
FreeCADGui.addModule("PathScripts.PathToolLenOffset")
snippet = '''
import Path
diff --git a/src/Mod/Path/PathScripts/PathToolTableEdit.py b/src/Mod/Path/PathScripts/PathToolTableEdit.py
index a4bf401a1..debc9b4b5 100644
--- a/src/Mod/Path/PathScripts/PathToolTableEdit.py
+++ b/src/Mod/Path/PathScripts/PathToolTableEdit.py
@@ -37,15 +37,15 @@ except AttributeError:
class CommandPathToolTableEdit:
def GetResources(self):
return {'Pixmap' : 'Path-ToolTable',
- 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathToolTableEdit","EditToolTable"),
+ 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_ToolTableEdit","EditToolTable"),
'Accel': "P, T",
- 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathToolTableEdit","Edits a Tool Table in a selected Project")}
+ 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_ToolTableEdit","Edits a Tool Table in a selected Project")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
- FreeCAD.ActiveDocument.openTransaction(translate("PathToolTableEdit","Edits a Tool Table in a selected Project"))
+ FreeCAD.ActiveDocument.openTransaction(translate("Path_ToolTableEdit","Edits a Tool Table in a selected Project"))
FreeCADGui.doCommand("from PathScripts import TooltableEditor")
FreeCADGui.doCommand("from PathScripts import PathUtils")
FreeCADGui.doCommand('machine = PathUtils.findMachine()')