]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Translate names and tooltips for controls
authorvsv <vsv@opencascade.com>
Mon, 9 Sep 2019 11:56:28 +0000 (14:56 +0300)
committervsv <vsv@opencascade.com>
Mon, 9 Sep 2019 11:56:39 +0000 (14:56 +0300)
src/ModuleBase/ModuleBase_WidgetRadiobox.cpp
src/ModuleBase/ModuleBase_WidgetSwitch.cpp
src/ModuleBase/ModuleBase_WidgetToolbox.cpp

index f872e4ec04da7a96c00d648c2c3cade136e098b5..f98ddc5c0b3d0046a80d6c78f42a889fe573ba41 100644 (file)
@@ -56,11 +56,11 @@ int ModuleBase_WidgetRadiobox::addPage(ModuleBase_PageBase* thePage,
   QRadioButton* aButton;
   if (theIcon.isNull()) {
     aButton = new QRadioButton(theName, aWgt);
-    aButton->setToolTip(theTooltip);
+    aButton->setToolTip(translate(theTooltip.toStdString()));
   }
   else {
     aButton = new QRadioButton(aWgt);
-    aButton->setToolTip(theName);
+    aButton->setToolTip(translate(theName.toStdString()));
   }
   aLay->addStretch();
   aLay->addWidget(aButton);
index 405ddc1984038896cfa15fe9f562e27aa432a559..98d08af2081e900159fc56fe76d39988384d6888 100644 (file)
@@ -59,7 +59,7 @@ int ModuleBase_WidgetSwitch::addPage(ModuleBase_PageBase* thePage, const QString
 {
   int aSuperCount =
     ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip);
-  myCombo->addItem(theName);
+  myCombo->addItem(translate(theName.toStdString()));
   int aResultCount = myCombo->count();
   if (aResultCount == 2)
     myCombo->show();
index 188e2f0126cb2460869918fabfb92ad8039cba21..dc1904e4a2b414feedeab4f6c3c7f281b6aeb17f 100644 (file)
@@ -71,7 +71,7 @@ int ModuleBase_WidgetToolbox::addPage(ModuleBase_PageBase* thePage,
 {
   ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip);
   QFrame* aFrame = dynamic_cast<QFrame*>(thePage);
-  myToolBox->addItem(aFrame, theName, theIcon );
+  myToolBox->addItem(aFrame, translate(theName.toStdString()), theIcon );
   return myToolBox->count();
 }