Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch: Fix translation issues #5371

Merged
merged 1 commit into from Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Mod/Arch/ArchAxis.py
Expand Up @@ -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):

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Arch/ArchPanel.py
Expand Up @@ -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):

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Arch/ArchPipe.py
Expand Up @@ -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):

Expand Down
12 changes: 6 additions & 6 deletions src/Mod/Arch/ArchStructure.py
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
48 changes: 24 additions & 24 deletions src/Mod/Arch/InitGui.py
Expand Up @@ -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
Expand All @@ -82,25 +82,25 @@ 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",
"Arch_Frame",
"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",
Expand Down Expand Up @@ -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", )

Expand All @@ -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")
Expand Down