[TD] Add ability to translate for some tooltip text. Fix incorrect use of tr(variable).
This commit is contained in:
committed by
Chris Hennes
parent
af811b34b3
commit
29cc754cfd
@@ -326,10 +326,11 @@ void CmdTechDrawRadiusDimension::activated(int iMsg)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
std::stringstream edgeMsg;
|
||||
edgeMsg << "Selection for Radius does not contain a circular edge (edge type: " << _edgeTypeToText(edgeType) << ")";
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
|
||||
QObject::tr(edgeMsg.str().c_str()));
|
||||
QMessageBox::warning(
|
||||
Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
|
||||
QObject::tr("Selection for Radius does not contain a circular edge "
|
||||
"(edge type: %1)")
|
||||
.arg(QString::fromStdString(_edgeTypeToText(edgeType))));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -448,11 +449,12 @@ void CmdTechDrawDiameterDimension::activated(int iMsg)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
std::stringstream edgeMsg;
|
||||
edgeMsg << "Selection for Diameter does not contain a circular edge (edge type: " << _edgeTypeToText(edgeType) << ")";
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
|
||||
QObject::tr(edgeMsg.str().c_str()));
|
||||
return;
|
||||
QMessageBox::warning(
|
||||
Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
|
||||
QObject::tr("Selection for Diameter does not contain a circular edge "
|
||||
"(edge type: %1)")
|
||||
.arg(QString::fromStdString(_edgeTypeToText(edgeType))));
|
||||
return;
|
||||
}
|
||||
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Create Dimension"));
|
||||
@@ -545,11 +547,11 @@ void CmdTechDrawLengthDimension::activated(int iMsg)
|
||||
subs.push_back(SubNames[0]);
|
||||
subs.push_back(SubNames[1]);
|
||||
} else {
|
||||
std::stringstream edgeMsg;
|
||||
edgeMsg << "Need 2 Vertexes, 2 Edges or 1 Vertex and 1 Edge for Distance Dimension";
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
|
||||
QObject::tr(edgeMsg.str().c_str()));
|
||||
return;
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
QObject::tr("Incorrect Selection"),
|
||||
QObject::tr("Need 2 Vertexes, 2 Edges or 1 Vertex "
|
||||
"and 1 Edge for Distance Dimension"));
|
||||
return;
|
||||
}
|
||||
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Create Dimension"));
|
||||
@@ -648,11 +650,11 @@ void CmdTechDrawHorizontalDimension::activated(int iMsg)
|
||||
subs.push_back(SubNames[0]);
|
||||
subs.push_back(SubNames[1]);
|
||||
} else {
|
||||
std::stringstream edgeMsg;
|
||||
edgeMsg << "Need 2 Vertexes, 2 Edges or 1 Vertex and 1 Edge for Horizontal Dimension";
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
|
||||
QObject::tr(edgeMsg.str().c_str()));
|
||||
return;
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
QObject::tr("Incorrect Selection"),
|
||||
QObject::tr("Need 2 Vertexes, 2 Edges or 1 Vertex "
|
||||
"and 1 Edge for Horizontal Dimension"));
|
||||
return;
|
||||
}
|
||||
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Create Dimension"));
|
||||
@@ -751,11 +753,11 @@ void CmdTechDrawVerticalDimension::activated(int iMsg)
|
||||
subs.push_back(SubNames[0]);
|
||||
subs.push_back(SubNames[1]);
|
||||
} else {
|
||||
std::stringstream edgeMsg;
|
||||
edgeMsg << "Need 2 Vertexes, 2 Edges or 1 Vertex and 1 Edge for Vertical Dimension";
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
|
||||
QObject::tr(edgeMsg.str().c_str()));
|
||||
return;
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
QObject::tr("Incorrect Selection"),
|
||||
QObject::tr("Need 2 Vertexes, 2 Edges or 1 Vertex "
|
||||
"and 1 Edge for Vertical Dimension"));
|
||||
return;
|
||||
}
|
||||
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Create Dimension"));
|
||||
|
||||
Reference in New Issue
Block a user