]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Translation of Qt messages
authorvsv <vsv@opencascade.com>
Fri, 6 Sep 2019 15:21:37 +0000 (18:21 +0300)
committervsv <vsv@opencascade.com>
Fri, 6 Sep 2019 15:21:37 +0000 (18:21 +0300)
src/ModuleBase/CMakeLists.txt
src/ModuleBase/ModuleBase_Dialog.cpp
src/ModuleBase/ModuleBase_WidgetLabelValue.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_msg_fr.ts [new file with mode: 0644]
src/PartSet/CMakeLists.txt
src/PartSet/PartSet_WidgetSketchCreator.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PartSet/PartSet_msg_fr.ts [new file with mode: 0644]
src/XGUI/XGUI_Workshop.cpp

index a7ce541f2aa7a71e7bce714288104a660dbedfc3..7361584e20a316d5f68e9d377817e11d42243f46 100644 (file)
@@ -28,6 +28,8 @@ INCLUDE_DIRECTORIES(${QT_INCLUDES})
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(${QT_DEFINITIONS})
 
+SET(UPDATE_TRANSLATION OFF)
+
 SET(PROJECT_HEADERS
   ModuleBase.h
   ModuleBase_ActionInfo.h
@@ -228,6 +230,10 @@ SET(PROJECT_SOURCES
   ModuleBase_IStepPrs.cpp
 )
 
+SET(TEXT_RESOURCES
+    ModuleBase_msg_fr.ts
+)
+
 SET(PROJECT_LIBRARIES
        Config
        Events
@@ -247,10 +253,19 @@ SET(PROJECT_LIBRARIES
 # sources / moc wrappings
 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
 
-#QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+IF (${UPDATE_TRANSLATION})
+    SET(PROJECT_FILES ${PROJECT_SOURCES} ${ROJECT_HEADERS} )
+    QT5_CREATE_TRANSLATION(QM_RESOURCES
+                           ${PROJECT_FILES}
+                           ${TEXT_RESOURCES}
+                           OPTIONS -extensions cpp -no-recursive
+                          )
+ELSE(${UPDATE_TRANSLATION)
+    QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+ENDIF(${UPDATE_TRANSLATION)
 
 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
-#SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
+SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
 
 INCLUDE_DIRECTORIES(
     ${OpenCASCADE_INCLUDE_DIR}
@@ -269,7 +284,15 @@ IF(${HAVE_SALOME})
 ENDIF(${HAVE_SALOME})
 
 ADD_DEFINITIONS(-DMODULEBASE_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(ModuleBase SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_AUTOMOC})
+ADD_LIBRARY(ModuleBase SHARED
+       ${PROJECT_SOURCES}
+       ${PROJECT_HEADERS}
+       ${PROJECT_AUTOMOC}
+    ${TEXT_RESOURCES}
+    ${QM_RESOURCES}
+)
+
 TARGET_LINK_LIBRARIES(ModuleBase GeomAPI ${PROJECT_LIBRARIES})
 
 INSTALL(TARGETS ModuleBase DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
index 22b276fd2d4c84613421ba523d618077e416a7b4..0f2ffeeb68726cb934ef8294897edef4c2289c0a 100644 (file)
@@ -23,6 +23,7 @@
 #include "ModuleBase_IPropertyPanel.h"
 #include "ModuleBase_PageWidget.h"
 #include "ModuleBase_ModelDialogWidget.h"
+#include "ModuleBase_Tools.h"
 
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Events.h>
@@ -46,9 +47,9 @@ ModuleBase_Dialog::ModuleBase_Dialog(ModuleBase_IWorkshop* theParent, const QStr
                                      myActiveWidget(0)
 {
   ModuleBase_WidgetFactory aFactory(myDescription, myWorkshop);
-  std::string aTitle = aFactory.widgetAPI()->getProperty(FEATURE_TEXT);
+  QString aTitle = ModuleBase_Tools::translate("ModuleBase_Dialog", aFactory.widgetAPI()->getProperty(FEATURE_TEXT));
 
-  setWindowTitle(aTitle.c_str());
+  setWindowTitle(aTitle);
 
   SessionPtr aMgr = ModelAPI_Session::get();
   std::shared_ptr<ModelAPI_Document> aDoc = aMgr->activeDocument();
index 83dc65f57068644313d1bbc314cdd56acd632fdf..5e0e407e3d23b45d9f740712d4a633163a65d91d 100644 (file)
@@ -36,9 +36,9 @@ ModuleBase_WidgetLabelValue::ModuleBase_WidgetLabelValue(QWidget* theParent,
   aLayout->setContentsMargins(0, 0, 0, 0);
   aLayout->setSpacing(0);
 
-  QString aText = QString::fromStdString(theData->widgetLabel());
+  QString aText = translate(theData->widgetLabel());
   QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
-  QString aToolTip = QString::fromStdString(theData->widgetTooltip());
+  QString aToolTip = translate(theData->widgetTooltip());
 
   myLabel = new ModuleBase_LabelValue(theParent, aText, aToolTip, aLabelIcon);
   bool isOk;
index f338f8eaa8c6c7f8f33e09e911cf354f55b09893..43b380cf7a7fb69f41702d7c66cf187d61abc48c 100644 (file)
@@ -165,7 +165,7 @@ ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParen
     }
   }
 
-  QString aToolTip = QString::fromStdString(theData->widgetTooltip());
+  QString aToolTip = translate(theData->widgetTooltip());
   QString anObjName = QString::fromStdString(attributeID());
   myListView = new ModuleBase_ListView(this, anObjName, aToolTip);
   connect(myListView->getControl(), SIGNAL(itemSelectionChanged()), SLOT(onListSelection()));
diff --git a/src/ModuleBase/ModuleBase_msg_fr.ts b/src/ModuleBase/ModuleBase_msg_fr.ts
new file mode 100644 (file)
index 0000000..af12d6c
--- /dev/null
@@ -0,0 +1,320 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="fr_FR">
+<context>
+    <name>ExpressionEditor</name>
+    <message>
+        <location filename="ModuleBase_WidgetExprEditor.cpp" line="65"/>
+        <source>Ctrl+Space</source>
+        <comment>Complete</comment>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ModuleBase_FilterItem</name>
+    <message>
+        <location filename="ModuleBase_WidgetSelectionFilter.cpp" line="192"/>
+        <source>Reverse the filter</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_WidgetSelectionFilter.cpp" line="202"/>
+        <source>Delete the filter</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ModuleBase_FilterStarter</name>
+    <message>
+        <location filename="ModuleBase_WidgetSelectionFilter.cpp" line="95"/>
+        <source>Selection by filters</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ModuleBase_ListView</name>
+    <message>
+        <location filename="ModuleBase_ListView.cpp" line="45"/>
+        <source>Copy</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_ListView.cpp" line="51"/>
+        <source>Delete</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ModuleBase_PreferencesDlg</name>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="251"/>
+        <source>Edit preferences</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="267"/>
+        <source>Default</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="285"/>
+        <source>Desktop</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="291"/>
+        <source>Module</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="300"/>
+        <source>Viewer</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="303"/>
+        <source>Horizontal gradient</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="303"/>
+        <source>Vertical gradient</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="303"/>
+        <source>First diagonal gradient</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="304"/>
+        <source>Second diagonal gradient</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="304"/>
+        <source>First corner gradient</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="305"/>
+        <source>Second corner gradient</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="305"/>
+        <source>Third corner gradient</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="306"/>
+        <source>Fourth corner gradient</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="312"/>
+        <source>Background</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="316"/>
+        <source>Viewer 3d</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="328"/>
+        <source>Default selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="330"/>
+        <source>Faces</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="333"/>
+        <source>Edges</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="336"/>
+        <source>Vertices</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="340"/>
+        <source>Selection sensitivity</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="342"/>
+        <source>Vertex</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="344"/>
+        <source>Edge</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="347"/>
+        <source>Additional highlighting</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="349"/>
+        <source>In 3d mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="351"/>
+        <source>In 2d mode</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="354"/>
+        <source>Color scale</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="356"/>
+        <source>X position</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="361"/>
+        <source>Y position</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="366"/>
+        <source>Width</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="371"/>
+        <source>Height</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="376"/>
+        <source>Intervals number</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="381"/>
+        <source>Text height</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="386"/>
+        <source>Text color</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="392"/>
+        <source>Main menu</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="394"/>
+        <source>Size</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="397"/>
+        <source>Number of rows</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Preferences.cpp" line="404"/>
+        <source>Show Status Bar</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ModuleBase_WidgetFileSelector</name>
+    <message>
+        <location filename="ModuleBase_WidgetFileSelector.cpp" line="70"/>
+        <source>Select file...</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ModuleBase_WidgetMultiSelector</name>
+    <message>
+        <location filename="ModuleBase_WidgetMultiSelector.cpp" line="133"/>
+        <source>Type</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_WidgetMultiSelector.cpp" line="188"/>
+        <source>Show only</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_WidgetMultiSelector.cpp" line="199"/>
+        <source>Add elements that share the same topology</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ModuleBase_WidgetSelectionFilter</name>
+    <message>
+        <location filename="ModuleBase_WidgetSelectionFilter.cpp" line="242"/>
+        <source>Filters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_WidgetSelectionFilter.cpp" line="253"/>
+        <source>Add new filter...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_WidgetSelectionFilter.cpp" line="276"/>
+        <source>Select</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_WidgetSelectionFilter.cpp" line="287"/>
+        <source>Number of selected objects:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_WidgetSelectionFilter.cpp" line="293"/>
+        <source>Show only</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_WidgetSelectionFilter.cpp" line="551"/>
+        <location filename="ModuleBase_WidgetSelectionFilter.cpp" line="631"/>
+        <source>Selection is empty</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <location filename="ModuleBase_Tools.cpp" line="942"/>
+        <source>Selected objects can be used in Part documents which are not loaded:%1.
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Tools.cpp" line="1011"/>
+        <source>Delete features</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Tools.cpp" line="1021"/>
+        <source>The following parts will be deleted: %1.
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="ModuleBase_Tools.cpp" line="1039"/>
+        <source>Replace</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
index 47f29b01bc86c4494d235d84a3f76fe2856e6879..bb589e36bb248ad1c1f1fed5ff7c99cfa413baf4 100644 (file)
@@ -26,6 +26,8 @@ INCLUDE_DIRECTORIES(${QT_INCLUDES})
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(${QT_DEFINITIONS})
 
+SET(UPDATE_TRANSLATION OFF)
+
 SET(PROJECT_HEADERS
     PartSet.h
     PartSet_Constants.h
@@ -115,9 +117,9 @@ SET(PROJECT_RESOURCES
     PartSet_icons.qrc
 )
 
-#SET(TEXT_RESOURCES
-#    PartSet_msg_fr.ts
-#)
+SET(TEXT_RESOURCES
+    PartSet_msg_fr.ts
+)
 
 SET(PROJECT_LIBRARIES
     ModuleBase
@@ -135,17 +137,22 @@ QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
 
 # sources / rcc wrappings
 QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
-#QT4_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
-#QT4_CREATE_TRANSLATION(QM_RESOURCES
-#                       ${PROJECT_SOURCES}
-#                       ${TEXT_RESOURCES}
-#                       OPTIONS -extensions cpp -no-recursive
-#                       )
-
-#SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
-#SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${PROJECT_RESOURCES})
+
+IF (${UPDATE_TRANSLATION})
+    SET(PROJECT_FILES ${PROJECT_SOURCES} ${ROJECT_HEADERS} )
+    QT5_CREATE_TRANSLATION(QM_RESOURCES
+                           ${PROJECT_FILES}
+                           ${TEXT_RESOURCES}
+                           OPTIONS -extensions cpp -no-recursive
+                          )
+ELSE(${UPDATE_TRANSLATION)
+    QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+ENDIF(${UPDATE_TRANSLATION)
+
+SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
+#SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
+SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
+#SOURCE_GROUP ("Resource Files" FILES ${PROJECT_RESOURCES})
 
 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/XGUI
                     ${PROJECT_SOURCE_DIR}/src/Config
@@ -179,8 +186,8 @@ ADD_LIBRARY(PartSet SHARED
     ${PROJECT_HEADERS}
     ${PROJECT_COMPILED_RESOURCES}
     ${PROJECT_AUTOMOC}
-#    ${TEXT_RESOURCES}
-#    ${QM_RESOURCES}
+    ${TEXT_RESOURCES}
+    ${QM_RESOURCES}
 )
 
 # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
@@ -189,4 +196,4 @@ TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI GeomAlgoAPI)
 ADD_DEPENDENCIES(PartSet ModuleBase)
 
 INSTALL(TARGETS PartSet DESTINATION ${SHAPER_INSTALL_BIN})
-#INSTALL(FILES ${QM_RESOURCES} DESTINATION bin)
+INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
index a201d5d385578e0ed9a50736a2c775d69a0b2d93..9cb8ab40154d34824504753624e699c697543978 100644 (file)
@@ -88,7 +88,7 @@ PartSet_WidgetSketchCreator::PartSet_WidgetSketchCreator(QWidget* theParent,
   // Size of the View control
   mySizeOfViewWidget = new QWidget(this);
   QHBoxLayout* aSizeLayout = new QHBoxLayout(mySizeOfViewWidget);
-  aSizeLayout->addWidget(new QLabel("Size of the view", mySizeOfViewWidget));
+  aSizeLayout->addWidget(new QLabel(tr("Size of the view"), mySizeOfViewWidget));
   mySizeOfView = new QLineEdit(mySizeOfViewWidget);
 
   QDoubleValidator* aValidator = new QDoubleValidator(0, DBL_MAX, 12, mySizeOfView);
index dafd2526ff3e44a57c511dcf38c9b1100d148f8f..4b540a735bd6294cacfc5da7c41fe18130e2749b 100644 (file)
@@ -111,10 +111,10 @@ myIsSelection(false)
   mySizeOfView->setValidator(aValidator);
   aSizeLayout->addWidget(mySizeOfView);
 
-  QString aText = QString::fromStdString(theData->getProperty("title"));
+  QString aText = translate(theData->getProperty("title"));
   QLabel* aLabel = new QLabel(aText, aFirstWgt);
   aLabel->setWordWrap(true);
-  QString aTooltip = QString::fromStdString(theData->getProperty("tooltip"));
+  QString aTooltip = translate(theData->getProperty("tooltip"));
   aLabel->setToolTip(aTooltip);
   aLabel->setIndent(5);
 
diff --git a/src/PartSet/PartSet_msg_fr.ts b/src/PartSet/PartSet_msg_fr.ts
new file mode 100644 (file)
index 0000000..204b7f4
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="fr_FR">
+<context>
+    <name>PartSet_MenuMgr</name>
+    <message>
+        <location filename="PartSet_MenuMgr.cpp" line="91"/>
+        <location filename="PartSet_MenuMgr.cpp" line="529"/>
+        <source>Auxiliary</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_MenuMgr.cpp" line="95"/>
+        <location filename="PartSet_MenuMgr.cpp" line="100"/>
+        <source>Activate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_MenuMgr.cpp" line="104"/>
+        <source>Edit...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_MenuMgr.cpp" line="185"/>
+        <location filename="PartSet_MenuMgr.cpp" line="324"/>
+        <location filename="PartSet_MenuMgr.cpp" line="528"/>
+        <source>Detach</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_MenuMgr.cpp" line="317"/>
+        <source>Detach %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>PartSet_WidgetPoint2D</name>
+    <message>
+        <location filename="PartSet_WidgetPoint2d.cpp" line="118"/>
+        <source>X</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetPoint2d.cpp" line="134"/>
+        <source>Y</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>PartSet_WidgetSketchCreator</name>
+    <message>
+        <location filename="PartSet_WidgetSketchCreator.cpp" line="91"/>
+        <source>Size of the view</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchCreator.cpp" line="546"/>
+        <source>Apply current feature</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchCreator.cpp" line="547"/>
+        <source>Sketch is invalid and will be deleted.
+Error: %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>PartSet_WidgetSketchLabel</name>
+    <message>
+        <location filename="PartSet_WidgetSketchLabel.cpp" line="126"/>
+        <source>Remove external dependencies</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchLabel.cpp" line="140"/>
+        <source>Sketcher plane</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchLabel.cpp" line="143"/>
+        <source>Reversed</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchLabel.cpp" line="147"/>
+        <source>Set plane view</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchLabel.cpp" line="154"/>
+        <source>Show geometrical constraints</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchLabel.cpp" line="155"/>
+        <source>Show dimensional constraints</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchLabel.cpp" line="156"/>
+        <source>Show existing expressions</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchLabel.cpp" line="171"/>
+        <source>Show free points</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchLabel.cpp" line="175"/>
+        <source>Automatic constraints</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_WidgetSketchLabel.cpp" line="179"/>
+        <source>Change sketch plane</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <location filename="PartSet_TreeNodes.cpp" line="402"/>
+        <source>Parameters</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_TreeNodes.cpp" line="404"/>
+        <source>Constructions</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_TreeNodes.cpp" line="406"/>
+        <source>Parts</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_TreeNodes.cpp" line="408"/>
+        <source>Results</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_TreeNodes.cpp" line="410"/>
+        <source>Fields</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="PartSet_TreeNodes.cpp" line="412"/>
+        <source>Groups</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
index d5e5bf833fefc51da14c82b6e8e3083e6d626c9c..79ec5dd47c5593070ce5a9745f1a8a0576721f21 100644 (file)
@@ -752,12 +752,13 @@ void XGUI_Workshop::fillPropertyPanel(ModuleBase_Operation* theOperation)
   myModule->propertyPanelDefined(theOperation);
 
 #ifndef DEBUG_FEATURE_NAME
-  myPropertyPanel->setWindowTitle(theOperation->getDescription()->description());
+  myPropertyPanel->setWindowTitle(ModuleBase_Tools::translate("workshop",
+    theOperation->getDescription()->description().toStdString()));
 #else
   std::string aFeatureName = aFeature->name();
   myPropertyPanel->setWindowTitle(QString("%1: %2")
-    .arg(theOperation->getDescription()->description())
-    .arg(aFeatureName.c_str()));
+    .arg(translate(theOperation->getDescription()->description()))
+    .arg(translate(aFeatureName.c_str())));
 #endif
 
   myErrorMgr->setPropertyPanel(myPropertyPanel);
@@ -1960,7 +1961,7 @@ void XGUI_Workshop::cleanHistory()
     QString anUnusedNames = aNames.join(", ");
 
     QString anActionId = "CLEAN_HISTORY_CMD";
-    QString aDescription = contextMenuMgr()->action(anActionId)->text();
+    QString aDescription = ModuleBase_Tools::translate("workshop", contextMenuMgr()->action(anActionId)->text().toStdString());
 
     QMessageBox aMessageBox(desktop());
     aMessageBox.setWindowTitle(aDescription);
@@ -2462,7 +2463,7 @@ void XGUI_Workshop::changeTransparency(const QObjectPtrList& theObjects)
 
   // 2. show the dialog to change the value
   XGUI_PropertyDialog* aDlg = new XGUI_PropertyDialog(desktop());
-  aDlg->setWindowTitle("Transparency");
+  aDlg->setWindowTitle(tr("Transparency"));
   XGUI_TransparencyWidget* aTransparencyWidget = new XGUI_TransparencyWidget(aDlg);
   connect(aTransparencyWidget, SIGNAL(transparencyValueChanged()),
           this, SLOT(onTransparencyValueChanged()));