Salome HOME
Translate 3d point input tooltips and placeholders
authorvsv <vsv@opencascade.com>
Tue, 10 Sep 2019 14:16:22 +0000 (17:16 +0300)
committermpv <mpv@opencascade.com>
Wed, 11 Sep 2019 06:58:44 +0000 (09:58 +0300)
src/ModuleBase/ModuleBase_WidgetExprEditor.cpp
src/ModuleBase/ModuleBase_WidgetLineEdit.cpp
src/ModuleBase/ModuleBase_WidgetPointInput.cpp

index 51f982cb0528894d35960ab8e202b153c78f90ee..fea77f589d706658416dac330dc1313f3741b4c6 100644 (file)
@@ -233,7 +233,7 @@ ModuleBase_WidgetExprEditor::ModuleBase_WidgetExprEditor( QWidget* theParent,
   aMainLay->addWidget(myResultLabel);
   myEditor = new ExpressionEditor(this);
   myEditor->setMinimumHeight(20);
-  myEditor->setPlaceHolderText( QString::fromStdString( thePlaceHolder ) );
+  myEditor->setPlaceHolderText( translate( thePlaceHolder ) );
   aMainLay->addWidget(myEditor);
   this->setLayout(aMainLay);
 
index 8003a76f542cefc90bd670b3b78dbdb31fe96dde..e915477ed7948f52023ec495ecf4cefc000e2f11 100644 (file)
@@ -97,7 +97,7 @@ ModuleBase_WidgetLineEdit::ModuleBase_WidgetLineEdit(QWidget* theParent,
   if (!aLabelIcon.isEmpty())
     aLabel->setPixmap(ModuleBase_IconFactory::loadPixmap(aLabelIcon));
 
-  myLineEdit = new CustomLineEdit( this, QString::fromStdString( thePlaceHolder ) );
+  myLineEdit = new CustomLineEdit( this, translate( thePlaceHolder ) );
   // Here we do not use the Qt's standard method setPlaceHolderText() since it
   // draws the place holder only if there is no focus on widget;
   // we would like to see the place holder in the case of empty text
index faf5ff52791e14db8726cac27fafe84c1298773d..ca7c3c055209afb2a4ecff874246bb7de8230777 100644 (file)
@@ -60,7 +60,7 @@ ModuleBase_WidgetPointInput::ModuleBase_WidgetPointInput(QWidget* theParent,
 
   myXSpin = new ModuleBase_ParamSpinBox(this);
   myXSpin->setAcceptVariables(aAcceptVariables);
-  myXSpin->setToolTip("X coordinate");
+  myXSpin->setToolTip(tr("X coordinate"));
   myXSpin->setValue(myDefaultValue[0]);
   QLabel* aXLbl = new QLabel(this);
   aXLbl->setPixmap(QPixmap(":pictures/x_size.png"));
@@ -68,7 +68,7 @@ ModuleBase_WidgetPointInput::ModuleBase_WidgetPointInput(QWidget* theParent,
 
   myYSpin = new ModuleBase_ParamSpinBox(this);
   myYSpin->setAcceptVariables(aAcceptVariables);
-  myYSpin->setToolTip("Y coordinate");
+  myYSpin->setToolTip(tr("Y coordinate"));
   myYSpin->setValue(myDefaultValue[1]);
   QLabel* aYLbl = new QLabel(this);
   aYLbl->setPixmap(QPixmap(":pictures/y_size.png"));
@@ -76,7 +76,7 @@ ModuleBase_WidgetPointInput::ModuleBase_WidgetPointInput(QWidget* theParent,
 
   myZSpin = new ModuleBase_ParamSpinBox(this);
   myZSpin->setAcceptVariables(aAcceptVariables);
-  myZSpin->setToolTip("Z coordinate");
+  myZSpin->setToolTip(tr("Z coordinate"));
   myZSpin->setValue(myDefaultValue[2]);
   QLabel* aZLbl = new QLabel(this);
   aZLbl->setPixmap(QPixmap(":pictures/z_size.png"));