Path: moved '\n' out of translation()

Instead it is appended to the end of the `FreeCAD.Console.Print.....()`
This commit is contained in:
luz.paz
2018-02-10 09:03:38 -05:00
committed by Yorik van Havre
parent 3b8bb6a41c
commit 52fa10d9ac
3 changed files with 12 additions and 12 deletions

View File

@@ -103,11 +103,11 @@ selection = FreeCADGui.Selection.getSelection()
proj = selection[0].InList[0] #get the group that the selectied object is inside
if len(selection) != 1:
FreeCAD.Console.PrintError(translate("Path_Copy", "Please select one path object\\n"))
FreeCAD.Console.PrintError(translate("Path_Copy", "Please select one path object")+"\n")
selGood = False
if not selection[0].isDerivedFrom("Path::Feature"):
FreeCAD.Console.PrintError(translate("Path_Copy", "The selected object is not a path\\n"))
FreeCAD.Console.PrintError(translate("Path_Copy", "The selected object is not a path")+"\n")
selGood = False
if selGood:

View File

@@ -1048,11 +1048,11 @@ class CommandDressupDogbone:
# check that the selection contains exactly what we want
selection = FreeCADGui.Selection.getSelection()
if len(selection) != 1:
FreeCAD.Console.PrintError(translate("Path_DressupDogbone", "Please select one path object\n"))
FreeCAD.Console.PrintError(translate("Path_DressupDogbone", "Please select one path object")+"\n")
return
baseObject = selection[0]
if not baseObject.isDerivedFrom("Path::Feature"):
FreeCAD.Console.PrintError(translate("Path_DressupDogbone", "The selected object is not a path\n"))
FreeCAD.Console.PrintError(translate("Path_DressupDogbone", "The selected object is not a path")+"\n")
return
# everything ok!

View File

@@ -61,7 +61,7 @@ class CommandPathSanity:
obj = FreeCADGui.Selection.getSelectionEx()[0].Object
self.baseobj = obj.Base
if self.baseobj is None:
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "The Job has no selected Base object.\n"))
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "The Job has no selected Base object.")+"\n")
return
self.__review(obj)
@@ -73,11 +73,11 @@ class CommandPathSanity:
# FreeCAD.Console.PrintWarning(translate("Path_Sanity", "It appears the machine limits haven't been set. Not able to check path extents.\n"))
if obj.PostProcessor == '':
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "A Postprocessor has not been selected.\n"))
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "A Postprocessor has not been selected.")+"\n")
clean = False
if obj.PostProcessorOutputFile == '':
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "No output file is named. You'll be prompted during postprocessing.\n"))
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "No output file is named. You'll be prompted during postprocessing.")+"\n")
clean = False
for tc in obj.ToolController:
@@ -137,7 +137,7 @@ class CommandPathSanity:
clean = False
if len(obj.ToolController) == 0: #need at least one active TC
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "A Tool Controller was not found. Default values are used which is dangerous. Please add a Tool Controller.\n"))
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "A Tool Controller was not found. Default values are used which is dangerous. Please add a Tool Controller.")+"\n")
clean = False
if clean:
@@ -146,16 +146,16 @@ class CommandPathSanity:
def __checkTC(self, tc):
clean = True
if tc.ToolNumber == 0:
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "Tool Controller: " + str(tc.Label) + " is using ID 0 which the undefined default. Please set a real tool.\n"))
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "Tool Controller: " + str(tc.Label) + " is using ID 0 which the undefined default. Please set a real tool.")+"\n")
clean = False
if tc.HorizFeed == 0:
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "Tool Controller: " + str(tc.Label) + " has a 0 value for the Horizontal feed rate\n"))
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "Tool Controller: " + str(tc.Label) + " has a 0 value for the Horizontal feed rate")+"\n")
clean = False
if tc.VertFeed == 0:
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "Tool Controller: " + str(tc.Label) + " has a 0 value for the Vertical feed rate\n"))
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "Tool Controller: " + str(tc.Label) + " has a 0 value for the Vertical feed rate")+"\n")
clean = False
if tc.SpindleSpeed == 0:
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "Tool Controller: " + str(tc.Label) + " has a 0 value for the spindle speed\n"))
FreeCAD.Console.PrintWarning(translate("Path_Sanity", "Tool Controller: " + str(tc.Label) + " has a 0 value for the spindle speed")+"\n")
clean = False
return clean