ShipWB: unicode issue 2609 (partial fix)
patch to fix (patially) issue 2609 submitted by a.palazzi in https://forum.freecadweb.org/viewtopic.php?f=10&t=19813#p184360
This commit is contained in:
@@ -41,7 +41,7 @@ class Ship:
|
||||
solids -- Set of solids which will compound the ship hull.
|
||||
"""
|
||||
# Add an unique property to identify the Ship instances
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"Ship",
|
||||
"True if it is a valid ship instance, False otherwise",
|
||||
None))
|
||||
@@ -50,7 +50,7 @@ class Ship:
|
||||
"Ship",
|
||||
tooltip).IsShip = True
|
||||
# Add the main dimensions
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"Ship",
|
||||
"Ship length [m]",
|
||||
None))
|
||||
@@ -58,7 +58,7 @@ class Ship:
|
||||
"Length",
|
||||
"Ship",
|
||||
tooltip).Length = 0.0
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"Ship",
|
||||
"Ship breadth [m]",
|
||||
None))
|
||||
@@ -66,7 +66,7 @@ class Ship:
|
||||
"Breadth",
|
||||
"Ship",
|
||||
tooltip).Breadth = 0.0
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"Ship",
|
||||
"Ship draft [m]",
|
||||
None))
|
||||
@@ -76,7 +76,7 @@ class Ship:
|
||||
tooltip).Draft = 0.0
|
||||
# Add the subshapes
|
||||
obj.Shape = Part.makeCompound(solids)
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"Ship",
|
||||
"Set of external faces of the ship hull",
|
||||
None))
|
||||
@@ -84,7 +84,7 @@ class Ship:
|
||||
"ExternalFaces",
|
||||
"Ship",
|
||||
tooltip)
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"Ship",
|
||||
"Set of weight instances",
|
||||
None))
|
||||
@@ -92,7 +92,7 @@ class Ship:
|
||||
"Weights",
|
||||
"Ship",
|
||||
tooltip).Weights = []
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"Ship",
|
||||
"Set of tank instances",
|
||||
None))
|
||||
@@ -100,7 +100,7 @@ class Ship:
|
||||
"Tanks",
|
||||
"Ship",
|
||||
tooltip).Tanks = []
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"Ship",
|
||||
"Set of load conditions",
|
||||
None))
|
||||
|
||||
@@ -47,7 +47,7 @@ class Tank:
|
||||
ship -- Ship where the tank is allocated.
|
||||
"""
|
||||
# Add an unique property to identify the Weight instances
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"ship_tank",
|
||||
"True if it is a valid tank instance, False otherwise",
|
||||
None))
|
||||
|
||||
@@ -43,7 +43,7 @@ class Weight:
|
||||
ship -- Ship where the weight is allocated.
|
||||
"""
|
||||
# Add an unique property to identify the Weight instances
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"ship_weight",
|
||||
"True if it is a valid weight instance, False otherwise",
|
||||
None))
|
||||
@@ -52,7 +52,7 @@ class Weight:
|
||||
"Weight",
|
||||
tooltip).IsWeight = True
|
||||
# Add the mass property for puntual weights
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"ship_weight",
|
||||
"Mass [kg]",
|
||||
None))
|
||||
@@ -61,7 +61,7 @@ class Weight:
|
||||
"Weight",
|
||||
tooltip).Mass = 0.0
|
||||
# Add the density property for linear elements
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"ship_weight",
|
||||
"Linear density [kg / m]",
|
||||
None))
|
||||
@@ -70,7 +70,7 @@ class Weight:
|
||||
"Weight",
|
||||
tooltip).LineDens = 0.0
|
||||
# Add the area density property for surface elements
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"ship_weight",
|
||||
"Area density [kg / m^2]",
|
||||
None))
|
||||
@@ -79,7 +79,7 @@ class Weight:
|
||||
"Weight",
|
||||
tooltip).AreaDens = 0.0
|
||||
# Add the density property for volumetric elements
|
||||
tooltip = str(QtGui.QApplication.translate(
|
||||
tooltip = unicode(QtGui.QApplication.translate(
|
||||
"ship_weight",
|
||||
"Density [kg / m^3]",
|
||||
None))
|
||||
|
||||
Reference in New Issue
Block a user