From 52fa10d9acf80ad886e5699de3564e34a526d488 Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Sat, 10 Feb 2018 09:03:38 -0500 Subject: [PATCH] Path: moved '\n' out of translation() Instead it is appended to the end of the `FreeCAD.Console.Print.....()` --- src/Mod/Path/PathScripts/PathCopy.py | 4 ++-- src/Mod/Path/PathScripts/PathDressupDogbone.py | 4 ++-- src/Mod/Path/PathScripts/PathSanity.py | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathCopy.py b/src/Mod/Path/PathScripts/PathCopy.py index b95b844467..54cf02bab1 100644 --- a/src/Mod/Path/PathScripts/PathCopy.py +++ b/src/Mod/Path/PathScripts/PathCopy.py @@ -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: diff --git a/src/Mod/Path/PathScripts/PathDressupDogbone.py b/src/Mod/Path/PathScripts/PathDressupDogbone.py index e164e9725d..928bab5b76 100644 --- a/src/Mod/Path/PathScripts/PathDressupDogbone.py +++ b/src/Mod/Path/PathScripts/PathDressupDogbone.py @@ -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! diff --git a/src/Mod/Path/PathScripts/PathSanity.py b/src/Mod/Path/PathScripts/PathSanity.py index 14403d0bf3..9153788fbc 100644 --- a/src/Mod/Path/PathScripts/PathSanity.py +++ b/src/Mod/Path/PathScripts/PathSanity.py @@ -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