diff --git a/src/Mod/Mesh/Gui/Workbench.cpp b/src/Mod/Mesh/Gui/Workbench.cpp index 198a02fb73..822d6cdbfc 100644 --- a/src/Mod/Mesh/Gui/Workbench.cpp +++ b/src/Mod/Mesh/Gui/Workbench.cpp @@ -45,6 +45,7 @@ using namespace MeshGui; qApp->translate("Workbench", "Analyze"); qApp->translate("Workbench", "Boolean"); qApp->translate("Workbench", "&Meshes"); + qApp->translate("Workbench", "Cutting"); qApp->translate("Workbench", "Mesh tools"); #endif diff --git a/src/Mod/MeshPart/Gui/MeshFlatteningCommand.py b/src/Mod/MeshPart/Gui/MeshFlatteningCommand.py index 8d09f86c82..3b4a910de4 100644 --- a/src/Mod/MeshPart/Gui/MeshFlatteningCommand.py +++ b/src/Mod/MeshPart/Gui/MeshFlatteningCommand.py @@ -26,6 +26,8 @@ import FreeCADGui as Gui import Part import MeshPartGui +from PySide.QtCore import QT_TRANSLATE_NOOP # for translations + class BaseCommand(object): def __init__(self): pass @@ -41,7 +43,9 @@ class CreateFlatMesh(BaseCommand): """create flat wires from a meshed face""" def GetResources(self): - return {'Pixmap': 'MeshPart_CreateFlatMesh.svg', 'MenuText': 'Unwrap Mesh', 'ToolTip': 'find a flat representation of a mesh'} + return {'Pixmap': 'MeshPart_CreateFlatMesh.svg', + 'MenuText': QT_TRANSLATE_NOOP("MeshPart_FlatteningCommand", "Unwrap Mesh"), + 'ToolTip': QT_TRANSLATE_NOOP("MeshPart_FlatteningCommand", "Find a flat representation of a mesh.")} def Activated(self): import numpy as np @@ -69,10 +73,12 @@ class CreateFlatMesh(BaseCommand): class CreateFlatFace(BaseCommand): """create a flat face from a single face only full faces are supported right now""" - + def GetResources(self): - return {'Pixmap': 'MeshPart_CreateFlatFace.svg', 'MenuText': 'Unwrap Face', 'ToolTip': 'find a flat representation of a mesh'} - + return {'Pixmap': 'MeshPart_CreateFlatFace.svg', + 'MenuText': QT_TRANSLATE_NOOP("MeshPart_FlatteningCommand", "Unwrap Face"), + 'ToolTip': QT_TRANSLATE_NOOP("MeshPart_FlatteningCommand", "Find a flat representation of a mesh.")} + def Activated(self): import numpy as np import flatmesh @@ -96,12 +102,14 @@ class CreateFlatFace(BaseCommand): bs.setPole(u + 1, v + 1, App.Vector(poles[i])) i += 1 Part.show(bs.toShape()) - + def IsActive(self): assert(super(CreateFlatFace, self).IsActive()) assert(isinstance(Gui.Selection.getSelectionEx()[0].SubObjects[0], Part.Face)) return True + +# Test if pybind11 dependency is available try: import flatmesh Gui.addCommand('MeshPart_CreateFlatMesh', CreateFlatMesh())