Salome HOME
Issue #1005: To improve user-friendship of error-messages for features and attributes
[modules/shaper.git] / src / ModuleBase / ModuleBase_Tools.h
index 44e492df369412e4ec02a1b8043cf0cff1dd34f7..ab5b63073466ece1c3f9187527356f72f12f75c9 100755 (executable)
@@ -38,6 +38,8 @@ class ModuleBase_IWorkshop;
 
 class GeomAPI_Shape;
 
+class Events_InfoMessage;
+
 namespace ModuleBase_Tools {
 
 /// Methods to adjust margins and spacings.
@@ -316,13 +318,18 @@ void MODULEBASE_EXPORT convertToFeatures(const QObjectPtrList& theObjects,
                                          std::set<FeaturePtr>& theFeatures);
 
 
+/// Returns translation from the given data.
+/// If translation is not exists then it returns a string
+/// from the info data without translation
+/// \param theMessage a message which dave to be translated
+QString MODULEBASE_EXPORT translate(const Events_InfoMessage& theMessage);
+
 /// Returns translation from the given data.
 /// If translation is not exists then it returns a string
 /// from the info data without translation
 /// \param theContext context of the message (Feature Id)
 /// \param theMessage a message which dave to be translated
-/// \param theParams a list of parameters (can be empty)
-void MODULEBASE_EXPORT translate(const std::string& theContext, std::string& theMessage);
+QString MODULEBASE_EXPORT translate(const std::string& theContext, const std::string& theMessage);
 
 /// Set Highlighting of points as a Ball shape
 /// \param theAIS - the presentation