Made Arch objects properties translatable - issue #2524

This commit is contained in:
Yorik van Havre
2016-10-07 21:37:15 -03:00
parent 11bbb9e8aa
commit dabccc40b6
22 changed files with 343 additions and 269 deletions

View File

@@ -28,9 +28,12 @@ if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtCore, QtGui
from DraftTools import translate
from PySide.QtCore import QT_TRANSLATE_NOOP
else:
def translate(ctxt,txt):
return txt
def QT_TRANSLATE_NOOP(ctxt,txt):
return txt
__title__="FreeCAD Building"
__author__ = "Yorik van Havre"
@@ -240,7 +243,7 @@ class _Building(ArchFloor._Floor):
"The Building object"
def __init__(self,obj):
ArchFloor._Floor.__init__(self,obj)
obj.addProperty("App::PropertyEnumeration","BuildingType","Arch","The type of this building")
obj.addProperty("App::PropertyEnumeration","BuildingType","Arch",QT_TRANSLATE_NOOP("App::Property","The type of this building"))
self.Type = "Building"
obj.setEditorMode('Height',2)
obj.BuildingType = BuildingTypes