+ fixed submenu translations for Draft and Arch

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5191 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
yorikvanhavre 2011-11-26 15:09:22 +00:00
parent ae7a021e8e
commit 47db04d380
4 changed files with 68 additions and 16 deletions

View File

@ -47,11 +47,11 @@ class ArchWorkbench(Workbench):
"Draft_Downgrade"]
meshtools = ["Arch_SplitMesh","Arch_MeshToShape",
"Arch_SelectNonSolidMeshes","Arch_RemoveShape"]
self.appendToolbar("Arch tools",archtools)
self.appendToolbar("Draft tools",drafttools)
self.appendMenu(["Architecture","Tools"],meshtools)
self.appendMenu("Architecture",archtools)
self.appendMenu("Draft",drafttools)
self.appendToolbar(str(draftTools.translate("arch","Arch tools")),archtools)
self.appendToolbar(str(draftTools.translate("arch","Draft tools")),drafttools)
self.appendMenu([str(draftTools.translate("arch","Architecture")),str(draftTools.translate("arch","Tools"))],meshtools)
self.appendMenu(str(draftTools.translate("arch","Architecture")),archtools)
self.appendMenu(str(draftTools.translate("arch","Draft")),drafttools)
FreeCADGui.addIconPath(":/icons")
FreeCADGui.addLanguagePath(":/translations")
FreeCADGui.addPreferencePage(":/ui/archprefs-base.ui","Arch")

View File

@ -236,4 +236,32 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>arch</name>
<message>
<location filename="InitGui.py" line="50"/>
<source>Arch tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="51"/>
<source>Draft tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="53"/>
<source>Architecture</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="52"/>
<source>Tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="54"/>
<source>Draft</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -27,7 +27,6 @@ __url__ = ["http://free-cad.sourceforge.net"]
import os
class DraftWorkbench (Workbench):
"the Draft Workbench"
Icon = """
@ -182,8 +181,8 @@ class DraftWorkbench (Workbench):
return
Log ('Loading Draft GUI...\n')
try:
import draftTools,draftGui,macros
self.appendMenu(["&Macro","Installed Macros"],macros.macrosList)
import macros,draftTools,draftGui
self.appendMenu(["&Macro",str(draftTools.translate("draft","Installed Macros"))],macros.macrosList)
except:
pass
self.cmdList = ["Draft_Line","Draft_Wire","Draft_Circle","Draft_Arc",
@ -195,10 +194,10 @@ class DraftWorkbench (Workbench):
"Draft_DelPoint","Draft_Shape2DView"]
self.treecmdList = ["Draft_ApplyStyle","Draft_ToggleDisplayMode","Draft_AddToGroup","Draft_SelectGroup"]
self.lineList = ["Draft_UndoLine","Draft_FinishLine","Draft_CloseLine"]
self.appendToolbar("Draft tools",self.cmdList+self.modList)
self.appendMenu("Draft",self.cmdList+self.modList)
self.appendMenu(["Draft","Display options"],self.treecmdList)
self.appendMenu(["Draft","Wire tools"],self.lineList)
self.appendToolbar(str(draftTools.translate("draft","Draft tools")),self.cmdList+self.modList)
self.appendMenu(str(draftTools.translate("draft","Draft")),self.cmdList+self.modList)
self.appendMenu([str(draftTools.translate("draft","Draft")),str(draftTools.translate("draft","Display options"))],self.treecmdList)
self.appendMenu([str(draftTools.translate("draft","Draft")),str(draftTools.translate("draft","Wire tools"))],self.lineList)
def Activated(self):
FreeCADGui.draftToolBar.Activated()
@ -210,16 +209,16 @@ class DraftWorkbench (Workbench):
if (recipient == "View"):
if (FreeCAD.activeDraftCommand == None):
if (FreeCADGui.Selection.getSelection() != []):
self.appendContextMenu("Draft",self.cmdList+self.modList)
self.appendContextMenu("Display options",self.treecmdList)
self.appendContextMenu(str(draftTools.translate("draft","Draft")),self.cmdList+self.modList)
self.appendContextMenu(str(draftTools.translate("draft","Display options")),self.treecmdList)
else:
self.appendContextMenu("Draft",self.cmdList)
self.appendContextMenu(str(draftTools.translate("draft","Draft")),self.cmdList)
else:
if (FreeCAD.activeDraftCommand.featureName == "Line"):
self.appendContextMenu("",self.lineList)
else:
if (FreeCADGui.Selection.getSelection() != []):
self.appendContextMenu("Display options",self.treecmdList)
self.appendContextMenu(str(draftTools.translate("draft","Display options")),self.treecmdList)
def GetClassName(self):
return "Gui::PythonWorkbench"

View File

@ -1669,5 +1669,30 @@ Values with differences below this value will be treated as same.</source>
<source>Aperture</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="184"/>
<source>Installed Macros</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="196"/>
<source>Draft tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="214"/>
<source>Draft</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="220"/>
<source>Display options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="199"/>
<source>Wire tools</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>