Merge pull request #5371 from Roy-043/Arch-Fix-translation-issues

Arch: Fix translation issues
This commit is contained in:
Yorik van Havre
2022-01-12 13:37:52 +01:00
committed by GitHub
5 changed files with 34 additions and 34 deletions

View File

@@ -172,9 +172,9 @@ class CommandArchGrid:
def GetResources(self):
return {'Pixmap' : 'Arch_Grid',
'MenuText': QT_TRANSLATE_NOOP("Arch_Axis","Grid"),
'MenuText': QT_TRANSLATE_NOOP("Arch_Grid","Grid"),
'Accel': "A, X",
'ToolTip': QT_TRANSLATE_NOOP("Arch_Axis","Creates a customizable grid object")}
'ToolTip': QT_TRANSLATE_NOOP("Arch_Grid","Creates a customizable grid object")}
def Activated(self):

View File

@@ -334,7 +334,7 @@ class CommandPanelCut:
return {'Pixmap' : 'Arch_Panel_Cut',
'MenuText': QT_TRANSLATE_NOOP("Arch_Panel_Cut","Panel Cut"),
'Accel': "P, C",
'ToolTip': QT_TRANSLATE_NOOP("Arch_Panel_Sheet","Creates 2D views of selected panels")}
'ToolTip': QT_TRANSLATE_NOOP("Arch_Panel_Cut","Creates 2D views of selected panels")}
def IsActive(self):

View File

@@ -144,7 +144,7 @@ class _CommandPipeConnector:
return {'Pixmap' : 'Arch_PipeConnector',
'MenuText': QT_TRANSLATE_NOOP("Arch_PipeConnector","Connector"),
'Accel': "P, C",
'ToolTip': QT_TRANSLATE_NOOP("Arch_Pipe","Creates a connector between 2 or 3 selected pipes")}
'ToolTip': QT_TRANSLATE_NOOP("Arch_PipeConnector","Creates a connector between 2 or 3 selected pipes")}
def IsActive(self):

View File

@@ -193,8 +193,8 @@ class CommandStructuresFromSelection:
def GetResources(self):
return {'Pixmap': 'Arch_MultipleStructures',
'MenuText': QT_TRANSLATE_NOOP("Arch_Structure", "Multiple Structures"),
'ToolTip': QT_TRANSLATE_NOOP("Arch_Structure", "Create multiple Arch Structure objects from a selected base, using each selected edge as an extrusion path")}
'MenuText': QT_TRANSLATE_NOOP("Arch_StructuresFromSelection", "Multiple Structures"),
'ToolTip': QT_TRANSLATE_NOOP("Arch_StructuresFromSelection", "Create multiple Arch Structure objects from a selected base, using each selected edge as an extrusion path")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -230,8 +230,8 @@ class CommandStructuralSystem:
def GetResources(self):
return {'Pixmap': 'Arch_StructuralSystem',
'MenuText': QT_TRANSLATE_NOOP("Arch_Structure", "Structural System"),
'ToolTip': QT_TRANSLATE_NOOP("Arch_Structure", "Create a structural system object from a selected structure and axis")}
'MenuText': QT_TRANSLATE_NOOP("Arch_StructuralSystem", "Structural System"),
'ToolTip': QT_TRANSLATE_NOOP("Arch_StructuralSystem", "Create a structural system object from a selected structure and axis")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
@@ -1466,8 +1466,8 @@ if FreeCAD.GuiUp:
def GetCommands(self):
return ("Arch_Structure", "Arch_StructuralSystem", "Arch_StructuresFromSelection")
def GetResources(self):
return { "MenuText": QT_TRANSLATE_NOOP("Arch_Structure", "Structure tools"),
"ToolTip": QT_TRANSLATE_NOOP("Arch_Structure", "Structure tools")
return { "MenuText": QT_TRANSLATE_NOOP("Arch_StructureTools", "Structure tools"),
"ToolTip": QT_TRANSLATE_NOOP("Arch_StructureTools", "Structure tools")
}
def IsActive(self):
return not FreeCAD.ActiveDocument is None

View File

@@ -68,7 +68,7 @@ class ArchWorkbench(FreeCADGui.Workbench):
# Set up command lists
self.archtools = ["Arch_Wall",
([QT_TRANSLATE_NOOP("Arch", "Structure tools")],
([QT_TRANSLATE_NOOP("Workbench", "Structure tools")],
list(stru_group.GetCommands(stru_group))), # tuple len=2: submenu
("Arch_StructureTools", ), # tuple len=1: toolbar flyout
"Arch_Rebar_Submenu", # will be replaced or removed
@@ -82,13 +82,13 @@ class ArchWorkbench(FreeCADGui.Workbench):
"Arch_Reference",
"Arch_Window",
"Arch_Roof",
([QT_TRANSLATE_NOOP("Arch", "Axis tools")],
([QT_TRANSLATE_NOOP("Workbench", "Axis tools")],
list(axis_group.GetCommands(axis_group))),
("Arch_AxisTools", ),
"Arch_SectionPlane",
"Arch_Space",
"Arch_Stairs",
([QT_TRANSLATE_NOOP("Arch", "Panel tools")],
([QT_TRANSLATE_NOOP("Workbench", "Panel tools")],
list(pan_group.GetCommands(pan_group))),
("Arch_PanelTools", ),
"Arch_Equipment",
@@ -96,11 +96,11 @@ class ArchWorkbench(FreeCADGui.Workbench):
"Arch_Fence",
"Arch_Truss",
"Arch_Profile",
([QT_TRANSLATE_NOOP("Arch", "Material tools")],
([QT_TRANSLATE_NOOP("Workbench", "Material tools")],
list(mat_group.GetCommands(mat_group))),
("Arch_MaterialTools", ),
"Arch_Schedule",
([QT_TRANSLATE_NOOP("Arch", "Pipe tools")],
([QT_TRANSLATE_NOOP("Workbench", "Pipe tools")],
list(pipe_group.GetCommands(pipe_group))),
("Arch_PipeTools", ),
"Arch_CutPlane",
@@ -134,15 +134,15 @@ class ArchWorkbench(FreeCADGui.Workbench):
return tuple(RebarTools.RebarCommands + ["Arch_Rebar"])
def GetResources(self):
_tooltip = ("Create various types of rebars, "
"including U-shaped, L-shaped, and stirrup")
return {'MenuText': QT_TRANSLATE_NOOP("Arch", 'Rebar tools'),
'ToolTip': QT_TRANSLATE_NOOP("Arch", _tooltip)}
return {'MenuText': QT_TRANSLATE_NOOP("Arch_RebarTools", "Rebar tools"),
'ToolTip': QT_TRANSLATE_NOOP("Arch_RebarTools",
"Create various types of rebars, "
"including U-shaped, L-shaped, and stirrup")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
FreeCADGui.addCommand('Arch_RebarTools', RebarGroupCommand())
self.archtools[3] = ([QT_TRANSLATE_NOOP("Arch", "Rebar tools")],
self.archtools[3] = ([QT_TRANSLATE_NOOP("Workbench", "Rebar tools")],
RebarTools.RebarCommands + ["Arch_Rebar"])
self.archtools[4] = ("Arch_RebarTools", )
@@ -159,38 +159,38 @@ class ArchWorkbench(FreeCADGui.Workbench):
QT_TRANSLATE_NOOP("Workbench", "Arch tools"),
self.archtools)
it.init_toolbar(self,
QT_TRANSLATE_NOOP("Draft", "Draft creation tools"),
QT_TRANSLATE_NOOP("Workbench", "Draft creation tools"),
self.draft_drawing_commands)
it.init_toolbar(self,
QT_TRANSLATE_NOOP("Draft", "Draft annotation tools"),
QT_TRANSLATE_NOOP("Workbench", "Draft annotation tools"),
self.draft_annotation_commands)
it.init_toolbar(self,
QT_TRANSLATE_NOOP("Draft", "Draft modification tools"),
QT_TRANSLATE_NOOP("Workbench", "Draft modification tools"),
self.draft_modification_commands)
# Set up menus
it.init_menu(self,
[QT_TRANSLATE_NOOP("Arch", "&Arch"),
QT_TRANSLATE_NOOP("Arch", "Utilities")],
[QT_TRANSLATE_NOOP("Workbench", "&Arch"),
QT_TRANSLATE_NOOP("Workbench", "Utilities")],
self.utilities)
it.init_menu(self,
[QT_TRANSLATE_NOOP("Arch", "&Arch")],
[QT_TRANSLATE_NOOP("Workbench", "&Arch")],
self.archtools)
it.init_menu(self,
[QT_TRANSLATE_NOOP("Arch", "&Draft"),
QT_TRANSLATE_NOOP("Arch", "Creation")],
[QT_TRANSLATE_NOOP("Workbench", "&Draft"),
QT_TRANSLATE_NOOP("Workbench", "Creation")],
self.draft_drawing_commands)
it.init_menu(self,
[QT_TRANSLATE_NOOP("Arch", "&Draft"),
QT_TRANSLATE_NOOP("Arch", "Annotation")],
[QT_TRANSLATE_NOOP("Workbench", "&Draft"),
QT_TRANSLATE_NOOP("Workbench", "Annotation")],
self.draft_annotation_commands)
it.init_menu(self,
[QT_TRANSLATE_NOOP("Arch", "&Draft"),
QT_TRANSLATE_NOOP("Arch", "Modification")],
[QT_TRANSLATE_NOOP("Workbench", "&Draft"),
QT_TRANSLATE_NOOP("Workbench", "Modification")],
self.draft_modification_commands)
it.init_menu(self,
[QT_TRANSLATE_NOOP("Arch", "&Draft"),
QT_TRANSLATE_NOOP("Arch", "Utilities")],
[QT_TRANSLATE_NOOP("Workbench", "&Draft"),
QT_TRANSLATE_NOOP("Workbench", "Utilities")],
self.draft_utility_commands)
FreeCADGui.addIconPath(":/icons")