From ccb2fc63870e4efe1e858643956733395192797f Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Tue, 6 Feb 2018 17:53:43 -0500 Subject: [PATCH] Arch: removing \n from translated strings ref: https://crowdin.com/translate/freecad/548/en-hu#6501126 --- src/Mod/Arch/ArchCommands.py | 4 ++-- src/Mod/Arch/ArchFrame.py | 2 +- src/Mod/Arch/ArchRebar.py | 2 +- src/Mod/Arch/ArchRoof.py | 2 +- src/Mod/Arch/ArchSpace.py | 2 +- src/Mod/Arch/ArchStructure.py | 18 +++++++++--------- src/Mod/Arch/ArchWindow.py | 2 +- src/Mod/Arch/importIFClegacy.py | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Mod/Arch/ArchCommands.py b/src/Mod/Arch/ArchCommands.py index f481a9a862..d9c6231d15 100644 --- a/src/Mod/Arch/ArchCommands.py +++ b/src/Mod/Arch/ArchCommands.py @@ -378,14 +378,14 @@ def getCutVolume(cutplane,shapes): else: p = cutplane.copy().Faces[0] except Part.OCCError: - FreeCAD.Console.PrintMessage(translate("Arch","Invalid cutplane\n")) + FreeCAD.Console.PrintMessage(translate("Arch","Invalid cutplane")+"\n") return None,None,None ce = p.CenterOfMass ax = p.normalAt(0,0) u = p.Vertexes[1].Point.sub(p.Vertexes[0].Point).normalize() v = u.cross(ax) if not bb.isCutPlane(ce,ax): - #FreeCAD.Console.PrintMessage(translate("Arch","No objects are cut by the plane\n")) + #FreeCAD.Console.PrintMessage(translate("Arch","No objects are cut by the plane)+"\n") return None,None,None else: corners = [FreeCAD.Vector(bb.XMin,bb.YMin,bb.ZMin), diff --git a/src/Mod/Arch/ArchFrame.py b/src/Mod/Arch/ArchFrame.py index 90e0f03504..89fc9b5a64 100644 --- a/src/Mod/Arch/ArchFrame.py +++ b/src/Mod/Arch/ArchFrame.py @@ -191,7 +191,7 @@ class _Frame(ArchComponent.Component): try: basepoint = basepointliste[obj.BasePoint] except IndexError: - FreeCAD.Console.PrintMessage(translate("Arch","Crossing point not found in profile.\n")) + FreeCAD.Console.PrintMessage(translate("Arch","Crossing point not found in profile.")+"\n") basepoint = basepointliste[0] else : basepoint = profile.CenterOfMass diff --git a/src/Mod/Arch/ArchRebar.py b/src/Mod/Arch/ArchRebar.py index 3740f65cf8..31864124fd 100644 --- a/src/Mod/Arch/ArchRebar.py +++ b/src/Mod/Arch/ArchRebar.py @@ -141,7 +141,7 @@ class _CommandRebar: print("Arch: error: couldn't extract a base object") return - FreeCAD.Console.PrintMessage(translate("Arch","Please select a base face on a structural object\n")) + FreeCAD.Console.PrintMessage(translate("Arch","Please select a base face on a structural object")+"\n") FreeCADGui.Control.showDialog(ArchComponent.SelectionTaskPanel()) FreeCAD.ArchObserver = ArchComponent.ArchSelectionObserver(nextCommand="Arch_Rebar") FreeCADGui.Selection.addObserver(FreeCAD.ArchObserver) diff --git a/src/Mod/Arch/ArchRoof.py b/src/Mod/Arch/ArchRoof.py index 399958bb9d..981a197b5d 100644 --- a/src/Mod/Arch/ArchRoof.py +++ b/src/Mod/Arch/ArchRoof.py @@ -158,7 +158,7 @@ class _CommandRoof: else: FreeCAD.Console.PrintMessage(translate("Arch","Unable to create a roof")) else: - FreeCAD.Console.PrintMessage(translate("Arch","Please select a base object\n")) + FreeCAD.Console.PrintMessage(translate("Arch","Please select a base object")+"\n") FreeCADGui.Control.showDialog(ArchComponent.SelectionTaskPanel()) FreeCAD.ArchObserver = ArchComponent.ArchSelectionObserver(nextCommand="Arch_Roof") FreeCADGui.Selection.addObserver(FreeCAD.ArchObserver) diff --git a/src/Mod/Arch/ArchSpace.py b/src/Mod/Arch/ArchSpace.py index 742b053cca..a15d788bb1 100644 --- a/src/Mod/Arch/ArchSpace.py +++ b/src/Mod/Arch/ArchSpace.py @@ -238,7 +238,7 @@ class _CommandSpace: FreeCAD.ActiveDocument.commitTransaction() FreeCAD.ActiveDocument.recompute() else: - FreeCAD.Console.PrintMessage(translate("Arch","Please select a base object\n")) + FreeCAD.Console.PrintMessage(translate("Arch","Please select a base object")+"\n") FreeCADGui.Control.showDialog(ArchComponent.SelectionTaskPanel()) FreeCAD.ArchObserver = ArchComponent.ArchSelectionObserver(nextCommand="Arch_Space") FreeCADGui.Selection.addObserver(FreeCAD.ArchObserver) diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py index 5057ddb52f..5ffa354907 100644 --- a/src/Mod/Arch/ArchStructure.py +++ b/src/Mod/Arch/ArchStructure.py @@ -784,20 +784,20 @@ class StructureTaskPanel(ArchComponent.ComponentTaskPanel): FreeCADGui.Selection.removeObserver(self.observer) self.observer = None if Draft.getType(other) != "Structure": - FreeCAD.Console.PrintError(translate("Arch","The picked object is not a Structure\n")) + FreeCAD.Console.PrintError(translate("Arch","The picked object is not a Structure")+"\n") else: if not other.Nodes: - FreeCAD.Console.PrintError(translate("Arch","The picked object has no structural nodes\n")) + FreeCAD.Console.PrintError(translate("Arch","The picked object has no structural nodes")+"\n") else: if (len(self.Object.Nodes) != 2) or (len(other.Nodes) != 2): - FreeCAD.Console.PrintError(translate("Arch","One of these objects has more than 2 nodes\n")) + FreeCAD.Console.PrintError(translate("Arch","One of these objects has more than 2 nodes")+"\n") else: import DraftGeomUtils nodes1 = [self.Object.Placement.multVec(v) for v in self.Object.Nodes] nodes2 = [other.Placement.multVec(v) for v in other.Nodes] intersect = DraftGeomUtils.findIntersection(nodes1[0],nodes1[1],nodes2[0],nodes2[1],True,True) if not intersect: - FreeCAD.Console.PrintError(translate("Arch","Unable to find a suitable intersection point\n")) + FreeCAD.Console.PrintError(translate("Arch","Unable to find a suitable intersection point")+"\n") else: intersect = intersect[0] FreeCAD.Console.PrintMessage(translate("Arch","Intersection found.\n")) @@ -815,23 +815,23 @@ class StructureTaskPanel(ArchComponent.ComponentTaskPanel): FreeCADGui.Selection.removeObserver(self.observer) self.observer = None if Draft.getType(other) != "Structure": - FreeCAD.Console.PrintError(translate("Arch","The picked object is not a Structure\n")) + FreeCAD.Console.PrintError(translate("Arch","The picked object is not a Structure")+"\n") else: if not other.Nodes: - FreeCAD.Console.PrintError(translate("Arch","The picked object has no structural nodes\n")) + FreeCAD.Console.PrintError(translate("Arch","The picked object has no structural nodes")+"\n") else: if (len(self.Object.Nodes) != 2) or (len(other.Nodes) != 2): - FreeCAD.Console.PrintError(translate("Arch","One of these objects has more than 2 nodes\n")) + FreeCAD.Console.PrintError(translate("Arch","One of these objects has more than 2 nodes")+"\n") else: import DraftGeomUtils nodes1 = [self.Object.Placement.multVec(v) for v in self.Object.Nodes] nodes2 = [other.Placement.multVec(v) for v in other.Nodes] intersect = DraftGeomUtils.findIntersection(nodes1[0],nodes1[1],nodes2[0],nodes2[1],True,True) if not intersect: - FreeCAD.Console.PrintError(translate("Arch","Unable to find a suitable intersection point\n")) + FreeCAD.Console.PrintError(translate("Arch","Unable to find a suitable intersection point")+"\n") else: intersect = intersect[0] - FreeCAD.Console.PrintMessage(translate("Arch","Intersection found.\n")) + FreeCAD.Console.PrintMessage(translate("Arch","Intersection found.")+"\n") if DraftGeomUtils.findClosest(intersect,nodes1) == 0: self.Object.Nodes = [self.Object.Placement.inverse().multVec(intersect),self.Object.Nodes[1]] else: diff --git a/src/Mod/Arch/ArchWindow.py b/src/Mod/Arch/ArchWindow.py index 5b71a41860..7c90e20685 100644 --- a/src/Mod/Arch/ArchWindow.py +++ b/src/Mod/Arch/ArchWindow.py @@ -458,7 +458,7 @@ class _CommandWindow: self.tracker.width(self.Thickness) self.tracker.height(self.Height) self.tracker.on() - FreeCAD.Console.PrintMessage(translate("Arch","Pick a face on an existing object or select a preset\n")) + FreeCAD.Console.PrintMessage(translate("Arch","Pick a face on an existing object or select a preset")+"\n") FreeCADGui.Snapper.getPoint(callback=self.getPoint,movecallback=self.update,extradlg=self.taskbox()) #FreeCADGui.Snapper.setSelectMode(True) diff --git a/src/Mod/Arch/importIFClegacy.py b/src/Mod/Arch/importIFClegacy.py index fe260e967f..d26b9a8ff9 100644 --- a/src/Mod/Arch/importIFClegacy.py +++ b/src/Mod/Arch/importIFClegacy.py @@ -112,7 +112,7 @@ def getIfcOpenShell(): try: import ifc_wrapper as IfcImport except ImportError: - FreeCAD.Console.PrintMessage(translate("Arch","Couldn't locate IfcOpenShell\n")) + FreeCAD.Console.PrintMessage(translate("Arch","Couldn't locate IfcOpenShell")+"\n") return False else: IFCOPENSHELL5 = True