Path: Fixed translation stuff - issue #2443

This commit is contained in:
Yorik van Havre
2016-02-09 17:05:57 -02:00
parent 8315fc8727
commit d2a6c95993
23 changed files with 119 additions and 111 deletions

View File

@@ -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")')