]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Translation of operations
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 10 Jun 2016 10:02:46 +0000 (13:02 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 10 Jun 2016 10:03:03 +0000 (13:03 +0300)
src/ExchangePlugin/CMakeLists.txt
src/ExchangePlugin/ExchangePlugin_msg_en.ts [new file with mode: 0644]
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_Validators.cpp
src/FeaturesPlugin/FeaturesPlugin_msg_en.ts [new file with mode: 0644]
src/PythonAddons/CMakeLists.txt
src/PythonAddons/PythonAddons_msg_en.ts [new file with mode: 0644]

index e92e026cbebe6e8dce8b76240f6f5b87e9d19986..2528e4bb318e0423562bbb57ef82513d8e07ff20 100644 (file)
@@ -31,6 +31,10 @@ SET(XML_RESOURCES
     plugin-Exchange.xml
 )
 
+SET(TEXT_RESOURCES
+       ExchangePlugin_msg_en.ts
+)
+
 SET(PROJECT_LIBRARIES
     Events
     Config
@@ -38,15 +42,17 @@ SET(PROJECT_LIBRARIES
     GeomAPI
     GeomAlgoAPI
 )
+SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
 
 ADD_DEFINITIONS(-DEXCHANGEPLUGIN_EXPORTS)
-ADD_LIBRARY(ExchangePlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
+ADD_LIBRARY(ExchangePlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
 
 TARGET_LINK_LIBRARIES(ExchangePlugin ${PROJECT_LIBRARIES})
 
 INSTALL(TARGETS ExchangePlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Exchange)
+INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
 
 ADD_UNIT_TESTS(TestImport.py TestExport.py)
 
diff --git a/src/ExchangePlugin/ExchangePlugin_msg_en.ts b/src/ExchangePlugin/ExchangePlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..7eecf13
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+  <context>
+    <name>Import</name>
+    <message>
+      <source>Model_FeatureValidator: Attribute "file_path" is not initialized.</source>
+      <translation>Input file name for import</translation>
+    </message>
+    <message>
+      <source>file_path - ExchangePlugin_ImportFormat: File name is empty.</source>
+      <translation>Input file name for import</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Export</name>
+    <message>
+      <source>Model_FeatureValidator: Attribute "file_format" is not initialized.</source>
+      <translation>Export file name is not defined</translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "selection_list" is not initialized.</source>
+      <translation>Objects for export are not selected</translation>
+    </message>
+    <message>
+      <source>file_path - ExchangePlugin_ExportFormat: File name is empty.</source>
+      <translation>Export file name is not defined</translation>
+    </message>
+  </context>
+</TS>
index bb7849f33f0464e876b3917fe67b8cb320ae1f6f..edd823596b23bcd3e6f27d8422f120df1498aeb9 100644 (file)
@@ -73,6 +73,13 @@ SET(XML_RESOURCES
   remove_subshapes_widget.xml
 )
 
+SET(TEXT_RESOURCES
+       FeaturesPlugin_msg_en.ts
+)
+
+SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
+
+
 INCLUDE_DIRECTORIES(
   ../ModelAPI
   ../GeomAPI
@@ -90,12 +97,13 @@ SET(PROJECT_LIBRARIES
 )
 
 ADD_DEFINITIONS(-DFEATURESPLUGIN_EXPORTS)
-ADD_LIBRARY(FeaturesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
+ADD_LIBRARY(FeaturesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
 TARGET_LINK_LIBRARIES(FeaturesPlugin ${PROJECT_LIBRARIES})
 
 INSTALL(TARGETS FeaturesPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Features)
+INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
 
 ADD_UNIT_TESTS(TestExtrusion.py
                TestExtrusionCut.py
index 2ab3adbb06d75f78451ff4e0abf2e655636eb5b0..eb201778744c54f058e0883b5ce36c5d16efd799 100644 (file)
@@ -615,6 +615,7 @@ bool FeaturesPlugin_ValidatorRemoveSubShapesResult::isValid(const std::shared_pt
   // Copy base shape.
   GeomShapePtr aBaseShape = aShapeAttrSelection->value();
   if(!aBaseShape.get()) {
+    theError = "Error: Base shape is empty.";
     return false;
   }
   GeomShapePtr aResultShape = aBaseShape->emptyCopied();
diff --git a/src/FeaturesPlugin/FeaturesPlugin_msg_en.ts b/src/FeaturesPlugin/FeaturesPlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..add8066
--- /dev/null
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+  <context>
+    <name>Extrusion</name>
+    <message>
+      <source>GeomValidators_ZeroOffset: FromSize = -ToSize and bounding planes are coincident.</source>
+      <translation>Extrusion offset is not defined</translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "base" is not initialized.</source>
+      <translation>Base object for extrusion is not defined</translation>
+    </message>
+    <message>
+      <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The object is empty</source>
+      <translation>Sketch is not selected</translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: ToSize = -FromSize.</source>
+      <translation>Extrusion offset is not defined</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>ExtrusionCut</name>
+    <message>
+      <source>GeomValidators_ZeroOffset: FromSize = -ToSize and bounding planes are coincident.</source>
+      <translation>Extrusion offset is not defined</translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "base" is not initialized.</source>
+      <translation>Base object for extrusion is not defined</translation>
+    </message>
+    <message>
+      <source>main_objects - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: </source>
+      <translation>Objects for extrusion are not selected</translation>
+    </message>
+    <message>
+      <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The object is empty</source>
+      <translation>Sketch is not selected</translation>
+    </message>
+    <message>
+      <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The result is empty</source>
+      <translation>Sketch is not selected</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Revolution</name>
+    <message>
+      <source>GeomValidators_ZeroOffset: FromSize = -ToSize and bounding planes are coincident.</source>
+      <translation>Angle offset is not defined</translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "axis_object" is not initialized.</source>
+      <translation>Revolution axis is not selected</translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The object is empty</source>
+      <translation>Revolution axis is not selected</translation>
+    </message>
+    <message>
+      <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The object is empty</source>
+      <translation>Sketch is not selected</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>RevolutionCut</name>
+    <message>
+      <source>GeomValidators_ZeroOffset: FromSize = -ToSize and bounding planes are coincident.</source>
+      <translation>Angle offset is not defined</translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "axis_object" is not initialized.</source>
+      <translation>Revolution axis is not selected</translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The object is empty</source>
+      <translation>Revolution axis is not selected</translation>
+    </message>
+    <message>
+      <source>main_objects - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: </source>
+      <translation>Objects for revolution are not selected</translation>
+    </message>
+    <message>
+      <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The object is empty</source>
+      <translation>Sketch is not selected</translation>
+    </message>
+    <message>
+      <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The result is empty</source>
+      <translation>Sketch is not selected</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>ExtrusionFuse</name>
+    <message>
+      <source>GeomValidators_ZeroOffset: FromSize = -ToSize and bounding planes are coincident.</source>
+      <translation>Extrusion offset is not defined</translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "base" is not initialized.</source>
+      <translation>Base objects for extrusion are not selected</translation>
+    </message>
+    <message>
+      <source>main_objects - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: </source>
+      <translation>Base objects for extrusion are not selected</translation>
+    </message>
+    <message>
+      <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The object is empty</source>
+      <translation>Sketch is not selected</translation>
+    </message>
+    <message>
+      <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The result is empty</source>
+      <translation>Sketch is not selected</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>RevolutionFuse</name>
+    <message>
+      <source>GeomValidators_ZeroOffset: FromSize = -ToSize and bounding planes are coincident.</source>
+      <translation>Offset angle is not defined</translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "axis_object" is not initialized.</source>
+      <translation>Rotation axis is not selected</translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The object is empty</source>
+      <translation>Rotation axis is not selected</translation>
+    </message>
+    <message>
+      <source>main_objects - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: </source>
+      <translation>Base objects for revolution are not selected</translation>
+    </message>
+    <message>
+      <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The object is empty</source>
+      <translation>Sketch is not selected</translation>
+    </message>
+    <message>
+      <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The result is empty</source>
+      <translation>Sketch is not selected</translation>
+    </message>
+  </context>
+
+  <context>
+    <name>Boolean</name>
+    <message>
+      <source>GeomValidators_BooleanArguments: Not enough arguments</source>
+      <translation>Not enough arguments for the operation</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Partition</name>
+    <message>
+      <source>GeomValidators_MinObjectsSelected: Error: Attribute "base_objects" should contain at least 2 items.</source>
+      <translation>At least two objects has to be selected for the operation</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Pipe</name>
+    <message>
+      <source>Model_FeatureValidator: Attribute "base_objects" is not initialized.</source>
+      <translation>Base object for pipe is not selected</translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "binormal" is not initialized.</source>
+      <translation>Binormal vector is not selected</translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "path_object" is not initialized.</source>
+      <translation>Object for pipe path is not selected</translation>
+    </message>
+    <message>
+      <source>binormal - GeomValidators_ShapeType: The object is empty</source>
+      <translation>Binormal vector is not selected</translation>
+    </message>
+    <message>
+      <source>path_object - FeaturesPlugin_ValidatorPipePath: Error: Empty context.</source>
+      <translation>Object for pipe path is not selected</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Remove_SubShapes</name>
+    <message>
+      <source>FeaturesPlugin_ValidatorRemoveSubShapesResult: Error: Base shape is empty.</source>
+      <translation>Base shape is not selected</translation>
+    </message>
+    <message>
+      <source>base_shape - GeomValidators_BodyShapes: Error: Context is empty.</source>
+      <translation>Context object is not selected</translation>
+    </message>
+    <message>
+      <source>subshapes - FeaturesPlugin_ValidatorRemoveSubShapesSelection: Error: Empty context.</source>
+      <translation>Context object is not selected</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Intersection</name>
+    <message>
+      <source>Model_FeatureValidator: Attribute "main_objects" is not initialized.</source>
+      <translation>Main object is not selected</translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "tool_objects" is not initialized.</source>
+      <translation>A tool object is not selected</translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Placement</name>
+    <message>
+      <source>Model_FeatureValidator: Attribute "placement_centering" is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "placement_end_shape" is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>placement_end_shape - PartSet_DifferentObjects: The feature uses one shape in placement_end_shape and placement_start_shape attributes.</source>
+      <translation></translation>
+    </message>
+  </context>
+</TS>
index c50337a90a7b4aa4286c7bcf321749678ea52293..b6704ac65c1b75b253b762f8e92c9c532fe2ab71 100644 (file)
@@ -3,6 +3,10 @@
 
 SET(CMAKE_AUTOMOC ON)
 
+SET(TEXT_RESOURCES
+       PythonAddons_msg_en.ts
+)
+
 # configuration
 IF(${HAVE_SALOME})
   SET(ADDONS_FOLDER_PATH ../../../../bin/salome)
@@ -21,3 +25,4 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/addons_Features.xml DESTINATION ${SHAP
 INSTALL(FILES __init__.py DESTINATION ${SHAPER_INSTALL_ADDONS})
 INSTALL(DIRECTORY macros DESTINATION ${SHAPER_INSTALL_ADDONS})
 INSTALL(DIRECTORY macros/box/icons/ macros/rectangle/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
+INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
diff --git a/src/PythonAddons/PythonAddons_msg_en.ts b/src/PythonAddons/PythonAddons_msg_en.ts
new file mode 100644 (file)
index 0000000..43ba4a1
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+  <name>Box</name>
+  <message>
+    <source>Model_FeatureValidator: Attribute "height" is not initialized.</source>
+    <translation>Height of the box is not defined</translation>
+  </message>
+</context>
+</TS>