From c30767d7fd6d4a06eb3abc83b0053e6adb7cb266 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 10 Apr 2007 14:12:43 +0000 Subject: [PATCH] PAL13330( When mesh generation does not success, trace where ) enum of algo state changed --- src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx | 23 ++++--- src/SMESHGUI/SMESH_msg_en.po | 74 +++++++++++++++++++++-- 2 files changed, 82 insertions(+), 15 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 2a0d4e152..cc4db51a8 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -583,25 +583,28 @@ namespace SMESH{ return listSOmesh; } -#define CASE2MESSAGE(enum) case SMESH::enum: msg = QObject::tr( #enum ); break; +#define CASE2MESSAGE(enum) case SMESH::enum: msg = QObject::tr( "STATE_" #enum ); break; QString GetMessageOnAlgoStateErrors(const algo_error_array& errors) { QString resMsg = QObject::tr("SMESH_WRN_MISSING_PARAMETERS") + ":\n"; for ( int i = 0; i < errors.length(); ++i ) { const SMESH::AlgoStateError & error = errors[ i ]; + const bool hasAlgo = ( strlen( error.algoName ) != 0 ); QString msg; - switch( error.name ) { - CASE2MESSAGE( MISSING_ALGO ); - CASE2MESSAGE( MISSING_HYPO ); - CASE2MESSAGE( NOT_CONFORM_MESH ); - CASE2MESSAGE( BAD_PARAM_VALUE ); - default: continue; - } + if ( !hasAlgo ) + msg = QObject::tr( "STATE_ALGO_MISSING" ); + else + switch( error.state ) { + CASE2MESSAGE( HYP_MISSING ); + CASE2MESSAGE( HYP_NOTCONFORM ); + CASE2MESSAGE( HYP_BAD_PARAMETER ); + default: continue; + } // apply args to message: // %1 - algo name - if ( error.algoName.in() != 0 ) + if ( hasAlgo ) msg = msg.arg( error.algoName.in() ); - // %2 - dimention + // %2 - dimension msg = msg.arg( error.algoDim ); // %3 - global/local msg = msg.arg( QObject::tr( error.isGlobalAlgo ? "GLOBAL_ALGO" : "LOCAL_ALGO" )); diff --git a/src/SMESHGUI/SMESH_msg_en.po b/src/SMESHGUI/SMESH_msg_en.po index bb9585647..7ce63f2d3 100644 --- a/src/SMESHGUI/SMESH_msg_en.po +++ b/src/SMESHGUI/SMESH_msg_en.po @@ -160,6 +160,10 @@ msgstr "Missing parameters" msgid "SMESH_WRN_COMPUTE_FAILED" msgstr "Mesh computation failed" +#Compute failed +msgid "SMESH_COMPUTE_SUCCEED" +msgstr "Mesh computation succeed" + #Study frame with VTK Viewer must be activated msgid "SMESH_WRN_VIEWER_VTK" msgstr "Study frame with VTK Viewer must be activated" @@ -1306,18 +1310,22 @@ msgstr "Shape is neither the main one, nor its subshape, nor a valid group" msgid "SMESH_HYP_12" msgstr "Geomerty mismatches algorithm's expectation" -# AlgoStateErrorName +# SMESHGUI_HypothesesUtils::GetMessageOnAlgoStateErrors() +# %1 - algo name +# %2 - dimension +# %3 - global/local +# %4 - hypothesis dim == algoDim -msgid "MISSING_ALGO" +msgid "STATE_ALGO_MISSING" msgstr "%3 %2D algorithm is missing" -msgid "MISSING_HYPO" +msgid "STATE_HYP_MISSING" msgstr "%3 %2D algorithm \"%1\" misses %4D hypothesis" -msgid "BAD_PARAM_VALUE" +msgid "STATE_HYP_BAD_PARAMETER" msgstr "Hypothesis of %3 %2D algorithm \"%1\" has a bad parameter value" -msgid "NOT_CONFORM_MESH" +msgid "STATE_HYP_NOTCONFORM" msgstr "%3 %2D algorithm \"%1\" would produce not conform mesh: global \"Not Conform Mesh Allowed\" hypotesis is missing" msgid "GLOBAL_ALGO" @@ -3381,3 +3389,59 @@ msgstr "Mesh is not selected\nPlease specify it and try again" msgid "SMESHGUI_ConvToQuadOp::REF_IS_NULL" msgstr "No valid mesh object selected" + +#----------------------------------------------------------- + +msgid "SMESHGUI_ComputeDlg::CAPTION" +msgstr "Compute mesh failed" + +msgid "SMESHGUI_ComputeDlg::CONSTRUCTOR" +msgstr "Compute mesh" + +msgid "SMESHGUI_ComputeDlg::ERRORS" +msgstr "Compute errors" + +msgid "SMESHGUI_ComputeDlg::SHOW_SHAPE" +msgstr "Show SubShape" + +msgid "SMESHGUI_ComputeDlg::PUBLISH_SHAPE" +msgstr "Publish SubShape" + +msgid "COMPERR_OK" +msgstr "No errors" + +msgid "COMPERR_BAD_INPUT_MESH" +msgstr "Invalid input mesh" + +msgid "COMPERR_STD_EXCEPTION" +msgstr "std::exception" + +msgid "COMPERR_OCC_EXCEPTION" +msgstr "OCC exception" + +msgid "COMPERR_SLM_EXCEPTION" +msgstr "SALOME exception" + +msgid "COMPERR_EXCEPTION" +msgstr "Unknown exception" + +msgid "COMPERR_MEMORY_PB" +msgstr "Memory allocation problem" + +msgid "COMPERR_ALGO_FAILED" +msgstr "Algorithm failed" + +msgid "COMPERR_BAD_SHAPE" +msgstr "Unexpected geometry" + +msgid "COL_ALGO_HEADER" +msgstr "Algorithm" + +msgid "COL_SHAPE_HEADER" +msgstr "SubShape" + +msgid "COL_ERROR_HEADER" +msgstr "Error" + +#----------------------------------------------------------- + -- 2.39.2