#include <GeomAPI_ShapeExplorer.h>
#include <Config_PropManager.h>
+#include <Config_Translator.h>
#include <QWidget>
#include <QLayout>
#include <QApplication>
#include <QMessageBox>
#include <QAction>
+#include <QTextCodec>
#include <sstream>
#include <string>
}
}
+void translate(const std::string& theContext, std::string& theMessage)
+{
+ if (!theMessage.empty()) {
+ std::string aStr = Config_Translator::translate(theContext, theMessage);
+ if (!aStr.empty()) {
+ std::string aCodec = Config_Translator::codec(theContext);
+ theMessage = QTextCodec::codecForName(aCodec.c_str())->toUnicode(aStr.c_str()).toStdString();
+ }
+ }
+}
+
} // namespace ModuleBase_Tools