]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Send information message for translation
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 3 Jun 2016 16:30:32 +0000 (19:30 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 3 Jun 2016 16:30:32 +0000 (19:30 +0300)
15 files changed:
src/Config/Config_DataModelReader.cpp
src/Config/Config_Translator.cpp
src/Config/Config_Translator.h
src/Events/Events_InfoMessage.h
src/ModelAPI/ModelAPI_Events.h
src/ModuleBase/ModuleBase_IModule.cpp
src/SketchPlugin/SketchPlugin_msg_en.ts
src/XGUI/XGUI_ErrorDialog.cpp
src/XGUI/XGUI_ErrorDialog.h
src/XGUI/XGUI_ModuleConnector.cpp
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h
src/XGUI/XGUI_WorkshopListener.cpp
src/XGUI/XGUI_WorkshopListener.h
src/XGUI/XGUI_msg_fr.ts

index b02ae823c92bbfda2cb7be86ab79f224d2a11a90..22c6608f7f37455f1dade3537704ef3227691c2b 100644 (file)
@@ -12,6 +12,7 @@
 #include "Config_Common.h"
 
 #include <Events_Error.h>
+#include <Events_InfoMessage.h>
 
 
 Config_DataModelReader::Config_DataModelReader()
@@ -29,7 +30,7 @@ void Config_DataModelReader::processNode(xmlNodePtr theNode)
     std::string aName = getProperty(theNode, FOLDER_NAME);
     std::string aGroupType = getProperty(theNode, GROUP_TYPE);
     if (aName.empty() || aGroupType.empty())
-      Events_Error::send("Reading dataModel.xml: wrong folder definition");
+      Events_InfoMessage("Config_DataModelReader", "Reading dataModel.xml: wrong folder definition.").send();
    
     std::string aIcon = getProperty(theNode, NODE_ICON);
     std::string aEmpty = getProperty(theNode, SHOW_EMPTY);
index 38bbf8bdda45b657cfe0cd9f64e9f9056241d2fd..bf105efe455dd93c34898dd1a3ac732c638407c6 100644 (file)
@@ -73,33 +73,52 @@ bool Config_Translator::load(const std::string& theFileName)
   return true;
 }
 
-std::string Config_Translator::translate(const Events_InfoMessage& theInfo)
+std::string Config_Translator::translate(std::shared_ptr<Events_InfoMessage> theInfo)
 {
-  std::string aContext = theInfo.context();
-  std::string aMessage = theInfo.message();
-  std::list<std::string> aParameters = theInfo.parameters();
-  if (myTranslator.count(aContext) > 0) {
-    if (myTranslator[aContext].count(aMessage) > 0) {
-      std::string aTranslation = myTranslator[aContext][aMessage];
-      if (aParameters.size() > 0) {
-        std::list<std::string>::const_iterator aIt;
-        int i;
-        char aBuf[20];
-        std::string aParam;
-        for (i=1, aIt = aParameters.cbegin(); aIt != aParameters.cend(); aIt++, i++) {
-          aParam = (*aIt);
-          sprintf(aBuf, "%d ", i);
-          std::string aCode = std::string("%") + std::string(aBuf);
-          size_t aPos = aTranslation.find(aCode);
-          if (aPos != std::string::npos) {
-            std::string aFirst = aTranslation.substr(0, aPos);
-            std::string aLast = aTranslation.substr(aPos + aCode.length(), std::string::npos);
-            aTranslation = aFirst + aParam + aLast;
-          }
-        }
+  std::string aContext = theInfo->context();
+  std::string aMessage = theInfo->message();
+  std::list<std::string> aParameters = theInfo->parameters();
+  return translate(aContext, aMessage, aParameters);
+}
+
+
+std::string insertParameters(const std::string& theString, const std::list<std::string>& theParams)
+{
+  std::string aResult = theString;
+  std::list<std::string>::const_iterator aIt;
+  int i;
+  char aBuf[20];
+  std::string aParam;
+  for (i=1, aIt = theParams.cbegin(); aIt != theParams.cend(); aIt++, i++) {
+    aParam = (*aIt);
+    sprintf_s(aBuf, "%d", i);
+    std::string aCode = std::string("%") + std::string(aBuf);
+    size_t aPos = aResult.find(aCode);
+    if (aPos != std::string::npos) {
+      std::string aFirst = aResult.substr(0, aPos);
+      std::string aLast = aResult.substr(aPos + aCode.length(), std::string::npos);
+      aResult = aFirst + aParam + aLast;
+    }
+  }
+  return aResult;
+}
+
+std::string Config_Translator::translate(const std::string& theContext,
+                                         const std::string& theMessage, 
+                                         const std::list<std::string>& theParams)
+{
+  if (myTranslator.count(theContext) > 0) {
+    if (myTranslator[theContext].count(theMessage) > 0) {
+      std::string aTranslation = myTranslator[theContext][theMessage];
+      if (theParams.size() > 0) {
+        aTranslation = insertParameters(aTranslation, theParams);
       }
       return aTranslation;
     }
   }
-  return "";
+  std::string aMsg = theMessage;
+  if (theParams.size() > 0) {
+    aMsg = insertParameters(aMsg, theParams);
+  }
+  return aMsg;
 }
index 43350f8f3e25ee84b22134683aa2ea6b5076cf4d..4365ec75213c9125267630d49c92a7cf7da70ff3 100644 (file)
 #include <string>
 #include <map>
 
+/**
+ * \class Config_Translator
+ * \ingroup Config
+ * \brief Class for messages translation on different languages. It can load TS
+ * files wich contain translation string and provides translations of messages from source code
+ */
 class Config_Translator
 {
 public:
@@ -34,7 +40,19 @@ public:
   * from the info data without translation
   * \param theInfo an info message
   */
-  static CONFIG_EXPORT std::string translate(const Events_InfoMessage& theInfo);
+  static CONFIG_EXPORT std::string translate(std::shared_ptr<Events_InfoMessage> theInfo);
+
+  /**
+  * Returns translation from the given data.
+  * If transdlation 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)
+  */
+  static CONFIG_EXPORT std::string translate(const std::string& theContext,
+    const std::string& theMessage, 
+    const std::list<std::string>& theParams = std::list<std::string>());
 
 private:
   static Translator myTranslator;
index 5f745a98b7e51ecaed8af8a6e6fc24ef993e19e9..bf92b3af308f70a815628ecb56e4c92ff789ec13 100644 (file)
 #include <Events_Message.h>
 #include <Events_Loop.h>
 
+/**\class Events_InfoMessage
+ * \ingroup EventsLoop
+ * \brief An event message for sending a string message which has to be translated.
+ */
 class Events_InfoMessage: public Events_Message
 {
 public:
-  Events_InfoMessage(const void* theSender = 0) : 
-      Events_Message(Events_Loop::eventByName("InfoMessage"), theSender) {}
 
+  /// Constructor
+  /// \param theSender a pointer on sender object
+  Events_InfoMessage(const void* theSender = 0):Events_Message(Events_Loop::eventByName("InfoMessage"), theSender) {}
+
+  /// Constructor
+  /// \param theSender a pointer on sender object
+  Events_InfoMessage(const std::string& theContext, 
+    const std::string& theMsg, const void* theSender = 0):
+  Events_Message(Events_Loop::eventByName("InfoMessage"), theSender),
+    myContext(theContext), myMessage(theMsg) {}
+
+  /// default destructor   
+  virtual ~Events_InfoMessage() {}
+
+  /// Identifier of this event (one for all errors)
+  static Events_ID errorID()  { return Events_Loop::loop()->eventByName("InfoMessage"); }
+
+  /// Set a context string
+  /// \param theContext a context string
   void  setContext(const std::string& theContext) { myContext = theContext; } 
 
+
+  /// Returns context string
   std::string context() const { return myContext; }
 
+  /// Set message string for translation
+  /// \param theMsg the string of message
   void setMessage(const std::string& theMsg) { myMessage = theMsg; } 
 
+  /// Returns message
   std::string message() const { return myMessage; }
 
+  /// Add parameter for message string of string type
+  /// \param theParam the parameter
   void addParameter(const std::string& theParam) 
   { 
     myParameters.push_back(theParam); 
   }
 
+  /// Add parameter for message string of double type
+  /// \param theParam the parameter
   void addParameter(double theParam) 
   { 
     char aBuf[50];
@@ -38,6 +68,8 @@ public:
     myParameters.push_back(aStr); 
   }
 
+  /// Add parameter for message string of integer type
+  /// \param theParam the parameter
   void addParameter(int theParam) 
   { 
     char aBuf[50];
@@ -46,8 +78,26 @@ public:
     myParameters.push_back(aStr); 
   }
 
+  /// Returns list of parameters
   std::list<std::string> parameters() const { return myParameters; }
 
+  /// Add parameter for message string of string type
+  /// \param theParam the parameter
+  Events_InfoMessage& arg(const std::string& theParam) { addParameter(theParam); return *this; }
+
+  /// Add parameter for message string of integer type
+  /// \param theParam the parameter
+  Events_InfoMessage& arg(int theParam) { addParameter(theParam); return *this; }
+
+  /// Add parameter for message string of double type
+  /// \param theParam the parameter
+  Events_InfoMessage& arg(double theParam) { addParameter(theParam); return *this; }
+
+  void send() { 
+    std::shared_ptr<Events_Message> aMsg(new Events_InfoMessage(*this));
+    Events_Loop::loop()->send(aMsg); 
+  }
+
 private:
 
   /// Context of the messgae
index 1bbf8d2fb81413542cb027e73d9d1b0d616a07a5..93a8870b0b717b2c4eaa7bf5f66450d18a6796f0 100644 (file)
@@ -37,7 +37,7 @@ static const char * EVENT_OBJECT_TO_REDISPLAY = "ObjectsToRedisplay";
 /// Event ID that visualization must be redisplayed (comes with ModelAPI_ObjectUpdatedMessage)
 static const char * EVENT_OPERATION_LAUNCHED = "OperationLaunched";
 /// Event ID that plugin is loaded (comes with ModelAPI_ObjectUpdatedMessage)
-static const char * EVENT_PLUGIN_LOADED = "PliginLoaded";
+static const char * EVENT_PLUGIN_LOADED = "PluginLoaded";
 //
 static const char * EVENT_DOCUMENT_CHANGED = "CurrentDocumentChanged";
 
index fa0395ad9462eafc374d70d71a4ef75486ff5df9..be4cc61a6ebd97085bc335dd34a21ff0b0f1d7f9 100644 (file)
@@ -23,6 +23,7 @@
 #include <Config_PointerMessage.h>
 #include <Config_WidgetReader.h>
 #include <Config_ModuleReader.h>
+#include <Config_Translator.h>
 
 #include <QAction>
 #include <QMainWindow>
@@ -106,7 +107,10 @@ bool ModuleBase_IModule::canBeShaded(Handle(AIS_InteractiveObject) theAIS) const
 
 QString ModuleBase_IModule::getFeatureError(const FeaturePtr& theFeature)
 {
-  return ModelAPI_Tools::getFeatureError(theFeature).c_str();
+  QString aMsg = ModelAPI_Tools::getFeatureError(theFeature).c_str();
+  if (!aMsg.isEmpty())
+    aMsg = Config_Translator::translate(theFeature->getKind(), aMsg.toStdString()).c_str();
+  return aMsg;
 }
 
 void ModuleBase_IModule::grantedOperationIds(ModuleBase_Operation* theOperation,
index bd3f891bbf7f9511db89131f6b0d451e712392ff..8703b587985b27ee26c5ff2c89da98144e6b41e4 100644 (file)
@@ -5,7 +5,7 @@
     <name>SketchConstraintVertical</name>
     <message>
         <source>Model_FeatureValidator: Attribute &quot;ConstraintEntityA&quot; is not initialized.</source>
-        <translation>Line for constraint is not selected.</translation>
+        <translation>Select a line for the constraint definition.</translation>
     </message>
     <message>
         <source>ModelAPI_StateInvalidArgument</source>
index d389e3b3f73d6a04ae35581c56f058acd5fe8ad2..75df206519032f8ebc2100f37246b8dc0c51f0e5 100644 (file)
@@ -9,6 +9,7 @@
 #include <XGUI_ErrorDialog.h>
 
 #include <ModuleBase_Tools.h>
+#include <Config_Translator.h>
 
 #include <QDialogButtonBox>
 #include <QHBoxLayout>
@@ -56,9 +57,10 @@ void XGUI_ErrorDialog::clear()
   QDialog::reject();
 }
 
-void XGUI_ErrorDialog::addError(const QString& theError)
+void XGUI_ErrorDialog::addError(std::shared_ptr<Events_InfoMessage> theMsg)
 {
-  myErrors.append(theError);
+  std::string aError = Config_Translator::translate(theMsg);
+  myErrors.append(aError.c_str());
   refresh();
   if (!isVisible()) {
     show();
index b6f53e6bca1358b067159c52e2a73fbce521a022..3e3bb325a6d78723798158599875e48e0c61998c 100644 (file)
@@ -14,6 +14,7 @@
 #include <QDialog>
 
 class QTextEdit;
+class Events_InfoMessage;
 
 /**
 * \ingroup GUI
@@ -36,7 +37,7 @@ Q_OBJECT
   XGUI_EXPORT void clear();
 
   /// Add error message
-  XGUI_EXPORT void addError(const QString&);
+  XGUI_EXPORT void addError(std::shared_ptr<Events_InfoMessage> theMsg);
 
   /// Remove error message
   XGUI_EXPORT void removeError(const QString&);
index 8fd52e598bfc06d6568a75d85aea966398421a86..9fab49052887fc88866bd1c95b8095b55117d4ee 100644 (file)
@@ -31,8 +31,6 @@ XGUI_ModuleConnector::XGUI_ModuleConnector(XGUI_Workshop* theWorkshop)
 {
   XGUI_SelectionMgr* aSelector = myWorkshop->selector();
   connect(aSelector, SIGNAL(selectionChanged()), this, SIGNAL(selectionChanged()));
-  
-  XGUI_OperationMgr* anOperationMgr = myWorkshop->operationMgr();
 }
 
 XGUI_ModuleConnector::~XGUI_ModuleConnector()
index e51516510f8e31a1b469b0b316ed38eb7f4d3c85..61bb0e22ab94f3784176c5e592497314c0787504 100755 (executable)
@@ -126,6 +126,13 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
       myDisplayer(0)
       //myViewerSelMode(TopAbs_FACE)
 {
+  mySelector = new XGUI_SelectionMgr(this);
+  myModuleConnector = new XGUI_ModuleConnector(this);
+  myOperationMgr = new XGUI_OperationMgr(this, 0);
+  ModuleBase_IWorkshop* aWorkshop = moduleConnector();
+  // Has to be defined first in order to get errors and messages from other components
+  myEventsListener = new XGUI_WorkshopListener(aWorkshop);
+
 #ifndef HAVE_SALOME
   myMainWindow = new AppElements_MainWindow();
 
@@ -147,14 +154,12 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
   }
 
   myDataModelXMLReader = new Config_DataModelReader();
-  myDataModelXMLReader->readAll();
+  //myDataModelXMLReader->readAll();
 
   myDisplayer = new XGUI_Displayer(this);
 
-  mySelector = new XGUI_SelectionMgr(this);
   connect(mySelector, SIGNAL(selectionChanged()), this, SLOT(updateCommandStatus()));
 
-  myOperationMgr = new XGUI_OperationMgr(this, 0);
   myActionsMgr = new XGUI_ActionsMgr(this);
   myMenuMgr = new XGUI_MenuMgr(this);
   myErrorDlg = new XGUI_ErrorDialog(QApplication::desktop());
@@ -166,13 +171,9 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
   //connect(myViewerProxy, SIGNAL(selectionChanged()),
   //        myActionsMgr,  SLOT(updateOnViewSelection()));
 
-  myModuleConnector = new XGUI_ModuleConnector(this);
-
-  ModuleBase_IWorkshop* aWorkshop = moduleConnector();
   myOperationMgr->setWorkshop(aWorkshop);
 
   myErrorMgr = new XGUI_ErrorMgr(this, aWorkshop);
-  myEventsListener = new XGUI_WorkshopListener(aWorkshop);
 
   connect(myOperationMgr, SIGNAL(operationStarted(ModuleBase_Operation*)), 
           SLOT(onOperationStarted(ModuleBase_Operation*)));
@@ -190,9 +191,8 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
   onTrihedronVisibilityChanged(true);
 #endif
 
-  connect(this, SIGNAL(errorOccurred(const QString&)), myErrorDlg, SLOT(addError(const QString&)));
-  connect(myEventsListener, SIGNAL(errorOccurred(const QString&)),
-          myErrorDlg, SLOT(addError(const QString&)));
+  connect(myEventsListener, SIGNAL(errorOccurred(std::shared_ptr<Events_InfoMessage>)),
+          myErrorDlg, SLOT(addError(std::shared_ptr<Events_InfoMessage>)));
 
   //Config_PropManager::registerProp("Visualization", "object_default_color", "Object color",
   //                                 Config_Prop::Color, "225,225,225");
@@ -224,13 +224,15 @@ XGUI_Workshop::~XGUI_Workshop(void)
 //******************************************************
 void XGUI_Workshop::startApplication()
 {
+  //Initialize event listening
+  myEventsListener->initializeEventListening();
+
+  myDataModelXMLReader->readAll();
   initMenu();
 
   Config_PropManager::registerProp("Plugins", "default_path", "Default Path",
                                    Config_Prop::Directory, "");
 
-  //Initialize event listening
-  myEventsListener->initializeEventListening();
 
   registerValidators();
 
index 835816cf41c8d5b64b2321ff1f33db093391f3cf..fea7600a04992929202324f2de8801d765861425 100755 (executable)
@@ -306,9 +306,6 @@ signals:
   /// Emitted when selection happens in Salome viewer
   void salomeViewerSelection();
 
-  /// Emitted when error in application happens
-  void errorOccurred(const QString&);
-
   //! the signal about the workshop actions states are updated.
   void commandStatusUpdated();
 
index e9e3e3601519ae9668cede5c3d8a43b225bd0668..567ecc63a8c1febd90c6c5fdeb1c69ae3605a5c6 100755 (executable)
@@ -45,6 +45,7 @@
 #include <Config_PointerMessage.h>
 #include <Config_SelectionFilterMessage.h>
 #include <Config_Keywords.h>
+#include <Events_InfoMessage.h>
 
 #include <QApplication>
 #include <QMainWindow>
@@ -82,7 +83,8 @@ void XGUI_WorkshopListener::initializeEventListening()
 {
   //Initialize event listening
   Events_Loop* aLoop = Events_Loop::loop();
-  aLoop->registerListener(this, Events_Error::errorID());  //!< Listening application errors.
+  //aLoop->registerListener(this, Events_Error::errorID());  //!< Listening application errors.
+  aLoop->registerListener(this, Events_InfoMessage::errorID());  //!< Listening application errors.
   aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OPERATION_LAUNCHED));
   aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
   aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
@@ -186,9 +188,9 @@ void XGUI_WorkshopListener::processEvent(const std::shared_ptr<Events_Message>&
     aDisplayer->enableUpdateViewer(true);
   } else {
     //Show error dialog if error message received.
-    std::shared_ptr<Events_Error> anAppError = std::dynamic_pointer_cast<Events_Error>(theMessage);
-    if (anAppError) {
-      emit errorOccurred(QString::fromLatin1(anAppError->description()));
+    std::shared_ptr<Events_InfoMessage> anIngfoMsg = std::dynamic_pointer_cast<Events_InfoMessage>(theMessage);
+    if (anIngfoMsg) {
+      emit errorOccurred(anIngfoMsg);
     }
     return;
   }
index 5358253b522d142f139ada0976def30db21e3acb..7da355e2e28590fbe222654877a80043ae047947 100755 (executable)
@@ -8,6 +8,7 @@
 #include <Events_Message.h>
 
 #include <ModelAPI_Feature.h>
+#include <Events_InfoMessage.h>
 
 #include <QObject>
 
@@ -19,6 +20,7 @@ class XGUI_Workshop;
 class ModuleBase_IWorkshop;
 
 class QString;
+class Events_InfoMessage;
 
 /**\class XGUI_WorkshopListener
  * \ingroup GUI
@@ -41,7 +43,7 @@ public:
 
 signals:
   /// Emitted when error in applivation happens
-  void errorOccurred(const QString&);
+  void errorOccurred(std::shared_ptr<Events_InfoMessage> theMsg);
 
 protected:
   /// Procedure to process postponed events
index 9f2fa39723004a00f2898651c8189905f63e20b2..a47614eca0505e783350127bdcdc409746ae3ec5 100644 (file)
 <context>
     <name>XGUI_ErrorDialog</name>
     <message>
-        <location filename="XGUI_ErrorDialog.cpp" line="23"/>
+        <location filename="XGUI_ErrorDialog.cpp" line="24"/>
         <source>Application errors</source>
         <translation type="unfinished"></translation>
     </message>
 <context>
     <name>XGUI_Workshop</name>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="300"/>
-        <location filename="XGUI_Workshop.cpp" line="354"/>
+        <location filename="XGUI_Workshop.cpp" line="302"/>
+        <location filename="XGUI_Workshop.cpp" line="356"/>
         <source>Undo</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="301"/>
-        <location filename="XGUI_Workshop.cpp" line="354"/>
+        <location filename="XGUI_Workshop.cpp" line="303"/>
+        <location filename="XGUI_Workshop.cpp" line="356"/>
         <source>Undo last command</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="304"/>
+        <location filename="XGUI_Workshop.cpp" line="306"/>
         <source>INF_DESK_TOOLBAR_STANDARD</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="310"/>
-        <location filename="XGUI_Workshop.cpp" line="363"/>
+        <location filename="XGUI_Workshop.cpp" line="312"/>
+        <location filename="XGUI_Workshop.cpp" line="365"/>
         <source>Redo</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="310"/>
-        <location filename="XGUI_Workshop.cpp" line="363"/>
+        <location filename="XGUI_Workshop.cpp" line="312"/>
+        <location filename="XGUI_Workshop.cpp" line="365"/>
         <source>Redo last command</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="327"/>
+        <location filename="XGUI_Workshop.cpp" line="329"/>
         <source>Export native...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="327"/>
+        <location filename="XGUI_Workshop.cpp" line="329"/>
         <source>Export the current document into a native file</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="332"/>
+        <location filename="XGUI_Workshop.cpp" line="334"/>
         <source>Import native...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="332"/>
+        <location filename="XGUI_Workshop.cpp" line="334"/>
         <source>Import native file</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="344"/>
-        <location filename="XGUI_Workshop.cpp" line="833"/>
+        <location filename="XGUI_Workshop.cpp" line="346"/>
+        <location filename="XGUI_Workshop.cpp" line="835"/>
         <source>Save</source>
         <extracomment>Title of the dialog which asks user if he wants to save study in existing non-empty folder</extracomment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="344"/>
+        <location filename="XGUI_Workshop.cpp" line="346"/>
         <source>Save the document</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="349"/>
+        <location filename="XGUI_Workshop.cpp" line="351"/>
         <source>Save as...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="349"/>
+        <location filename="XGUI_Workshop.cpp" line="351"/>
         <source>Save the document into a file</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="377"/>
+        <location filename="XGUI_Workshop.cpp" line="379"/>
         <source>Open...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="377"/>
+        <location filename="XGUI_Workshop.cpp" line="379"/>
         <source>Open a new document</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="381"/>
+        <location filename="XGUI_Workshop.cpp" line="383"/>
         <source>Preferences</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="381"/>
+        <location filename="XGUI_Workshop.cpp" line="383"/>
         <source>Edit preferences</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="385"/>
+        <location filename="XGUI_Workshop.cpp" line="387"/>
         <source>Exit</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="385"/>
+        <location filename="XGUI_Workshop.cpp" line="387"/>
         <source>Exit application</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="695"/>
-        <location filename="XGUI_Workshop.cpp" line="751"/>
+        <location filename="XGUI_Workshop.cpp" line="697"/>
+        <location filename="XGUI_Workshop.cpp" line="753"/>
         <source>Save current file</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="696"/>
+        <location filename="XGUI_Workshop.cpp" line="698"/>
         <source>The document is modified, save before opening another?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="707"/>
+        <location filename="XGUI_Workshop.cpp" line="709"/>
         <source>Select directory</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="712"/>
+        <location filename="XGUI_Workshop.cpp" line="714"/>
         <source>Warning</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="712"/>
+        <location filename="XGUI_Workshop.cpp" line="714"/>
         <source>Unable to open the file.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="751"/>
+        <location filename="XGUI_Workshop.cpp" line="753"/>
         <source>The document is modified, save before exit?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="817"/>
+        <location filename="XGUI_Workshop.cpp" line="819"/>
         <source>Select directory to save files...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="819"/>
+        <location filename="XGUI_Workshop.cpp" line="821"/>
         <source>Directories (*)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="834"/>
+        <location filename="XGUI_Workshop.cpp" line="836"/>
         <source>The directory already contains some files, save anyway?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="967"/>
+        <location filename="XGUI_Workshop.cpp" line="969"/>
         <source>Information about module &quot;%1&quot; doesn&apos;t exist.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="1098"/>
+        <location filename="XGUI_Workshop.cpp" line="1100"/>
         <source>Object browser</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="1430"/>
+        <location filename="XGUI_Workshop.cpp" line="1432"/>
         <source>Unused features are the following: %1.
 These features will be deleted.
 Would you like to continue?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="1468"/>
+        <location filename="XGUI_Workshop.cpp" line="1470"/>
         <source>All features are relevant, there is nothing to be deleted</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="1968"/>
+        <location filename="XGUI_Workshop.cpp" line="1970"/>
         <source>Find results</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="XGUI_Workshop.cpp" line="1969"/>
+        <location filename="XGUI_Workshop.cpp" line="1971"/>
         <source>Results not found</source>
         <translation type="unfinished"></translation>
     </message>