From f299a1dfd6b10074a6a6bbab164e08f5b0833eed Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 9 Sep 2019 14:56:28 +0300 Subject: [PATCH] Translate names and tooltips for controls --- src/ModuleBase/ModuleBase_WidgetRadiobox.cpp | 4 ++-- src/ModuleBase/ModuleBase_WidgetSwitch.cpp | 2 +- src/ModuleBase/ModuleBase_WidgetToolbox.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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(); } -- 2.39.2