PD: Attempt to translate exceptions in dialogs

Relies on the exception text having been added to the translation database in a previous call to QT_TRANSLATE_NOOP, and put in the 'Exception' context.
This commit is contained in:
Chris Hennes
2023-04-27 17:41:41 -05:00
parent d6f3413da9
commit 2ab9abbb01
8 changed files with 9 additions and 9 deletions

View File

@@ -882,7 +882,7 @@ bool TaskBoxPrimitives::setPrimitive(App::DocumentObject *obj)
Gui::Command::runCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
}
catch (const Base::PyException& e) {
QMessageBox::warning(this, tr("Create primitive"), QString::fromLatin1(e.what()));
QMessageBox::warning(this, tr("Create primitive"), QApplication::translate("Exception", e.what()));
return false;
}
return true;