Skip to content

Commit

Permalink
Merge pull request #4557 from luzpaz/crowdin/whitespaces-substituted-…
Browse files Browse the repository at this point in the history
…into-code

Crowdin: represent whitespace in code instead of in string
  • Loading branch information
yorikvanhavre committed May 5, 2021
2 parents 665e8bd + 1388db3 commit 131cdd1
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 46 deletions.
10 changes: 5 additions & 5 deletions src/Mod/Arch/ArchStairs.py
Expand Up @@ -321,13 +321,13 @@ def setProperties(self,obj):
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
Expand Down Expand Up @@ -364,10 +364,10 @@ def setProperties(self,obj):
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
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Draft/DraftGui.py
Expand Up @@ -2047,7 +2047,7 @@ def setAutoGroup(self,value=None):
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
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Draft/draftguitools/gui_edit.py
Expand Up @@ -930,8 +930,8 @@ def getObjsFromSelection(self):
selection = Gui.Selection.getSelection()
self.edited_objects = []
if len(selection) > self.maxObjects:
_err = translate("draft", "Too many objects selected, max number set to: ")
App.Console.PrintMessage(_err + str(self.maxObjects) + "\n")
_err = translate("draft", "Too many objects selected, max number set to:")
App.Console.PrintMessage(_err + " " + str(self.maxObjects) + "\n")
return None

for obj in selection:
Expand Down
6 changes: 4 additions & 2 deletions src/Mod/Draft/draftguitools/gui_scale.py
Expand Up @@ -329,10 +329,12 @@ def scale_object(self):
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)
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/Draft/draftmake/make_arc_3points.py
Expand Up @@ -122,20 +122,20 @@ def make_arc_3points(points, placement=None, face=False,
try:
utils.type_check([(points, (list, tuple))], name=_name)
except TypeError:
_err(translate("draft","Points: ") + "{}".format(points))
_err(translate("draft","Points:") + " {}".format(points))
_err(translate("draft","Wrong input: must be list or tuple of three points exactly."))
return None

if len(points) != 3:
_err(translate("draft","Points: ") + "{}".format(points))
_err(translate("draft","Points:") + " {}".format(points))
_err(translate("draft","Wrong input: must be list or tuple of three points exactly."))
return None

if placement is not None:
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

Expand Down
8 changes: 4 additions & 4 deletions src/Mod/Draft/importDWG.py
Expand Up @@ -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()
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/Mod/Draft/importDXF.py
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Draft/importOCA.py
Expand Up @@ -488,5 +488,5 @@ def export(exportList, filename):
# closing
oca.close()
FCC.PrintMessage(translate("importOCA",
"successfully exported ")
+ filename + "\n")
"successfully exported")
+ " " + filename + "\n")
2 changes: 1 addition & 1 deletion src/Mod/Fem/femguiutils/selection_widgets.py
Expand Up @@ -271,7 +271,7 @@ def initElemTypes(self, eltypes):
def initUI(self):
# auch ArchPanel ist coded ohne ui-file
# title
self.setWindowTitle(self.tr("Geometry reference selector for a ") + self.sel_elem_text)
self.setWindowTitle(self.tr("Geometry reference selector for a") + " " + self.sel_elem_text)
# button
self.pushButton_Add = QtGui.QPushButton(self.tr("Add"))
# label
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/OpenSCAD/exportCSG.py
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion src/Mod/Part/Gui/TaskCheckGeometry.cpp
Expand Up @@ -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::fromLatin1(" "));
QString number;
number.setNum(index);
message += number;
Expand Down
5 changes: 0 additions & 5 deletions src/Mod/Path/Gui/Resources/translations/Path.ts
Expand Up @@ -793,11 +793,6 @@
<source>The tool controller to use</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="PathEngrave.py" line="65"/>
<source>The description of the tool </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="PathEngrave.py" line="70"/>
<source>Rapid Safety Height between locations.</source>
Expand Down
20 changes: 10 additions & 10 deletions src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
Expand Up @@ -6548,39 +6548,39 @@ void ViewProviderSketch::UpdateSolverInformation()
else if (dofs < 0) { // over-constrained sketch
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 "))
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("(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 "))
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("(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 "))
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("(click to select)"))
.arg(appendConflictMsg(getSketchObject()->getLastConflicting())));
signalSolved(QString());
}
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 "))
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("(click to select)"))
.arg(appendRedundantMsg(getSketchObject()->getLastRedundant())));
}

QString partiallyRedundantString;

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 "))
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("(click to select)"))
.arg(appendPartiallyRedundantMsg(getSketchObject()->getLastPartiallyRedundant()));
}
Expand Down
5 changes: 0 additions & 5 deletions src/Mod/Start/Gui/Resources/translations/StartPage.ts
Expand Up @@ -343,11 +343,6 @@
<source>An optional image to display as background</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../DlgStartPreferences.ui" line="289"/>
<source>If this is checked, if a style sheet is specified in General preferences, it will be used and override the colors below</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../DlgStartPreferences.ui" line="308"/>
<source>Page background color</source>
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/TechDraw/Gui/Command.cpp
Expand Up @@ -1376,7 +1376,7 @@ void CmdTechDrawExportPageDXF::activated(int iMsg)
//WF? allow more than one TD Page per Dxf file?? 1 TD page = 1 DXF file = 1 drawing?
QString defaultDir;
QString fileName = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(),
QString::fromUtf8(QT_TR_NOOP("Save Dxf File ")),
QString::fromUtf8(QT_TR_NOOP("Save Dxf File")),
defaultDir,
QString::fromUtf8(QT_TR_NOOP("Dxf (*.dxf)")));

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/TechDraw/Gui/MDIViewPage.cpp
Expand Up @@ -854,7 +854,7 @@ void MDIViewPage::saveDXF()
{
QString defaultDir;
QString fileName = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(),
QString::fromUtf8(QT_TR_NOOP("Save Dxf File ")),
QString::fromUtf8(QT_TR_NOOP("Save Dxf File")),
defaultDir,
QString::fromUtf8(QT_TR_NOOP("Dxf (*.dxf)")));
if (fileName.isEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/TechDraw/Gui/mrichtextedit.cpp
Expand Up @@ -102,7 +102,7 @@ MRichTextEdit::MRichTextEdit(QWidget *parent, QString textIn) : QWidget(parent)
<< tr("Heading 3")
<< tr("Heading 4")
<< tr("Monospace")
<< tr(" ");
<< QString::fromUtf8(" ");
f_paragraph->addItems(m_paragraphItems);

connect(f_paragraph, SIGNAL(activated(int)),
Expand Down

0 comments on commit 131cdd1

Please sign in to comment.