[PartDesign] Add individual QString for menu text which exposes text to translation
Closes https://github.com/FreeCAD/FreeCAD-translations/issues/125
This commit is contained in:
@@ -53,7 +53,7 @@ using namespace Attacher;
|
||||
|
||||
TaskDatumParameters::TaskDatumParameters(ViewProviderDatum *ViewProvider,QWidget *parent)
|
||||
: PartGui::TaskAttacher(ViewProvider, parent, QString::fromLatin1("PartDesign_") + ViewProvider->datumType,
|
||||
ViewProvider->datumText + tr(" parameters"))
|
||||
ViewProvider->datumMenuText)
|
||||
{
|
||||
Gui::Selection().addSelectionGate(new NoDependentsSelection(ViewProvider->getObject()));
|
||||
ViewProvider->setPickable(false);
|
||||
|
||||
@@ -107,19 +107,23 @@ void ViewProviderDatum::attach(App::DocumentObject *obj)
|
||||
App::DocumentObject* o = getObject();
|
||||
if (o->getTypeId() == PartDesign::Plane::getClassTypeId()) {
|
||||
datumType = QString::fromLatin1("Plane");
|
||||
datumText = QObject::tr("Plane");
|
||||
datumText = QObject::tr("Plane");
|
||||
datumMenuText = QObject::tr("Datum Plane parameters");
|
||||
}
|
||||
else if (o->getTypeId() == PartDesign::Line::getClassTypeId()) {
|
||||
datumType = QString::fromLatin1("Line");
|
||||
datumText = QObject::tr("Line");
|
||||
datumMenuText = QObject::tr("Datum Line parameters");
|
||||
}
|
||||
else if (o->getTypeId() == PartDesign::Point::getClassTypeId()) {
|
||||
datumType = QString::fromLatin1("Point");
|
||||
datumText = QObject::tr("Point");
|
||||
datumMenuText = QObject::tr("Datum Point parameters");
|
||||
}
|
||||
else if (o->getTypeId() == PartDesign::CoordinateSystem::getClassTypeId()) {
|
||||
datumType = QString::fromLatin1("CoordinateSystem");
|
||||
datumText = QObject::tr("Coordinate System");
|
||||
datumMenuText = QObject::tr("Local Coordinate System parameters");
|
||||
}
|
||||
|
||||
SoShapeHints* hints = new SoShapeHints();
|
||||
|
||||
@@ -89,7 +89,8 @@ public:
|
||||
/// The datum type (Plane, Line or Point)
|
||||
// TODO remove this attribute (2015-09-08, Fat-Zer)
|
||||
QString datumType;
|
||||
QString datumText;
|
||||
QString datumText;
|
||||
QString datumMenuText;
|
||||
|
||||
/**
|
||||
* Computes appropriate bounding box for the given list of objects to be passed to setExtents ()
|
||||
|
||||
Reference in New Issue
Block a user