From: vsv Date: Mon, 9 Sep 2019 11:56:28 +0000 (+0300) Subject: Translate names and tooltips for controls X-Git-Tag: V9_4_0a2~4^2~125 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f299a1dfd6b10074a6a6bbab164e08f5b0833eed;p=modules%2Fshaper.git Translate names and tooltips for controls --- diff --git a/src/ModuleBase/ModuleBase_WidgetRadiobox.cpp b/src/ModuleBase/ModuleBase_WidgetRadiobox.cpp index f872e4ec0..f98ddc5c0 100644 --- a/src/ModuleBase/ModuleBase_WidgetRadiobox.cpp +++ b/src/ModuleBase/ModuleBase_WidgetRadiobox.cpp @@ -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); diff --git a/src/ModuleBase/ModuleBase_WidgetSwitch.cpp b/src/ModuleBase/ModuleBase_WidgetSwitch.cpp index 405ddc198..98d08af20 100644 --- a/src/ModuleBase/ModuleBase_WidgetSwitch.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSwitch.cpp @@ -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(); diff --git a/src/ModuleBase/ModuleBase_WidgetToolbox.cpp b/src/ModuleBase/ModuleBase_WidgetToolbox.cpp index 188e2f012..dc1904e4a 100644 --- a/src/ModuleBase/ModuleBase_WidgetToolbox.cpp +++ b/src/ModuleBase/ModuleBase_WidgetToolbox.cpp @@ -71,7 +71,7 @@ int ModuleBase_WidgetToolbox::addPage(ModuleBase_PageBase* thePage, { ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip); QFrame* aFrame = dynamic_cast(thePage); - myToolBox->addItem(aFrame, theName, theIcon ); + myToolBox->addItem(aFrame, translate(theName.toStdString()), theIcon ); return myToolBox->count(); }