From 65425b5e309c7e21bc2de2122faafd186856ed1a Mon Sep 17 00:00:00 2001 From: Roy Date: Mon, 10 Jan 2022 10:26:08 +0100 Subject: [PATCH] Arch: Fix translation issues --- src/Mod/Arch/ArchAxis.py | 4 +-- src/Mod/Arch/ArchPanel.py | 2 +- src/Mod/Arch/ArchPipe.py | 2 +- src/Mod/Arch/ArchStructure.py | 12 ++++----- src/Mod/Arch/InitGui.py | 48 +++++++++++++++++------------------ 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/Mod/Arch/ArchAxis.py b/src/Mod/Arch/ArchAxis.py index 16d808f6a4d1..dc810df8918c 100644 --- a/src/Mod/Arch/ArchAxis.py +++ b/src/Mod/Arch/ArchAxis.py @@ -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): diff --git a/src/Mod/Arch/ArchPanel.py b/src/Mod/Arch/ArchPanel.py index c6badcac1ed7..13fe398bd8c8 100644 --- a/src/Mod/Arch/ArchPanel.py +++ b/src/Mod/Arch/ArchPanel.py @@ -334,7 +334,7 @@ def GetResources(self): 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): diff --git a/src/Mod/Arch/ArchPipe.py b/src/Mod/Arch/ArchPipe.py index 3ae455c1128c..80c5bb1b62a0 100644 --- a/src/Mod/Arch/ArchPipe.py +++ b/src/Mod/Arch/ArchPipe.py @@ -144,7 +144,7 @@ def GetResources(self): 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): diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py index 0b08fc4a73eb..e7c59ead89be 100644 --- a/src/Mod/Arch/ArchStructure.py +++ b/src/Mod/Arch/ArchStructure.py @@ -193,8 +193,8 @@ def __init__(self): 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 @@ def __init__(self): 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 @@ class _ArchStructureGroupCommand: 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 diff --git a/src/Mod/Arch/InitGui.py b/src/Mod/Arch/InitGui.py index 5f1927b60f83..870d48b2f07f 100644 --- a/src/Mod/Arch/InitGui.py +++ b/src/Mod/Arch/InitGui.py @@ -68,7 +68,7 @@ def QT_TRANSLATE_NOOP(context, text): # 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 @@ def QT_TRANSLATE_NOOP(context, text): "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 @@ def QT_TRANSLATE_NOOP(context, text): "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 @@ def GetCommands(self): 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 @@ def IsActive(self): 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")