Move printMessage in ArchCommands.
Messages are translatable.
This commit is contained in:
committed by
Yorik van Havre
parent
15b70be51b
commit
41307ef5a1
@@ -1,3 +1,5 @@
|
||||
# -*- coding: utf8 -*-
|
||||
|
||||
#***************************************************************************
|
||||
#* *
|
||||
#* Copyright (c) 2011 *
|
||||
@@ -214,15 +216,15 @@ class _CommandBuilding:
|
||||
else:
|
||||
warning = True
|
||||
if warning :
|
||||
message = "You can put anything but Site and Building object in a Building object.\n\
|
||||
message = translate( "Arch" , "You can put anything but Site and Building object in a Building object.\n\
|
||||
Building object are not allowed to accept Site and Building object.\n\
|
||||
Site and Building objects will be removed from the selection.\n\
|
||||
You can change that in the preferences.\n"
|
||||
self.printMessage( message )
|
||||
You can change that in the preferences.\n" )
|
||||
ArchCommands.printMessage( message )
|
||||
if sel and len(buildingobj) == 0:
|
||||
message = "There is no valid object in the selection.\n\
|
||||
Building creation aborted.\n"
|
||||
self.printMessage( message )
|
||||
message = translate( "Arch" , "There is no valid object in the selection.\n\
|
||||
Building creation aborted.\n" )
|
||||
ArchCommands.printMessage( message )
|
||||
else :
|
||||
ss = "[ "
|
||||
for o in buildingobj:
|
||||
@@ -234,11 +236,6 @@ Building creation aborted.\n"
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
def printMessage(self, message):
|
||||
FreeCAD.Console.PrintMessage(translate("Arch", message))
|
||||
if FreeCAD.GuiUp :
|
||||
reply = QtGui.QMessageBox.information(None,"", message)
|
||||
|
||||
class _Building(ArchFloor._Floor):
|
||||
"The Building object"
|
||||
def __init__(self,obj):
|
||||
|
||||
Reference in New Issue
Block a user