[TD] get rid of trailing newlines
as discussed with luzpaz in https://github.com/FreeCAD/FreeCAD/pull/3735 there shouldn't be trailing newlines in translated strings. - Moreover fix the logic of the output dialog text
This commit is contained in:
@@ -222,10 +222,11 @@ bool ViewProviderPage::onDelete(const std::vector<std::string> &)
|
||||
QString bodyMessage;
|
||||
QTextStream bodyMessageStream(&bodyMessage);
|
||||
bodyMessageStream << qApp->translate("Std_Delete",
|
||||
"The page is not empty, therefore the\nfollowing referencing objects might be lost.\n\n"
|
||||
"Are you sure you want to continue?");
|
||||
"The page is not empty, therefore the\nfollowing referencing objects might be lost:");
|
||||
bodyMessageStream << '\n';
|
||||
for (auto ObjIterator : objs)
|
||||
bodyMessageStream << '\n' << QString::fromUtf8(ObjIterator->Label.getValue());
|
||||
bodyMessageStream << "\n\nAre you sure you want to continue?";
|
||||
// show and evaluate the dialog
|
||||
int DialogResult = QMessageBox::warning(Gui::getMainWindow(),
|
||||
qApp->translate("Std_Delete", "Object dependencies"), bodyMessage,
|
||||
|
||||
@@ -193,7 +193,8 @@ bool ViewProviderProjGroup::onDelete(const std::vector<std::string> &)
|
||||
// if there are section or detail views we cannot delete because this would break them
|
||||
if (!ViewList.empty()) {
|
||||
bodyMessageStream << qApp->translate("Std_Delete",
|
||||
"The group cannot be deleted because its items have the following\nsection or detail views, or leader lines that would get broken:\n");
|
||||
"The group cannot be deleted because its items have the following\nsection or detail views, or leader lines that would get broken:");
|
||||
bodyMessageStream << '\n';
|
||||
for (auto ListIterator : ViewList)
|
||||
bodyMessageStream << '\n' << QString::fromUtf8(ListIterator.c_str());
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
@@ -206,10 +207,11 @@ bool ViewProviderProjGroup::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
// generate dialog
|
||||
bodyMessageStream << qApp->translate("Std_Delete",
|
||||
"The projection group is not empty, therefore\nthe following referencing objects might be lost.\n\n"
|
||||
"Are you sure you want to continue?\n");
|
||||
"The projection group is not empty, therefore\nthe following referencing objects might be lost:");
|
||||
bodyMessageStream << '\n';
|
||||
for (auto ObjIterator : objs)
|
||||
bodyMessageStream << '\n' << QString::fromUtf8(ObjIterator->Label.getValue());
|
||||
bodyMessageStream << "\n\nAre you sure you want to continue?";
|
||||
// show and evaluate dialog
|
||||
int DialogResult = QMessageBox::warning(Gui::getMainWindow(),
|
||||
qApp->translate("Std_Delete", "Object dependencies"), bodyMessage,
|
||||
|
||||
@@ -195,9 +195,9 @@ bool ViewProviderTemplate::onDelete(const std::vector<std::string> &)
|
||||
QString bodyMessage;
|
||||
QTextStream bodyMessageStream(&bodyMessage);
|
||||
bodyMessageStream << qApp->translate("Std_Delete",
|
||||
"The following referencing objects might break.\n\n"
|
||||
"Are you sure you want to continue?\n");
|
||||
bodyMessageStream << '\n' << QString::fromUtf8(page->Label.getValue());
|
||||
"The following referencing objects might break:");
|
||||
bodyMessageStream << "\n\n" << QString::fromUtf8(page->Label.getValue());
|
||||
bodyMessageStream << "\n\nAre you sure you want to continue?";
|
||||
|
||||
// show and evaluate dialog
|
||||
int DialogResult = QMessageBox::warning(Gui::getMainWindow(),
|
||||
|
||||
Reference in New Issue
Block a user