]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Add translations
authorspo <sergey.pokhodenko@opencascade.com>
Fri, 24 Jun 2016 16:05:52 +0000 (19:05 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 24 Jun 2016 16:06:06 +0000 (19:06 +0300)
src/BuildPlugin/BuildPlugin_msg_en.ts [new file with mode: 0644]
src/ConstructionPlugin/ConstructionPlugin_msg_en.ts [new file with mode: 0644]
src/ExchangePlugin/ExchangePlugin_msg_en.ts
src/FeaturesPlugin/FeaturesPlugin_msg_en.ts
src/Model/Model_AttributeValidator.cpp
src/Model/Model_FeatureValidator.cpp
src/Model/Model_Session.cpp
src/ParametersPlugin/ParametersPlugin_msg_ru.ts
src/PythonAddons/PythonAddons_msg_en.ts
src/SketchPlugin/SketchPlugin_msg_en.ts

diff --git a/src/BuildPlugin/BuildPlugin_msg_en.ts b/src/BuildPlugin/BuildPlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..aa6d84d
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+  <context>
+    <name>Edge</name>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Could not get selection list.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Empty selection list.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Could not get selection.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Attribute have empty context.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Empty shape selected.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Inifinte objects not acceptable.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Selected shape is in the local selection. Only global selection is allowed.</source>
+      <translation></translation>
+    </message>    
+  </context>
+  
+  <context>
+    <name>Face</name>
+    <message>
+      <source>BuildPlugin_ValidatorBaseForFace: Empty attribute \"%1\".</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>BuildPlugin_ValidatorBaseForFace: Error while checking if edges intersects.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>BuildPlugin_ValidatorBaseForFace: Selected objects have intersections.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>BuildPlugin_ValidatorBaseForFace: Selected objects are not planar.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>BuildPlugin_ValidatorBaseForFace: Selected objects does not have closed contours.</source>
+      <translation></translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Shell</name>
+    <message>
+      <source>base_objects - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: %1</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - GeomValidators_ShapeType: It has reference to an empty attribute</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - GeomValidators_ShapeType: Shape type is \"%1\", it should be \"%2\"</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - GeomValidators_ShapeType: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - GeomValidators_ShapeType: The object is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - GeomValidators_ShapeType: The result is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - GeomValidators_ShapeType: The shape is empty</source>
+      <translation></translation>
+    </message>
+  </context>
+  
+  
+  <context>
+    <name>SubShapes</name>
+    <message>
+      <source>subshapes - BuildPlugin_ValidatorSubShapesSelection: Could not get selection list.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>subshapes - BuildPlugin_ValidatorSubShapesSelection: Base shape is empty.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>subshapes - BuildPlugin_ValidatorSubShapesSelection: Empty attribute in list.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>subshapes - BuildPlugin_ValidatorSubShapesSelection: Selected shape has unacceptable type.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>subshapes - BuildPlugin_ValidatorSubShapesSelection: Selected shape is not inside base face.</source>
+      <translation></translation>
+    </message>
+  </context>
+
+  <context>
+    <name>SubShapes</name>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Could not get selection list.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Empty selection list.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Could not get selection.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Attribute have empty context.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Empty shape selected.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Inifinte objects not acceptable.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>base_objects - BuildPlugin_ValidatorBaseForBuild: Selected shape is in the local selection. Only global selection is allowed.</source>
+      <translation></translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Wire</name>
+    <message>
+      <source>BuildPlugin_ValidatorBaseForWire: Empty attribute \"%1\".</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>BuildPlugin_ValidatorBaseForWire: Result wire empty. Probably it has disconnected edges or non-manifold.</source>
+      <translation></translation>
+    </message>
+  </context>
+</TS>
diff --git a/src/ConstructionPlugin/ConstructionPlugin_msg_en.ts b/src/ConstructionPlugin/ConstructionPlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..b0c2764
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+  <context>
+    <name>Axis</name>
+    <message>
+      <source>CylindricalFace - GeomValidators_Face: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>CylindricalFace - GeomValidators_Face: The shape is not a face.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>CylindricalFace - GeomValidators_Face: The shape is not a face.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>CylindricalFace - GeomValidators_Face: The shape is not a plane.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>CylindricalFace - GeomValidators_Face: The shape is not a cylinder.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>CylindricalFace - GeomValidators_Face: The shape is not an available face.</source>
+      <translation></translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Plane</name>
+    <message>
+      <source>planeFace - GeomValidators_Face: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>planeFace - GeomValidators_Face: The shape is not a face.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>planeFace - GeomValidators_Face: The shape is not a face.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>planeFace - GeomValidators_Face: The shape is not a plane.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>planeFace - GeomValidators_Face: The shape is not a cylinder.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>planeFace - GeomValidators_Face: The shape is not an available face.</source>
+      <translation></translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Point</name>
+    <message>
+      <source>Model_FeatureValidator: Attribute "x" is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "y" is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "z" is not initialized.</source>
+      <translation></translation>
+    </message>
+  </context>
+</TS>
index 7eecf134feed7ff3b18007d3a6612c94ca744ba0..4a367ef1923c4bae2d953879f2282cff4b992070 100644 (file)
       <source>file_path - ExchangePlugin_ExportFormat: File name is empty.</source>
       <translation>Export file name is not defined</translation>
     </message>
+    
+    <message>
+      <source>selection_list - GeomValidators_Finite: Infinite result is selected.</source>
+      <translation></translation>
+    </message>    
   </context>
 </TS>
index 8eb2aff7e89b29716f3627e3c811073a1192526d..2f75b3a24e49766886b5bc1f307b6769034c89fe 100644 (file)
       <source>GeomValidators_ZeroOffset: ToSize = -FromSize.</source>
       <translation>Extrusion offset is not defined</translation>
     </message>
+    
+    <message>
+      <source>FeaturesPlugin_ValidatorExtrusionDir: Error: Validator should be used with 2 parameters for extrusion.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorExtrusionDir: Error: Base objects list contains vertex or edge, so attribute \"%1\" can not be used with default value. Select direction for extrusion.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorExtrusionDir: Error: Direction is parallel to one of the selected face or face on selected shell.</source>
+      <translation></translation>
+    </message>
+    
   </context>
   
   <context>
       <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The result is empty</source>
       <translation>Sketch is not selected</translation>
     </message>
+    
+    <message>
+      <source>FeaturesPlugin_ValidatorExtrusionDir: Error: Validator should be used with 2 parameters for extrusion.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorExtrusionDir: Error: Base objects list contains vertex or edge, so attribute \"%1\" can not be used with default value. Select direction for extrusion.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorExtrusionDir: Error: Direction is parallel to one of the selected face or face on selected shell.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The object is empty</source>
       <translation>Sketch is not selected</translation>
     </message>
+    
+    <message>
+      <source>GeomValidators_ZeroOffset: Wrong number of validator arguments in xml(expected 9).</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: ToSize = -FromSize.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: From face selection is invalid.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: To face selection is invalid.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: From face selection is invalid.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: To face selection is invalid.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The result is empty</source>
       <translation>Sketch is not selected</translation>
     </message>
+    
+    <message>
+      <source>GeomValidators_ZeroOffset: Wrong number of validator arguments in xml(expected 9).</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: ToSize = -FromSize.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: From face selection is invalid.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: To face selection is invalid.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: From face selection is invalid.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: To face selection is invalid.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The result is empty</source>
       <translation>Sketch is not selected</translation>
     </message>
+    
+    <message>
+      <source>FeaturesPlugin_ValidatorExtrusionDir: Error: Validator should be used with 2 parameters for extrusion.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorExtrusionDir: Error: Base objects list contains vertex or edge, so attribute \"%1\" can not be used with default value. Select direction for extrusion.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorExtrusionDir: Error: Direction is parallel to one of the selected face or face on selected shell.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>sketch - FeaturesPlugin_ValidatorCompositeLauncher: The result is empty</source>
       <translation>Sketch is not selected</translation>
     </message>
+    
+    <message>
+      <source>GeomValidators_ZeroOffset: Wrong number of validator arguments in xml(expected 9).</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: ToSize = -FromSize.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: From face selection is invalid.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: To face selection is invalid.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: From face selection is invalid.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_ZeroOffset: To face selection is invalid.</source>
+      <translation></translation>
+    </message>
   </context>
 
   <context>
       <source>GeomValidators_BooleanArguments: Not enough arguments</source>
       <translation>Not enough arguments for the operation</translation>
     </message>
+
+    <message>
+      <source>GeomValidators_BooleanArguments: Wrong number of arguments (expected 3).</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
     <name>Partition</name>
     <message>
-      <source>GeomValidators_MinObjectsSelected: Error: Attribute "base_objects" should contain at least 2 items.</source>
+      <source>GeomValidators_MinObjectsSelected: Error: Attribute \"%1\" should contain at least %2 items.</source>
       <translation>At least two objects has to be selected for the operation</translation>
     </message>
+    
+    <message>
+      <source>GeomValidators_MinObjectsSelected: Error: Wrong number of arguments (expected 2): selection list id and min number of objects</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>GeomValidators_MinObjectsSelected: Error: Could not get attribute \"%1\".</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>path_object - FeaturesPlugin_ValidatorPipePath: Error: Empty context.</source>
       <translation>Object for pipe path is not selected</translation>
     </message>
+    
+    <message>
+      <source>FeaturesPlugin_ValidatorPipeLocations: Error: Feature \"%1\" does not supported by this validator.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorPipeLocations: Error: Could not get \"%1\" attribute.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorPipeLocations: Error: Could not get \"%1\" attribute.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorPipeLocations: Error: Could not get \"%1\" attribute.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorPipeLocations: Error: Number of locations should be the same as base objects.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>subshapes - FeaturesPlugin_ValidatorRemoveSubShapesSelection: Error: Empty context.</source>
       <translation>Context object is not selected</translation>
     </message>
+    
+    <message>
+      <source>FeaturesPlugin_ValidatorRemoveSubShapesResult: Error: Feature \"%1\" does not supported by this validator.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorRemoveSubShapesResult: Error: Could not get \"%1\" attribute.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorRemoveSubShapesResult: Error: Could not get \"%1\" attribute.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorRemoveSubShapesResult: Error: Base shape is empty.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorRemoveSubShapesResult: Error: Resulting shape is not valid.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>Model_FeatureValidator: Attribute "tool_objects" is not initialized.</source>
       <translation>A tool object is not selected</translation>
     </message>
+    
+    <message>
+      <source>tool_objects - GeomValidators_IntersectionSelection: Error: empty selection.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>tool_objects - GeomValidators_IntersectionSelection: Error: empty attribute selection.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>tool_objects - GeomValidators_IntersectionSelection: Error: empty selection context.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>tool_objects - GeomValidators_IntersectionSelection: Error: empty feature.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>tool_objects - GeomValidators_IntersectionSelection: Error: %1 shape is not allowed for selection.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>tool_objects - GeomValidators_IntersectionSelection: Error: empty shape.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>tool_objects - GeomValidators_IntersectionSelection: Error: selected shape has the wrong type.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>Model_FeatureValidator: Attribute "placement_objects_list" is not initialized.</source>
       <translation>Objects for placement are not selected</translation>
     </message>
+    
+    <message>
+      <source>placement_objects_list - FeaturesPlugin_ValidatorTransform: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>placement_objects_list - FeaturesPlugin_ValidatorTransform: Objects from the %1 group can be selected in the %2 document, but an objects from the %3 group is selected.</source>
+      <translation></translation>
+    </message>
   </context>
   <context>
     <name>Rotation</name>
       <source>axis_object - GeomValidators_ShapeType: The object is empty</source>
       <translation>Rotation axis is not selected</translation>
     </message>
+    
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: %1</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: It has reference to an empty attribute</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: Shape type is \"%1\", it should be \"%2\"</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The object is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The result is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The shape is empty</source>
+      <translation></translation>
+    </message>
   </context>
   <context>
     <name>Translation</name>
       <source>axis_object - GeomValidators_ShapeType: The object is empty</source>
       <translation>Translation axis is not selected</translation>
     </message>
+    
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: %1</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: It has reference to an empty attribute</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: Shape type is \"%1\", it should be \"%2\"</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The object is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The result is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>axis_object - GeomValidators_ShapeType: The shape is empty</source>
+      <translation></translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>Group</name>
+    <message>
+      <source>group_list - GeomValidators_BodyShapes: Error: Context is empty.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>group_list - GeomValidators_BodyShapes: Error: Result construction selected.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>group_list - GeomValidators_BodyShapes: Error: Attribute \"%1\" does not supported by this validator.</source>
+      <translation></translation>
+    </message>
+  </context>
+
+  <context>
+    <name>Union</name>
+    <message>
+      <source>FeaturesPlugin_ValidatorUnionArguments: Error: This validator supports only \"%1\" feature.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorUnionArguments: Error: Could not get \"%1\" attribute.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>FeaturesPlugin_ValidatorUnionArguments: Error: Not all shapes have shared topology.</source>
+      <translation></translation>
+    </message>
   </context>
 </TS>
index 8cf60192156bcaea33cb567c18e84b9f65d4634d..4750c29bb30f42b5a4a48e26ba4bd641a2367280 100644 (file)
@@ -22,7 +22,8 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
     AttributeIntegerPtr anAttribue =
         std::dynamic_pointer_cast<ModelAPI_AttributeInteger>(theAttribute);
     if (!anAttribue->expressionError().empty()) {
-      theError = anAttribue->expressionError();
+      theError = "Expression error: %1";
+      theError.arg(anAttribue->expressionError());
       return false;
     }
   } else
@@ -30,7 +31,8 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
     AttributeDoublePtr anAttribue = 
         std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(theAttribute);
     if (!anAttribue->expressionError().empty()) {
-      theError = anAttribue->expressionError();
+      theError = "Expression error: %1";
+      theError.arg(anAttribue->expressionError());
       return false;
     }
   } else
@@ -45,7 +47,8 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
         anErrorMessage.append("\n").append(aComponent[i]).append(": ").append(anAttribue->expressionError(i));
     }
     if (!anErrorMessage.empty()) {
-      theError = anErrorMessage;
+      theError = "Expression error: %1";
+      theError.arg(anErrorMessage);
       return false;
     }
   } else
@@ -60,7 +63,8 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
         anErrorMessage.append("\n").append(aComponent[i]).append(": ").append(anAttribue->expressionError(i));
     }
     if (!anErrorMessage.empty()) {
-      theError = anErrorMessage;
+      theError = "Expression error: %1";
+      theError.arg(anErrorMessage);
       return false;
     }
   }
index 479405e4a3b21c56e95a1bef7ff87d29e63430d3..c8a204e29db52dda1f1d4f613b37392c24bd87e8 100644 (file)
@@ -44,8 +44,9 @@ bool Model_FeatureValidator::isValid(const std::shared_ptr<ModelAPI_Feature>& th
         myNotObligatory.find(theFeature->getKind());
       if (aFeatureFind == myNotObligatory.end() || // and it is obligatory for filling
           aFeatureFind->second.find(*it) == aFeatureFind->second.end()) {
-        theError = "Attribute \"%1\" is not initialized.";
-        theError.arg(anAttr->id());
+        // TODO(spo): exceptional case for translation
+        theError = "Attribute \"" + anAttr->id() + "\" is not initialized.";
+//        theError.arg(anAttr->id());
         return false;
       }
     }
index fe35df17d218e244740d6a3b28e6e43407b282e4..b1804462323c96cf46ac69abeba145f3fb1cf654 100644 (file)
@@ -31,6 +31,8 @@
 
 using namespace std;
 
+#include <iostream>
+
 static Model_Session* myImpl = new Model_Session();
 
 // t oredirect all calls to the root document
@@ -358,6 +360,9 @@ void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessa
     const std::shared_ptr<Config_FeatureMessage> aMsg = 
       std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
     if (aMsg) {
+
+//      std::cout << "Feature: " << aMsg->id() << std::endl;
+
       // process the plugin info, load plugin
       if (myPlugins.find(aMsg->id()) == myPlugins.end()) {
         myPlugins[aMsg->id()] = std::pair<std::string, std::string>(
@@ -367,8 +372,17 @@ void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessa
       const std::shared_ptr<Config_AttributeMessage> aMsgAttr = 
         std::dynamic_pointer_cast<Config_AttributeMessage>(theMessage);
       if (aMsgAttr) {
+
+//        std::cout << "Feature: " << aMsgAttr->featureId()
+//            << ", Attribute: " << aMsgAttr->attributeId() << std::endl;
+
         if (!aMsgAttr->isObligatory()) {
           validators()->registerNotObligatory(aMsgAttr->featureId(), aMsgAttr->attributeId());
+        } else {
+          std::cout << "F: " << aMsgAttr->featureId()
+              << ", V: Model_FeatureValidator"
+              << ", A: " << aMsgAttr->attributeId()
+              << std::endl;
         }
         if(aMsgAttr->isConcealment()) {
           validators()->registerConcealment(aMsgAttr->featureId(), aMsgAttr->attributeId());
@@ -382,12 +396,38 @@ void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessa
     // plugins information was started to load, so, it will be loaded
     myPluginsInfoLoaded = true;
   } else if (theMessage->eventID() == kValidatorEvent) {
+
+    static bool done = false;
+    if (!done) {
+      std::set<std::string> aPlugins;
+      for (auto it = myPlugins.begin(); it != myPlugins.end(); ++it) {
+        std::string aPluginName = it->second.first;
+        aPlugins.insert(aPluginName);
+      }
+
+      for (auto it = aPlugins.begin(); it != aPlugins.end(); ++it) {
+        myCurrentPluginName = *it;
+        Config_ModuleReader::loadPlugin(*it);
+      }
+
+      done = true;
+    }
+
     std::shared_ptr<Config_ValidatorMessage> aMsg = 
       std::dynamic_pointer_cast<Config_ValidatorMessage>(theMessage);
     if (aMsg) {
       if (aMsg->attributeId().empty()) {  // feature validator
+
+        std::cout << "F: " << aMsg->featureId()
+          << ", V: " << aMsg->validatorId() << std::endl;
+
         validators()->assignValidator(aMsg->validatorId(), aMsg->featureId(), aMsg->parameters());
       } else {  // attribute validator
+
+        std::cout << "F: " << aMsg->featureId()
+          << ", A: " << aMsg->attributeId()
+          << ", V: " << aMsg->validatorId() << std::endl;
+
         validators()->assignValidator(aMsg->validatorId(), aMsg->featureId(), aMsg->attributeId(),
                                       aMsg->parameters());
       }
index 35b636acd58950dff0b24214b52b7ca66eed10da..07041b2591e679617b46875077e3b2ac2fce043e 100644 (file)
         <translation type="unfinished"></translation>
     </message>
 </context>
+
+  <context>
+    <name>Parameter</name>
+    <message>
+      <source>Model_FeatureValidator: Attribute "variable" is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "expression" is not initialized.</source>
+      <translation></translation>
+    </message>
+  </context>
+
+
 </TS>
index 43ba4a1075c5980f12f8231805690bae5ef32e69..d019a2030a1db63ee3c254f9d296ebe18773d00d 100644 (file)
@@ -7,5 +7,22 @@
     <source>Model_FeatureValidator: Attribute "height" is not initialized.</source>
     <translation>Height of the box is not defined</translation>
   </message>
+  
+    <message>
+      <source>height - GeomValidators_Positive: Double is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>height - GeomValidators_Positive: Double is not positive.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>height - GeomValidators_Positive: Integer is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>height - GeomValidators_Positive: Integer is not positive.</source>
+      <translation></translation>
+    </message>  
 </context>
 </TS>
index a77e8c305c0b060ffcc222c403b6cd836f615894..c4f54fec75c51dda4ff50381fb7b7e2d89c7f12d 100644 (file)
       <source>Model_FeatureValidator: Attribute "Features" is not initialized.</source>
       <translation>Sketch objects are not defined</translation>
     </message>
+    
+    <message>
+      <source>External - GeomValidators_Face: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>External - GeomValidators_Face: The shape is not a face.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>External - GeomValidators_Face: The shape is not a face.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>External - GeomValidators_Face: The shape is not a plane.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>External - GeomValidators_Face: The shape is not a cylinder.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>External - GeomValidators_Face: The shape is not an available face.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>Attribute "CircleRadius" is locked by modification value in the viewer.</source>
       <translation>Select a radius distance</translation>
     </message>
+    
+    <message>
+      <source>CircleRadius - GeomValidators_Positive: Double is not positive.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>CircleRadius - GeomValidators_Positive: Integer is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>CircleRadius - GeomValidators_Positive: Integer is not positive.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>ConstraintEntityA - GeomValidators_ShapeType: The object is empty</source>
       <translation>Line is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: %1</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: It has reference to an empty attribute</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: Shape type is \"%1\", it should be \"%2\"</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The result is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The shape is empty</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>ConstraintEntityB - GeomValidators_ShapeType: The object is empty</source>
       <translation>Second line is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintEntityB - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: %1</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityB - GeomValidators_ShapeType: It has reference to an empty attribute</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityB - GeomValidators_ShapeType: Shape type is \"%1\", it should be \"%2\"</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityB - GeomValidators_ShapeType: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityB - GeomValidators_ShapeType: The result is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityB - GeomValidators_ShapeType: The shape is empty</source>
+      <translation></translation>
+    </message>    
   </context>
   
   <context>
       <source>ConstraintValue - GeomValidators_Positive: Double is not initialized.</source>
       <translation>Radius value is not positive</translation>
     </message>
+    
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Double is not positive.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Integer is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Integer is not positive.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>ConstraintEntityA - GeomValidators_ShapeType: The object is empty</source>
       <translation>Line is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: %1</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: It has reference to an empty attribute</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: Shape type is \"%1\", it should be \"%2\"</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The result is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The shape is empty</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>Attribute "RectStartPoint" is locked by modification value in the viewer.</source>
       <translation>Select a first point of the rectangle</translation>
     </message>
+    
+    <message>
+      <source>Model_FeatureValidator: Attribute "RectStartPoint" is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>Model_FeatureValidator: Attribute "RectEndPoint" is not initialized.</source>
+      <translation></translation>
+    </message>
   </context>
 
   <context>
       <source>Model_FeatureValidator: Attribute "ArcPassedPoint" is not initialized.</source>
       <translation>Intermediate point is not defined</translation>
     </message>
+    
+    <message>
+      <source>ArcRadius - GeomValidators_Positive: Double is not positive.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ArcRadius - GeomValidators_Positive: Integer is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ArcRadius - GeomValidators_Positive: Integer is not positive.</source>
+      <translation></translation>
+    </message>    
   </context>
 
   <context>
       <source>Model_FeatureValidator: Attribute "ConstraintMirrorList" is not initialized.</source>
       <translation>Objects for mirror are not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: %1</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: It has reference to an empty attribute</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: Shape type is \"%1\", it should be \"%2\"</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The result is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The shape is empty</source>
+      <translation></translation>
+    </message>
   </context>
 
   <context>
       <source>MultiRotationCenter - GeomValidators_ShapeType: The object is empty</source>
       <translation>Rotation center is not selected</translation>
     </message>
+    
+    <message>
+      <source>MultiRotationObjects - GeomValidators_Positive: Double is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>MultiRotationObjects - GeomValidators_Positive: Double is not positive.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>MultiRotationObjects - GeomValidators_Positive: Integer is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>MultiRotationObjects - GeomValidators_Positive: Integer is not positive.</source>
+      <translation></translation>
+    </message>
   </context>
   
   <context>
       <source>MultiTranslationStartPoint - GeomValidators_ShapeType: The object is empty</source>
       <translation>Start point of translation vector is not selected</translation>
     </message>
+    
+    <message>
+      <source>MultiTranslationObjects - GeomValidators_Positive: Double is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>MultiTranslationObjects - GeomValidators_Positive: Double is not positive.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>MultiTranslationObjects - GeomValidators_Positive: Integer is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>MultiTranslationObjects - GeomValidators_Positive: Integer is not positive.</source>
+      <translation></translation>
+    </message>
   </context>
 
   <context>
       <source>ConstraintEntityB - GeomValidators_ShapeType: The object is empty</source>
       <translation>Second object is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintEntityB - SketchPlugin_ExternalValidator: Both features, attribute and attribute in parameter, are external.</source>
+      <translation></translation>
+    </message>
   </context>
 
   <context>
       <source>Model_FeatureValidator: Attribute "ConstraintEntityB" is not initialized.</source>
       <translation>Second object is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintEntityB - SketchPlugin_ExternalValidator: Both features, attribute and attribute in parameter, are external.</source>
+      <translation></translation>
+    </message>    
   </context>
 
   <context>
       <source>Model_FeatureValidator: Attribute "ConstraintEntityB" is not initialized.</source>
       <translation>Second object is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Double is not positive.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Integer is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Integer is not positive.</source>
+      <translation></translation>
+    </message>    
   </context>
 
   <context>
       <source>Model_FeatureValidator: Attribute "ConstraintEntityB" is not initialized.</source>
       <translation>Second object is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintEntityB - SketchPlugin_ExternalValidator: Both features, attribute and attribute in parameter, are external.</source>
+      <translation></translation>
+    </message>    
   </context>
 
   <context>
       <source>Model_FeatureValidator: Attribute "ConstraintEntityA" is not initialized.</source>
       <translation>Line is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Double is not positive.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Integer is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Integer is not positive.</source>
+      <translation></translation>
+    </message>    
   </context>
 
   <context>
       <source>Model_FeatureValidator: Attribute "ConstraintEntityB" is not initialized.</source>
       <translation>Second object is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintEntityB - SketchPlugin_ExternalValidator: Both features, attribute and attribute in parameter, are external.</source>
+      <translation></translation>
+    </message>
   </context>
 
   <context>
       <source>Model_FeatureValidator: Attribute "ConstraintEntityB" is not initialized.</source>
       <translation>Second line is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintEntityB - SketchPlugin_ExternalValidator: Both features, attribute and attribute in parameter, are external.</source>
+      <translation></translation>
+    </message>
   </context>
 
   <context>
       <source>Model_FeatureValidator: Attribute "ConstraintEntityA" is not initialized.</source>
       <translation>Object is not selected</translation>
     </message>
+    
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: It does not contain element with acceptable shape type. The type should be one of the next: %1</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: It has reference to an empty attribute</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: Shape type is \"%1\", it should be \"%2\"</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The result is empty</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintEntityA - GeomValidators_ShapeType: The shape is empty</source>
+      <translation></translation>
+    </message>
   </context>
 
   <context>
       <translation>Second object is not selected</translation>
     </message>
   </context>
+  
+  <context>
+    <name>SketchConstraintFillet</name>
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Double is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Double is not positive.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Integer is not initialized.</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ConstraintValue - GeomValidators_Positive: Integer is not positive.</source>
+      <translation></translation>
+    </message>
+  </context>
+  
+  <context>
+    <name>SketchConstraintFillet</name>
+    <message>
+      <source>ExternalFeature - SketchPlugin_ProjectionValidator: The attribute with the %1 type is not processed</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ExternalFeature - SketchPlugin_ProjectionValidator: The attribute %1 should be an edge</source>
+      <translation></translation>
+    </message>
+    <message>
+      <source>ExternalFeature - SketchPlugin_ProjectionValidator: There is no sketch referring to the current feature</source>
+      <translation></translation>
+    </message>
+  </context>
 </TS>