Rationalize STEP file warnings

1) Use consistent terminology and formatting
2) Capitalize STEP
3) Don't double-report errors in MessageBox and REPORTER

Fixes https://gitlab.com/kicad/code/kicad/issues/7670
This commit is contained in:
Jeff Young 2021-08-14 11:07:58 +01:00
parent 05fb582304
commit 507b386c79
2 changed files with 9 additions and 17 deletions

View File

@ -366,7 +366,7 @@ int PANEL_KICAD2STEP::RunConverter()
if( out_fname.FileExists() && !m_params.m_overwrite )
{
ReportMessage( _( "** Output already exists.\n"
ReportMessage( _( "** Output already exists. Export aborted. **\n"
"Enable the force overwrite flag to overwrite it." ) );
return -1;
@ -404,7 +404,7 @@ int PANEL_KICAD2STEP::RunConverter()
if( !res )
{
ReportMessage( _( "\n**Error building STEP board model. Abort export **\n" ) );
ReportMessage( _( "\n** Error building STEP board model. Export aborted. **\n" ) );
return -1;
}
@ -419,23 +419,19 @@ int PANEL_KICAD2STEP::RunConverter()
if( !res )
{
ReportMessage( _( "\nError Write STEP file\n" ) );
ReportMessage( _( "\n** Error writing STEP file. **\n" ) );
return -1;
}
}
catch( const Standard_Failure& e )
{
wxString err = e.GetMessageString();
wxMessageBox( err, _( "Export Error" ) );
ReportMessage( wxString::Format( _( "\nExport Error: %s\n" ), err ) );
ReportMessage( _( "\n*** Abort export ***\n" ) );
ReportMessage( e.GetMessageString() );
ReportMessage( _( "\n** Error exporting STEP file. Export aborted. **\n" ) );
return -1;
}
catch( ... )
{
wxMessageBox( _( "(no exception information)" ), _( "Unknown error" ) );
ReportMessage( _( "\nUnknown error\n*** Abort export ***\n" ) );
ReportMessage( _( "\n** Error exporting STEP file. Export aborted. **\n" ) );
return -1;
}
}
@ -444,7 +440,7 @@ int PANEL_KICAD2STEP::RunConverter()
msgs << msgs_from_opencascade.str();
ReportMessage( msgs );
ReportMessage( wxString::Format( _( "\nStep file '%s' created\n\n" ), outfile ) );
ReportMessage( wxString::Format( _( "\nSTEP file '%s' created.\n" ), outfile ) );
errs << errors_from_opencascade.str();
ReportMessage( errs );
@ -465,10 +461,6 @@ int PANEL_KICAD2STEP::RunConverter()
msg = _( "STEP file has been created, but there are warnings." );
}
}
else // No error messages: the file is expected OK
{
msg.Printf( _( "STEP file:\n%s\nhas been created successfully." ), outfile );
}
ReportMessage( msg );

View File

@ -1150,8 +1150,8 @@ bool PCBMODEL::getModelLabel( const std::string& aFileName, TRIPLET aScale, TDF_
else // Substitution is not allowed
{
if( aErrorMessage )
aErrorMessage->Printf( "Cannot add a VRML model data to a Step file.\n",
aFileName );
aErrorMessage->Printf( "Cannot add a VRML model to a STEP file.\n", aFileName );
return false;
}