Crowdin: represent whitespace in code instead of in string [skip ci]

Removing possible whitespace from strings lead to more accurate translations
This commit is contained in:
luz paz
2021-03-02 10:55:23 -05:00
parent 3f3df7d8e3
commit b94ee8b275
10 changed files with 30 additions and 23 deletions

View File

@@ -321,13 +321,13 @@ class _Stairs(ArchComponent.Component):
if not hasattr(obj,"LastSegment"):
obj.addProperty("App::PropertyLink","LastSegment","Segment and Parts","Last Segment (Flight or Landing) of Arch Stairs connecting to This Segment")
if not hasattr(obj,"AbsTop"):
obj.addProperty("App::PropertyVector","AbsTop","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'absolute' top level of a flight of stairs leads to "))
obj.addProperty("App::PropertyVector","AbsTop","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'absolute' top level of a flight of stairs leads to"))
obj.setEditorMode("AbsTop",1)
if not hasattr(obj,"OutlineLeft"):
obj.addProperty("App::PropertyVectorList","OutlineLeft","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of stairs ")) # Used for Outline of Railing
obj.addProperty("App::PropertyVectorList","OutlineLeft","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of stairs")) # Used for Outline of Railing
obj.setEditorMode("OutlineLeft",1)
if not hasattr(obj,"OutlineRight"):
obj.addProperty("App::PropertyVectorList","OutlineRight","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of stairs "))
obj.addProperty("App::PropertyVectorList","OutlineRight","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of stairs"))
obj.setEditorMode("OutlineRight",1)
# Can't accept 'None' in list, need NaN
@@ -364,10 +364,10 @@ class _Stairs(ArchComponent.Component):
pass
if not hasattr(obj,"OutlineLeftAll"):
obj.addProperty("App::PropertyVectorList","OutlineLeftAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of all segments of stairs "))
obj.addProperty("App::PropertyVectorList","OutlineLeftAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of all segments of stairs"))
obj.setEditorMode("OutlineLeftAll",1) # Used for Outline of Railing
if not hasattr(obj,"OutlineRightAll"):
obj.addProperty("App::PropertyVectorList","OutlineRightAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'right outline' of all segments of stairs "))
obj.addProperty("App::PropertyVectorList","OutlineRightAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'right outline' of all segments of stairs"))
obj.setEditorMode("OutlineRightAll",1)
# Can't accept 'None' in list, need NaN

View File

@@ -2047,7 +2047,7 @@ class DraftToolBar:
self.autogroup = value
self.autoGroupButton.setText(obj.Label)
self.autoGroupButton.setIcon(obj.ViewObject.Icon)
self.autoGroupButton.setToolTip(translate("draft", "Autogroup: ")+obj.Label)
self.autoGroupButton.setToolTip(translate("draft", "Autogroup:") + " " + obj.Label)
self.autoGroupButton.setDown(False)
else:
self.autogroup = None

View File

@@ -330,10 +330,12 @@ class Scale(gui_base_original.Modifier):
bads.append(obj)
if bads:
if len(bads) == 1:
m = translate("draft", "Unable to scale object: ")
m = translate("draft", "Unable to scale object:")
m += " "
m += bads[0].Label
else:
m = translate("draft", "Unable to scale objects: ")
m = translate("draft", "Unable to scale objects:")
m += " "
m += ", ".join([o.Label for o in bads])
m += " - " + translate("draft","This object type cannot be scaled directly. Please use the clone method.")
_err(m)

View File

@@ -135,7 +135,7 @@ def make_arc_3points(points, placement=None, face=False,
try:
utils.type_check([(placement, App.Placement)], name=_name)
except TypeError:
_err(translate("draft","Placement: ") + "{}".format(placement))
_err(translate("draft","Placement:") + " {}".format(placement))
_err(translate("draft","Wrong input: incorrect type of placement."))
return None

View File

@@ -219,8 +219,8 @@ def convertToDxf(dwgfilename):
basename = os.path.basename(dwgfilename)
cmdline = ('"%s" "%s" "%s" "ACAD2000" "DXF" "0" "1" "%s"'
% (teigha, indir, outdir, basename))
FCC.PrintMessage(translate("ImportDWG", "Converting: ")
+ cmdline + "\n")
FCC.PrintMessage(translate("ImportDWG", "Converting:")
+ " " + cmdline + "\n")
if six.PY2:
if isinstance(cmdline, six.text_type):
encoding = sys.getfilesystemencoding()
@@ -272,8 +272,8 @@ def convertToDwg(dxffilename, dwgfilename):
basename = os.path.basename(dxffilename)
cmdline = ('"%s" "%s" "%s" "ACAD2000" "DWG" "0" "1" "%s"'
% (teigha, indir, outdir, basename))
FCC.PrintMessage(translate("ImportDWG", "Converting: ")
+ cmdline + "\n")
FCC.PrintMessage(translate("ImportDWG", "Converting:")
+ " " + cmdline + "\n")
subprocess.call(cmdline, shell=True) # os.system(cmdline)
return dwgfilename
return None

View File

@@ -3862,7 +3862,7 @@ def export(objectslist, filename, nospline=False, lwPoly=False):
filename = filename.encode("utf8")
dxf.saveas(filename)
FCC.PrintMessage("successfully exported " + filename + "\n")
FCC.PrintMessage("successfully exported" + " " + filename + "\n")
else:
errorDXFLib(gui)

View File

@@ -488,5 +488,5 @@ def export(exportList, filename):
# closing
oca.close()
FCC.PrintMessage(translate("importOCA",
"successfully exported ")
+ filename + "\n")
"successfully exported")
+ " " + filename + "\n")

View File

@@ -269,4 +269,4 @@ def export(exportList,filename):
csg.write("}\n}\n")
# close file
csg.close()
FreeCAD.Console.PrintMessage("successfully exported "+filename)
FreeCAD.Console.PrintMessage("successfully exported" + " " + filename)

View File

@@ -149,7 +149,7 @@ QString checkStatusToString(const int &index)
}
if (index > 33 || index < 0)
{
QString message(QObject::tr("Out Of Enum Range: "));
QString message(QObject::tr("Out Of Enum Range:") + " ");
QString number;
number.setNum(index);
message += number;

View File

@@ -6546,21 +6546,24 @@ void ViewProviderSketch::UpdateSolverInformation()
std::string msg;
SketchObject::appendConflictMsg(getSketchObject()->getLastConflicting(), msg);
signalSetUp(QString::fromLatin1("<font color='red'>%1<a href=\"#conflicting\"><span style=\" text-decoration: underline; color:#0000ff; background-color: #F8F8FF;\">%2</span></a><br/>%3</font><br/>")
.arg(tr("Over-constrained sketch "))
.arg(tr("Over-constrained sketch"))
.arg(" ")
.arg(tr("(click to select)"))
.arg(QString::fromStdString(msg)));
signalSolved(QString());
}
else if (hasMalformed) { // malformed constraints
signalSetUp(QString::fromLatin1("<font color='red'>%1<a href=\"#malformed\"><span style=\" text-decoration: underline; color:#0000ff; background-color: #F8F8FF;\">%2</span></a><br/>%3</font><br/>")
.arg(tr("Sketch contains malformed constraints "))
.arg(tr("Sketch contains malformed constraints"))
.arg(" ")
.arg(tr("(click to select)"))
.arg(appendMalformedMsg(getSketchObject()->getLastMalformedConstraints())));
signalSolved(QString());
}
else if (hasConflicts) { // conflicting constraints
signalSetUp(QString::fromLatin1("<font color='red'>%1<a href=\"#conflicting\"><span style=\" text-decoration: underline; color:#0000ff; background-color: #F8F8FF;\">%2</span></a><br/>%3</font><br/>")
.arg(tr("Sketch contains conflicting constraints "))
.arg(tr("Sketch contains conflicting constraints"))
.arg(" ")
.arg(tr("(click to select)"))
.arg(appendConflictMsg(getSketchObject()->getLastConflicting())));
signalSolved(QString());
@@ -6568,7 +6571,8 @@ void ViewProviderSketch::UpdateSolverInformation()
else {
if (hasRedundancies) { // redundant constraints
signalSetUp(QString::fromLatin1("<font color='orangered'>%1<a href=\"#redundant\"><span style=\" text-decoration: underline; color:#0000ff; background-color: #F8F8FF;\">%2</span></a><br/>%3</font><br/>")
.arg(tr("Sketch contains redundant constraints "))
.arg(tr("Sketch contains redundant constraints"))
.arg(" ")
.arg(tr("(click to select)"))
.arg(appendRedundantMsg(getSketchObject()->getLastRedundant())));
}
@@ -6577,7 +6581,8 @@ void ViewProviderSketch::UpdateSolverInformation()
if(hasPartiallyRedundant) {
partiallyRedundantString = QString::fromLatin1("<br/><font color='royalblue'><span style=\"background-color: #ececec;\">%1<a href=\"#partiallyredundant\"><span style=\" text-decoration: underline; color:#0000ff; background-color: #F8F8FF;\">%2</span></a><br/>%3</span></font><br/>")
.arg(tr("Sketch contains partially redundant constraints "))
.arg(tr("Sketch contains partially redundant constraints"))
.arg(" ")
.arg(tr("(click to select)"))
.arg(appendPartiallyRedundantMsg(getSketchObject()->getLastPartiallyRedundant()));
}