From 2be234f59b016bffed4081ec7cefbec17036f264 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Thu, 20 Apr 2023 16:11:54 -0500 Subject: [PATCH] PD: Helix parameters status translation --- src/Mod/PartDesign/Gui/TaskHelixParameters.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp b/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp index 876e92158d..a0d52c2805 100644 --- a/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp @@ -275,16 +275,17 @@ void TaskHelixParameters::updateStatus() { auto pcHelix = static_cast(vp->getObject()); auto status = std::string(pcHelix->getStatusString()); + QString translatedStatus; if (status.compare("Valid") == 0 || status.compare("Touched") == 0) { - if (pcHelix->safePitch() > pcHelix->Pitch.getValue()) - status = "Warning: helix might be self intersecting"; - else - status = ""; + if (pcHelix->safePitch() > pcHelix->Pitch.getValue()) { + translatedStatus = tr("Warning: helix might be self intersecting"); + } } // if the helix touches itself along a single helical edge we get this error - else if (status.compare("NCollection_IndexedDataMap::FindFromKey") == 0) - status = "Error: helix touches itself"; - ui->labelMessage->setText(QString::fromUtf8(status.c_str())); + else if (status.compare("NCollection_IndexedDataMap::FindFromKey") == 0) { + translatedStatus = tr("Error: helix touches itself"); + } + ui->labelMessage->setText(translatedStatus); } void TaskHelixParameters::updateUI()