From 762261d25115e00e724629a8f90ace67506c2bdd Mon Sep 17 00:00:00 2001 From: wandererfan Date: Sat, 14 Sep 2024 09:43:06 -0400 Subject: [PATCH 1/2] [TD]Use correct translation function (fix #317) - another translation cycle will have to run before the change is apparent. --- src/Mod/TechDraw/Gui/TaskSectionView.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/TechDraw/Gui/TaskSectionView.cpp b/src/Mod/TechDraw/Gui/TaskSectionView.cpp index 1ce02bac58..df0aec33ca 100644 --- a/src/Mod/TechDraw/Gui/TaskSectionView.cpp +++ b/src/Mod/TechDraw/Gui/TaskSectionView.cpp @@ -150,8 +150,7 @@ void TaskSectionView::setUiPrimary() //don't allow updates until a direction is picked ui->pbUpdateNow->setEnabled(false); ui->cbLiveUpdate->setEnabled(false); - QString msgLiteral = - QString::fromUtf8(QT_TRANSLATE_NOOP("TaskSectionView", "No direction set")); + QString msgLiteral = QObject::tr("No direction set"); ui->lPendingUpdates->setText(msgLiteral); } From 6bc64cd9efa0d8f8ac46b9895b9a44a1c7526289 Mon Sep 17 00:00:00 2001 From: wandererfan Date: Sat, 14 Sep 2024 09:48:33 -0400 Subject: [PATCH 2/2] [TD]Use correct translate function (fix 335) - another translation cycle will need to occur before the change is apparent. --- src/Mod/TechDraw/Gui/Command.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/TechDraw/Gui/Command.cpp b/src/Mod/TechDraw/Gui/Command.cpp index 0e0823bd89..4f87d81f89 100644 --- a/src/Mod/TechDraw/Gui/Command.cpp +++ b/src/Mod/TechDraw/Gui/Command.cpp @@ -421,9 +421,11 @@ void CmdTechDrawView::activated(int iMsg) // If nothing was selected, then we offer to insert SVG or Images files. bool dontShowAgain = hGrp->GetBool("DontShowInsertFileMessage", false); if (!dontShowAgain) { + auto msgText = QObject::tr("If you want to insert a view from existing objects, please select them before invoking this tool. Without a selection, a file browser will open, to insert a SVG or image file."); QMessageBox msgBox; - msgBox.setText(msgBox.tr("If you want to insert a view from existing objects, please select them before invoking this tool. Without a selection, a file browser will open, to insert a SVG or image file.")); - QCheckBox dontShowCheckBox(msgBox.tr("Do not show this message again"), &msgBox); + msgBox.setText(msgText); + auto dontShowMsg = QObject::tr("Do not show this message again"); + QCheckBox dontShowCheckBox(dontShowMsg, &msgBox); msgBox.setCheckBox(&dontShowCheckBox); QPushButton* okButton = msgBox.addButton(QMessageBox::Ok);