Browse Source

More error message regularization.

6.0.7
Jeff Young 4 years ago
parent
commit
a1dfc36233
  1. 2
      common/drawing_sheet/drawing_sheet_reader.cpp
  2. 2
      common/footprint_info.cpp
  3. 4
      common/fp_lib_table.cpp
  4. 2
      common/widgets/widget_hotkey_list.cpp
  5. 2
      cvpcb/dialogs/dialog_config_equfiles.cpp
  6. 8
      cvpcb/display_footprints_frame.cpp
  7. 18
      cvpcb/readwrite_dlgs.cpp
  8. 4
      cvpcb/tools/cvpcb_association_tool.cpp
  9. 2
      eeschema/dialogs/dialog_bom.cpp
  10. 31
      eeschema/dialogs/dialog_plot_schematic.cpp
  11. 4
      eeschema/dialogs/dialog_symbol_remap.cpp
  12. 7
      eeschema/dialogs/panel_sym_lib_table.cpp
  13. 2
      eeschema/sch_edit_frame.cpp
  14. 7
      eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp
  15. 11
      eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp
  16. 4
      eeschema/sheet.cpp
  17. 19
      eeschema/symbol_editor/symbol_editor.cpp
  18. 11
      eeschema/symbol_editor/symbol_library_manager.cpp
  19. 6
      eeschema/symbol_library.cpp
  20. 2
      eeschema/tools/assign_footprints.cpp
  21. 2
      eeschema/tools/sch_drawing_tools.cpp
  22. 2
      eeschema/tools/sch_editor_control.cpp
  23. 2
      eeschema/tools/symbol_editor_control.cpp
  24. 2
      gerbview/export_to_pcbnew.cpp
  25. 6
      pagelayout_editor/pl_editor_frame.cpp
  26. 2
      pcb_calculator/regulators_funct.cpp
  27. 2
      pcbnew/build_BOM_from_board.cpp
  28. 2
      pcbnew/dialogs/dialog_board_statistics.cpp
  29. 6
      pcbnew/dialogs/dialog_export_vrml.cpp
  30. 9
      pcbnew/dialogs/dialog_find.cpp
  31. 38
      pcbnew/dialogs/dialog_global_fp_lib_table_config.cpp
  32. 2
      pcbnew/dialogs/dialog_plot.cpp
  33. 4
      pcbnew/dialogs/panel_setup_layers.cpp
  34. 2
      pcbnew/exporters/export_footprint_associations.cpp
  35. 4
      pcbnew/exporters/gen_footprints_placefile.cpp
  36. 2
      pcbnew/exporters/gendrill_Excellon_writer.cpp
  37. 2
      pcbnew/exporters/gendrill_file_writer_base.cpp
  38. 2
      pcbnew/exporters/gendrill_gerber_writer.cpp
  39. 6
      pcbnew/footprint_libraries_utils.cpp
  40. 4
      pcbnew/load_select_footprint.cpp
  41. 2
      pcbnew/netlist_reader/kicad_netlist_reader.cpp
  42. 2
      pcbnew/pcb_edit_frame.cpp
  43. 2
      pcbnew/pcb_group.cpp
  44. 4
      pcbnew/plugins/altium/altium_pcb.cpp
  45. 9
      pcbnew/plugins/eagle/eagle_plugin.cpp
  46. 19
      pcbnew/plugins/geda/gpcb_plugin.cpp
  47. 7
      pcbnew/plugins/kicad/kicad_plugin.cpp
  48. 30
      pcbnew/plugins/legacy/legacy_plugin.cpp

2
common/drawing_sheet/drawing_sheet_reader.cpp

@ -911,7 +911,7 @@ bool DS_DATA_MODEL::LoadDrawingSheet( const wxString& aFullFileName, bool Append
if( wksFile.Read( buffer.get(), filelen ) != filelen )
{
wxLogMessage( _( "The file \"%s\" was not fully read" ), fullFileName.GetData() );
wxLogMessage( _( "The file '%s' was not fully read." ), fullFileName.GetData() );
return false;
}
else

2
common/footprint_info.cpp

@ -63,7 +63,7 @@ FOOTPRINT_INFO* FOOTPRINT_LIST::GetFootprintInfo( const wxString& aFootprintName
LIB_ID fpid;
wxCHECK_MSG( fpid.Parse( aFootprintName ) < 0, NULL,
wxString::Format( wxT( "\"%s\" is not a valid LIB_ID." ), aFootprintName ) );
wxString::Format( wxT( "'%s' is not a valid LIB_ID." ), aFootprintName ) );
return GetFootprintInfo( fpid.GetLibNickname(), fpid.GetLibItemName() );
}

4
common/fp_lib_table.cpp

@ -197,8 +197,8 @@ void FP_LIB_TABLE::Parse( LIB_TABLE_LEXER* in )
{
delete tmp; // The table did not take ownership of the row.
wxString msg = wxString::Format( _( "Duplicate library nickname \"%s\" found in "
"footprint library table file line %d" ),
wxString msg = wxString::Format( _( "Duplicate library nickname '%s' found in "
"footprint library table file line %d." ),
nickname,
lineNum );

2
common/widgets/widget_hotkey_list.cpp

@ -416,7 +416,7 @@ bool WIDGET_HOTKEY_LIST::resolveKeyConflicts( TOOL_ACTION* aAction, long aKey )
return true;
TOOL_ACTION* conflictingAction = conflictingHotKey->m_Actions[ 0 ];
wxString msg = wxString::Format( _( "\"%s\" is already assigned to \"%s\" in section \"%s\". "
wxString msg = wxString::Format( _( "'%s' is already assigned to '%s' in section '%s'. "
"Are you sure you want to change its assignment?" ),
KeyNameFromKeyCode( aKey ),
conflictingAction->GetLabel(),

2
cvpcb/dialogs/dialog_config_equfiles.cpp

@ -48,7 +48,7 @@ DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES( CVPCB_MAINFRAME* aParent ) :
m_Parent = aParent;
PROJECT& prj = Prj();
SetTitle( wxString::Format( _( "Project file: \"%s\"" ), prj.GetProjectFullName() ) );
SetTitle( wxString::Format( _( "Project file: '%s'" ), prj.GetProjectFullName() ) );
Init( );

8
cvpcb/display_footprints_frame.cpp

@ -397,7 +397,7 @@ FOOTPRINT* DISPLAY_FOOTPRINTS_FRAME::GetFootprint( const wxString& aFootprintNam
if( fpid.Parse( aFootprintName ) >= 0 )
{
aReporter.Report( wxString::Format( _( "Footprint ID \"%s\" is not valid." ),
aReporter.Report( wxString::Format( _( "Footprint ID '%s' is not valid." ),
aFootprintName ),
RPT_SEVERITY_ERROR );
return NULL;
@ -412,7 +412,7 @@ FOOTPRINT* DISPLAY_FOOTPRINTS_FRAME::GetFootprint( const wxString& aFootprintNam
// See if the library requested is in the library table
if( !fpTable->HasLibrary( libNickname ) )
{
aReporter.Report( wxString::Format( _( "Library \"%s\" is not in the footprint library table." ),
aReporter.Report( wxString::Format( _( "Library '%s' is not in the footprint library table." ),
libNickname ),
RPT_SEVERITY_ERROR );
return NULL;
@ -421,7 +421,7 @@ FOOTPRINT* DISPLAY_FOOTPRINTS_FRAME::GetFootprint( const wxString& aFootprintNam
// See if the footprint requested is in the library
if( !fpTable->FootprintExists( libNickname, fpName ) )
{
aReporter.Report( wxString::Format( _( "Footprint \"%s\" not found." ), aFootprintName ),
aReporter.Report( wxString::Format( _( "Footprint '%s' not found." ), aFootprintName ),
RPT_SEVERITY_ERROR );
return NULL;
}
@ -446,7 +446,7 @@ FOOTPRINT* DISPLAY_FOOTPRINTS_FRAME::GetFootprint( const wxString& aFootprintNam
return footprint;
}
aReporter.Report( wxString::Format( _( "Footprint \"%s\" not found." ), aFootprintName ),
aReporter.Report( wxString::Format( _( "Footprint '%s' not found." ), aFootprintName ),
RPT_SEVERITY_ERROR );
return NULL;
}

18
cvpcb/readwrite_dlgs.cpp

@ -141,19 +141,17 @@ bool CVPCB_MAINFRAME::ReadNetListAndFpFiles( const std::string& aNetlist )
break;
case 1:
msg += wxString::Format( _(
"Component \"%s\" footprint \"%s\" was <b>not found</b> in any library.\n" ),
component->GetReference(),
component->GetFPID().GetLibItemName().wx_str()
);
msg += wxString::Format( _( "Component '%s' footprint '%s' <b>not "
"found</b> in any library.\n" ),
component->GetReference(),
component->GetFPID().GetLibItemName().wx_str() );
break;
case 2:
msg += wxString::Format( _(
"Component \"%s\" footprint \"%s\" was found in <b>multiple</b> libraries.\n" ),
component->GetReference(),
component->GetFPID().GetLibItemName().wx_str()
);
msg += wxString::Format( _( "Component '%s' footprint '%s' was found "
"in <b>multiple</b> libraries.\n" ),
component->GetReference(),
component->GetFPID().GetLibItemName().wx_str() );
break;
}
}

4
cvpcb/tools/cvpcb_association_tool.cpp

@ -204,8 +204,8 @@ int CVPCB_ASSOCIATION_TOOL::Associate( const TOOL_EVENT& aEvent )
// Test for validity of the requested footprint
if( !fpid.IsValid() )
{
wxString msg =
wxString::Format( _( "\"%s\" is not a valid footprint." ), fpid.Format().wx_str() );
wxString msg = wxString::Format( _( "'%s' is not a valid footprint." ),
fpid.Format().wx_str() );
DisplayErrorMessage( m_frame, msg );
}

2
eeschema/dialogs/dialog_bom.cpp

@ -388,7 +388,7 @@ void DIALOG_BOM::OnAddGenerator( wxCommandEvent& event )
// Verify if it does not exists
if( pluginExists( name ) )
{
wxMessageBox( wxString::Format( _( "Nickname \"%s\" already in use." ), name ) );
wxMessageBox( wxString::Format( _( "Nickname '%s' already in use." ), name ) );
return;
}

31
eeschema/dialogs/dialog_plot_schematic.cpp

@ -435,7 +435,7 @@ wxFileName DIALOG_PLOT_SCHEMATIC::createPlotFileName( const wxString& aPlotFileN
if( !EnsureFileDirectoryExists( &tmp, retv.GetFullName(), aReporter )
|| !tmp.IsDirWritable() )
{
wxString msg = wxString::Format( _( "Could not write plot files to folder \"%s\"." ),
wxString msg = wxString::Format( _( "Failed to write plot files to folder '%s'." ),
tmp.GetPath() );
aReporter->Report( msg, RPT_SEVERITY_ERROR );
retv.Clear();
@ -510,18 +510,18 @@ void DIALOG_PLOT_SCHEMATIC::createDxfFile( bool aPlotAll, bool aPlotDrawingSheet
if( plotOneSheetDxf( plotFileName.GetFullPath(), screen, aRenderSettings,
plot_offset, 1.0, aPlotDrawingSheet ) )
{
msg.Printf( _( "Plotted to '%s'.\n" ), plotFileName.GetFullPath() );
msg.Printf( _( "Plotted to '%s'." ), plotFileName.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ACTION );
}
else // Error
{
msg.Printf( _( "Unable to create file '%s'.\n" ), plotFileName.GetFullPath() );
msg.Printf( _( "Failed to create file '%s'." ), plotFileName.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
}
}
catch( IO_ERROR& e )
{
msg.Printf( wxT( "DXF Plotter exception: %s\n"), e.What() );
msg.Printf( wxT( "DXF Plotter exception: %s"), e.What() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
schframe->SetCurrentSheet( oldsheetpath );
schframe->GetCurrentSheet().UpdateAllScreenReferences();
@ -680,18 +680,18 @@ void DIALOG_PLOT_SCHEMATIC::createHPGLFile( bool aPlotAll, bool aPlotFrameRef,
if( plotOneSheetHpgl( plotFileName.GetFullPath(), screen, plotPage, aRenderSettings,
plotOffset, plot_scale, aPlotFrameRef, getPlotOriginAndUnits() ) )
{
msg.Printf( _( "Plotted to '%s'.\n" ), plotFileName.GetFullPath() );
msg.Printf( _( "Plotted to '%s'." ), plotFileName.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ACTION );
}
else
{
msg.Printf( _( "Unable to create file '%s'.\n" ), plotFileName.GetFullPath() );
msg.Printf( _( "Failed to create file '%s'." ), plotFileName.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
}
}
catch( IO_ERROR& e )
{
msg.Printf( wxT( "HPGL Plotter exception: %s\n"), e.What() );
msg.Printf( wxT( "HPGL Plotter exception: %s"), e.What() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
}
@ -837,8 +837,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotDrawingSheet
if( !plotter->OpenFile( plotFileName.GetFullPath() ) )
{
msg.Printf( _( "Unable to create file '%s'.\n" ),
plotFileName.GetFullPath() );
msg.Printf( _( "Failed to create file '%s'." ), plotFileName.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
delete plotter;
return;
@ -851,7 +850,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotDrawingSheet
catch( const IO_ERROR& e )
{
// Cannot plot PDF file
msg.Printf( wxT( "PDF Plotter exception: %s\n" ), e.What() );
msg.Printf( wxT( "PDF Plotter exception: %s" ), e.What() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
restoreEnvironment( plotter, oldsheetpath );
@ -1034,20 +1033,20 @@ void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef,
if( plotOneSheetPS( plotFileName.GetFullPath(), screen, aRenderSettings, plotPage,
plot_offset, scale, aPlotFrameRef ) )
{
msg.Printf( _( "Plotted to '%s'.\n" ), plotFileName.GetFullPath() );
msg.Printf( _( "Plotted to '%s'." ), plotFileName.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ACTION );
}
else
{
// Error
msg.Printf( _( "Unable to create file '%s'.\n" ), plotFileName.GetFullPath() );
msg.Printf( _( "Failed to create file '%s'." ), plotFileName.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
}
}
catch( IO_ERROR& e )
{
msg.Printf( wxT( "PS Plotter exception: %s\n"), e.What() );
msg.Printf( wxT( "PS Plotter exception: %s"), e.What() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
}
}
@ -1160,19 +1159,19 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef,
if( !success )
{
msg.Printf( _( "Cannot create file '%s'.\n" ), plotFileName.GetFullPath() );
msg.Printf( _( "Failed to create file '%s'." ), plotFileName.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
}
else
{
msg.Printf( _( "Plotted to '%s'.\n" ), plotFileName.GetFullPath() );
msg.Printf( _( "Plotted to '%s'." ), plotFileName.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ACTION );
}
}
catch( const IO_ERROR& e )
{
// Cannot plot SVG file
msg.Printf( wxT( "SVG Plotter exception: %s\n" ), e.What() );
msg.Printf( wxT( "SVG Plotter exception: %s" ), e.What() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
break;
}

4
eeschema/dialogs/dialog_symbol_remap.cpp

@ -55,8 +55,8 @@ DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP( SCH_EDIT_FRAME* aParent ) :
if( !wxFileName::IsDirWritable( Prj().GetProjectPath() ) )
{
DisplayInfoMessage( this, _( "Remapping is not possible because you do not have "
"write privileges to the project folder \"%s\"." ) );
DisplayInfoMessage( this, _( "Remapping is not possible because you have insufficient "
"privileges to the project folder '%s'." ) );
// Disable the remap button.
m_remapped = true;

7
eeschema/dialogs/panel_sym_lib_table.cpp

@ -436,11 +436,10 @@ bool PANEL_SYM_LIB_TABLE::verifyTables()
}
catch( const IO_ERROR& ioe )
{
msg = wxString::Format( _( "Symbol library \"%s\" failed to load.\n %s" ),
row.GetNickName(),
ioe.What() );
msg.Printf( _( "Symbol library '%s' failed to load." ), row.GetNickName() );
wxMessageDialog errdlg( this, msg, _( "Error Loading Library" ) );
wxMessageDialog errdlg( this, msg + wxS( "\n" ) + ioe.What(),
_( "Error Loading Library" ) );
errdlg.ShowModal();
return false;

2
eeschema/sch_edit_frame.cpp

@ -649,7 +649,7 @@ bool SCH_EDIT_FRAME::canCloseWindow( wxCloseEvent& aEvent )
if( sheetlist.IsModified() )
{
wxFileName fileName = Schematic().RootScreen()->GetFileName();
wxString msg = _( "Save changes to \"%s\" before closing?" );
wxString msg = _( "Save changes to '%s' before closing?" );
if( !HandleUnsavedChanges( this, wxString::Format( msg, fileName.GetFullName() ),
[&]()->bool { return SaveProject(); } ) )

7
eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp

@ -2246,9 +2246,8 @@ void SCH_SEXPR_PLUGIN::CreateSymbolLib( const wxString& aLibraryPath,
{
if( wxFileExists( aLibraryPath ) )
{
THROW_IO_ERROR( wxString::Format(
_( "symbol library \"%s\" already exists, cannot create a new library" ),
aLibraryPath.GetData() ) );
THROW_IO_ERROR( wxString::Format( _( "Symbol library '%s' already exists." ),
aLibraryPath.GetData() ) );
}
LOCALE_IO toggle;
@ -2273,7 +2272,7 @@ bool SCH_SEXPR_PLUGIN::DeleteSymbolLib( const wxString& aLibraryPath,
// we don't want that. we want bare metal portability with no UI here.
if( wxRemove( aLibraryPath ) )
{
THROW_IO_ERROR( wxString::Format( _( "library \"%s\" cannot be deleted" ),
THROW_IO_ERROR( wxString::Format( _( "Symbol library '%s' cannot be deleted." ),
aLibraryPath.GetData() ) );
}

11
eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp

@ -868,8 +868,8 @@ void SCH_LEGACY_PLUGIN::loadHeader( LINE_READER& aReader, SCH_SCREEN* aScreen )
if( !line || !strCompare( "Eeschema Schematic File Version", line, &line ) )
{
m_error.Printf(
_( "\"%s\" does not appear to be an Eeschema file" ), aScreen->GetFileName() );
m_error.Printf( _( "'%s' does not appear to be an Eeschema file." ),
aScreen->GetFileName() );
THROW_IO_ERROR( m_error );
}
@ -4396,9 +4396,8 @@ void SCH_LEGACY_PLUGIN::CreateSymbolLib( const wxString& aLibraryPath,
{
if( wxFileExists( aLibraryPath ) )
{
THROW_IO_ERROR( wxString::Format(
_( "symbol library \"%s\" already exists, cannot create a new library" ),
aLibraryPath.GetData() ) );
THROW_IO_ERROR( wxString::Format( _( "Symbol library '%s' already exists." ),
aLibraryPath.GetData() ) );
}
LOCALE_IO toggle;
@ -4423,7 +4422,7 @@ bool SCH_LEGACY_PLUGIN::DeleteSymbolLib( const wxString& aLibraryPath,
// we don't want that. we want bare metal portability with no UI here.
if( wxRemove( aLibraryPath ) )
{
THROW_IO_ERROR( wxString::Format( _( "library \"%s\" cannot be deleted" ),
THROW_IO_ERROR( wxString::Format( _( "Symbol library '%s' cannot be deleted." ),
aLibraryPath.GetData() ) );
}

4
eeschema/sheet.cpp

@ -61,8 +61,8 @@ bool SCH_EDIT_FRAME::CheckSheetForRecursion( SCH_SHEET* aSheet, SCH_SHEET_PATH*
if( hierarchy.TestForRecursion( sheetHierarchy, destFile.GetFullPath() ) )
{
msg.Printf( _( "The sheet changes cannot be made because the destination sheet already "
"has the sheet \"%s\" or one of it's subsheets as a parent somewhere in "
"the schematic hierarchy." ),
"has the sheet '%s' or one of its subsheets as a parent somewhere in the "
"schematic hierarchy." ),
destFile.GetFullPath() );
DisplayError( this, msg );
return true;

19
eeschema/symbol_editor/symbol_editor.cpp

@ -320,7 +320,7 @@ bool SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux( LIB_SYMBOL* aEntry, const wxStr
if( aEntry->GetName().IsEmpty() )
{
wxLogWarning( "Symbol in library \"%s\" has empty name field.", aLibrary );
wxLogWarning( "Symbol in library '%s' has empty name field.", aLibrary );
return false;
}
@ -418,8 +418,9 @@ void SYMBOL_EDIT_FRAME::CreateNewSymbol()
// Test if there is a symbol with this name already.
if( !lib.empty() && m_libMgr->SymbolExists( name, lib ) )
{
wxString msg = wxString::Format( _( "Symbol \"%s\" already exists in library \"%s\"" ),
name, lib );
wxString msg = wxString::Format( _( "Symbol '%s' already exists in library '%s'." ),
name,
lib );
DisplayError( this, msg );
return;
}
@ -730,9 +731,9 @@ void SYMBOL_EDIT_FRAME::DeleteSymbolFromLibrary()
LIB_ID libId = GetTargetLibId();
if( m_libMgr->IsSymbolModified( libId.GetLibItemName(), libId.GetLibNickname() )
&& !IsOK( this, _( wxString::Format( "The symbol \"%s\" has been modified\n"
"Do you want to remove it from the library?",
libId.GetUniStringLibItemName() ) ) ) )
&& !IsOK( this, wxString::Format( _( "The symbol '%s' has been modified.\n"
"Do you want to remove it from the library?" ),
libId.GetUniStringLibItemName() ) ) )
{
return;
}
@ -743,7 +744,7 @@ void SYMBOL_EDIT_FRAME::DeleteSymbolFromLibrary()
msg.Printf( _( "The symbol %s is used to derive other symbols.\n"
"Deleting this symbol will delete all of the symbols derived from it.\n\n"
"Do you wish to delete this symbol and all of it's derivatives?" ),
"Do you wish to delete this symbol and all of its derivatives?" ),
libId.GetLibItemName().wx_str() );
wxMessageDialog::ButtonLabel yesButtonLabel( _( "Delete Symbol" ) );
@ -890,7 +891,7 @@ void SYMBOL_EDIT_FRAME::Revert( bool aConfirm )
// Empty if this is the library itself that is selected.
const wxString& symbolName = libId.GetLibItemName();
wxString msg = wxString::Format( _( "Revert \"%s\" to last version saved?" ),
wxString msg = wxString::Format( _( "Revert '%s' to last version saved?" ),
symbolName.IsEmpty() ? libName : symbolName );
if( aConfirm && !ConfirmRevertDialog( this, msg ) )
@ -1006,7 +1007,7 @@ bool SYMBOL_EDIT_FRAME::saveLibrary( const wxString& aLibrary, bool aNewFile )
wxString wildcards = KiCadSymbolLibFileWildcard();
wxFileDialog dlg( this, wxString::Format( _( "Save Library \"%s\" As..." ), aLibrary ),
wxFileDialog dlg( this, wxString::Format( _( "Save Library '%s' As..." ), aLibrary ),
default_path, fn.GetFullName(), wildcards,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );

11
eeschema/symbol_editor/symbol_library_manager.cpp

@ -172,8 +172,8 @@ SYMBOL_LIB_TABLE_ROW* SYMBOL_LIBRARY_MANAGER::GetLibrary( const wxString& aLibra
}
catch( const IO_ERROR& e )
{
wxLogMessage( _( "Cannot find library \"%s\" in the Symbol Library Table (%s)" ),
aLibrary, e.What() );
wxLogMessage( _( "Library '%s' not found in the Symbol Library Table." ) + e.What(),
aLibrary );
}
return row;
@ -615,8 +615,9 @@ LIB_SYMBOL* SYMBOL_LIBRARY_MANAGER::GetAlias( const wxString& aAlias,
}
catch( const IO_ERROR& e )
{
wxLogMessage( _( "Cannot load symbol \"%s\" from library \"%s\" (%s)" ),
aAlias, aLibrary, e.What() );
wxLogMessage( _( "Cannot load symbol '%s' from library '%s'." ) + e.What(),
aAlias,
aLibrary );
}
return alias;
@ -770,7 +771,7 @@ std::set<LIB_SYMBOL*> SYMBOL_LIBRARY_MANAGER::getOriginalSymbols( const wxString
}
catch( const IO_ERROR& e )
{
wxLogMessage( _( "Cannot enumerate library \"%s\" (%s)" ), aLibrary, e.What() );
wxLogMessage( _( "Cannot enumerate library '%s'." ) + e.What(), aLibrary );
}
return symbols;

6
eeschema/symbol_library.cpp

@ -547,11 +547,9 @@ void SYMBOL_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
catch( const IO_ERROR& ioe )
{
wxString msg;
msg.Printf( _( "Symbol library '%s' failed to load. Error:\n %s" ),
filename,
ioe.What() );
msg.Printf( _( "Symbol library '%s' failed to load." ), filename );
wxLogError( msg );
wxLogError( msg + wxS( "\n" ) + ioe.What() );
}
}
}

2
eeschema/tools/assign_footprints.cpp

@ -230,7 +230,7 @@ int SCH_EDITOR_CONTROL::ImportFPAssignments( const TOOL_EVENT& aEvent )
if( !processCmpToFootprintLinkFile( filename, forceVisibility, visibilityState ) )
{
wxString msg = wxString::Format( _( "Failed to open symbol-footprint link file \"%s\"" ),
wxString msg = wxString::Format( _( "Failed to open symbol-footprint link file '%s'." ),
filename.GetData() );
DisplayError( m_frame, msg );

2
eeschema/tools/sch_drawing_tools.cpp

@ -513,7 +513,7 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent )
if( !image || !image->ReadImageFile( fullFilename ) )
{
wxMessageBox( _( "Couldn't load image from \"%s\"" ), fullFilename );
wxMessageBox( _( "Could not load image from '%s'." ), fullFilename );
delete image;
image = nullptr;
continue;

2
eeschema/tools/sch_editor_control.cpp

@ -1537,7 +1537,7 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent )
if( hierarchy.TestForRecursion( sheetHierarchy, destFn.GetFullPath( wxPATH_UNIX ) ) )
{
auto msg = wxString::Format( _( "The pasted sheet \"%s\"\n"
auto msg = wxString::Format( _( "The pasted sheet '%s'\n"
"was dropped because the destination already has "
"the sheet or one of its subsheets as a parent." ),
sheet->GetFileName() );

2
eeschema/tools/symbol_editor_control.cpp

@ -405,7 +405,7 @@ int SYMBOL_EDITOR_CONTROL::ExportView( const TOOL_EVENT& aEvent )
if( !SaveCanvasImageToFile( editFrame, dlg.GetPath(), BITMAP_TYPE::PNG ) )
{
wxMessageBox( wxString::Format( _( "Can't save file \"%s\"." ), dlg.GetPath() ) );
wxMessageBox( wxString::Format( _( "Can't save file '%s'." ), dlg.GetPath() ) );
}
}

2
gerbview/export_to_pcbnew.cpp

@ -65,7 +65,7 @@ bool GBR_TO_PCB_EXPORTER::ExportPcb( const LAYER_NUM* aLayerLookUpTable, int aCo
if( m_fp == NULL )
{
wxString msg;
msg.Printf( _( "Cannot create file '%s'." ), m_pcb_file_name );
msg.Printf( _( "Failed to create file '%s'." ), m_pcb_file_name );
DisplayError( m_gerbview_frame, msg );
return false;
}

6
pagelayout_editor/pl_editor_frame.cpp

@ -372,7 +372,7 @@ bool PL_EDITOR_FRAME::canCloseWindow( wxCloseEvent& aEvent )
if( IsContentModified() )
{
wxFileName filename = GetCurrentFileName();
wxString msg = _( "Save changes to \"%s\" before closing?" );
wxString msg = _( "Save changes to '%s' before closing?" );
if( !HandleUnsavedChanges( this, wxString::Format( msg, filename.GetFullName() ),
[&]() -> bool
@ -852,7 +852,7 @@ DS_DATA_ITEM* PL_EDITOR_FRAME::AddDrawingSheetItem( int aType )
if( !wxFileExists( fullFilename ) )
{
wxMessageBox( _( "Couldn't load image from \"%s\"" ), fullFilename );
wxMessageBox( _( "Could not load image from '%s'." ), fullFilename );
break;
}
@ -860,7 +860,7 @@ DS_DATA_ITEM* PL_EDITOR_FRAME::AddDrawingSheetItem( int aType )
if( !image->ReadImageFile( fullFilename ) )
{
wxMessageBox( _( "Couldn't load image from \"%s\"" ), fullFilename );
wxMessageBox( _( "Could not load image from '%s'." ), fullFilename );
delete image;
break;
}

2
pcb_calculator/regulators_funct.cpp

@ -161,7 +161,7 @@ void PCB_CALCULATOR_FRAME::OnDataFileSelection( wxCommandEvent& event )
else
{
wxString msg;
msg.Printf( _("Unable to read data file \"%s\""), fullfilename );
msg.Printf( _("Unable to read data file '%s'."), fullfilename );
wxMessageBox( msg );
}
}

2
pcbnew/build_BOM_from_board.cpp

@ -99,7 +99,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
if( fp_bom == NULL )
{
msg.Printf( _( "Unable to create file '%s'." ), fn.GetFullPath() );
msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
DisplayError( this, msg );
return;
}

2
pcbnew/dialogs/dialog_board_statistics.cpp

@ -642,7 +642,7 @@ void DIALOG_BOARD_STATISTICS::saveReportClicked( wxCommandEvent& aEvent )
if( outFile == NULL )
{
msg.Printf( _( "Unable to create file '%s'." ), saveFileDialog.GetPath() );
msg.Printf( _( "Failed to create file '%s'." ), saveFileDialog.GetPath() );
DisplayErrorMessage( this, msg );
return;
}

6
pcbnew/dialogs/dialog_export_vrml.cpp

@ -251,8 +251,8 @@ void PCB_EDIT_FRAME::OnExportVRML( wxCommandEvent& event )
{
if( !modelPath.Mkdir() )
{
wxString msg = wxString::Format(
_( "Unable to create directory \"%s\"" ), modelPath.GetPath() );
wxString msg = wxString::Format( _( "Failed to create folder '%s'." ),
modelPath.GetPath() );
DisplayErrorMessage( this, msg );
return;
}
@ -261,7 +261,7 @@ void PCB_EDIT_FRAME::OnExportVRML( wxCommandEvent& event )
if( !ExportVRML_File( path, scale, export3DFiles, useRelativePaths,
modelPath.GetPath(), aXRef, aYRef ) )
{
wxString msg = wxString::Format( _( "Unable to create file \"%s\"" ), path );
wxString msg = wxString::Format( _( "Failed to create file '%s'." ), path );
DisplayErrorMessage( this, msg );
return;
}

9
pcbnew/dialogs/dialog_find.cpp

@ -334,7 +334,7 @@ void DIALOG_FIND::search( bool aDirection )
if( m_hitList.empty() )
{
m_frame->SetStatusText( wxEmptyString );
msg.Printf( _( "\"%s\" not found" ), searchString );
msg.Printf( _( "'%s' not found" ), searchString );
m_frame->ShowInfoBarMsg( msg );
m_status->SetLabel( msg );
@ -351,11 +351,12 @@ void DIALOG_FIND::search( bool aDirection )
m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectItem, true, *m_it );
m_frame->FocusOnLocation( ( *m_it )->GetPosition() );
msg.Printf( _( "\"%s\" found" ), searchString );
msg.Printf( _( "'%s' found" ), searchString );
m_frame->SetStatusText( msg );
msg.Printf( _( "Hit(s): %ld / %lu" ), std::distance( m_hitList.begin(), m_it ) + 1,
m_hitList.size() );
msg.Printf( _( "Hit(s): %ld / %lu" ),
std::distance( m_hitList.begin(), m_it ) + 1,
m_hitList.size() );
m_status->SetLabel( msg );
}

38
pcbnew/dialogs/dialog_global_fp_lib_table_config.cpp

@ -56,11 +56,10 @@ bool DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::TransferDataFromWindow()
}
catch( const IO_ERROR& ioe )
{
DisplayError( this,
wxString::Format( _( "Error occurred writing empty footprint library "
"table file.\n\n%s" ),
FP_LIB_TABLE::GetGlobalTableFileName(),
ioe.What() ) );
DisplayError( this, wxString::Format( _( "Error occurred writing empty footprint "
"library table '%s'." ),
FP_LIB_TABLE::GetGlobalTableFileName() )
+ wxS( "\n" ) + ioe.What() );
return false;
}
@ -80,8 +79,7 @@ bool DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::TransferDataFromWindow()
// Make sure the footprint library table to copy actually exists.
if( !fn.FileExists() )
{
DisplayError( this,
wxString::Format( _( "File \"%s\" not found." ), fn.GetFullPath() ) );
DisplayError( this, wxString::Format( _( "File '%s' not found." ), fn.GetFullPath() ) );
return false;
}
@ -94,9 +92,9 @@ bool DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::TransferDataFromWindow()
}
catch( const IO_ERROR& ioe )
{
DisplayError( this,
wxString::Format( _( "File \"%s\" is not a valid footprint library table "
"file.\n\n%s" ), fn.GetFullPath(), ioe.What() ) );
DisplayError( this, wxString::Format( _( "'%s' is not a valid footprint library table." ),
fn.GetFullPath() )
+ wxS( "\n" ) + ioe.What() );
return false;
}
@ -105,19 +103,20 @@ bool DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::TransferDataFromWindow()
if( !fpTableFileName.DirExists() && !fpTableFileName.Mkdir( 0x777, wxPATH_MKDIR_FULL ) )
{
DisplayError( this,
wxString::Format( _( "Cannot create global library table path \"%s\"." ),
fpTableFileName.GetPath() ) );
DisplayError( this, wxString::Format( _( "Cannot create library table path '%s'." ),
fpTableFileName.GetPath() ) );
return false;
}
// Copy the global footprint library table file to the user config.
if( !::wxCopyFile( fn.GetFullPath(), fpTableFileName.GetFullPath() ) )
{
DisplayError( this,
wxString::Format( _( "Cannot copy global footprint library table "
"file:\n\n \"%s\"\n\n:to:\n\n\"%s\"." ),
fn.GetFullPath(), fpTableFileName.GetFullPath() ) );
DisplayError( this, wxString::Format( _( "Cannot copy footprint library table from:\n"
"%s\n"
"to:\n"
"%s." ),
fn.GetFullPath(),
fpTableFileName.GetFullPath() ) );
return false;
}
@ -131,9 +130,8 @@ bool DIALOG_GLOBAL_FP_LIB_TABLE_CONFIG::TransferDataFromWindow()
}
catch( const IO_ERROR& ioe )
{
DisplayError( this, wxString::Format( _( "Error loading global footprint library table."
"\n\n%s" ),
ioe.What() ) );
DisplayError( this, _( "Error loading footprint library table." )
+ wxS( "\n" ) + ioe.What() );
return false;
}

2
pcbnew/dialogs/dialog_plot.cpp

@ -909,7 +909,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
}
else
{
msg.Printf( _( "Unable to create file '%s'." ), fn.GetFullPath() );
msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
reporter.Report( msg, RPT_SEVERITY_ERROR );
}

4
pcbnew/dialogs/panel_setup_layers.cpp

@ -656,7 +656,7 @@ bool PANEL_SETUP_LAYERS::testLayerNames()
if( hasOneOf( name, badchars ) )
{
auto msg = wxString::Format(_( "\"%s\" are forbidden in layer names." ), badchars );
wxString msg = wxString::Format(_( "%s are forbidden in layer names." ), badchars );
m_parentDialog->SetError( msg, this, ctl );
return false;
}
@ -671,7 +671,7 @@ bool PANEL_SETUP_LAYERS::testLayerNames()
{
if( name == existingName )
{
auto msg = wxString::Format(_( "Layer name \"%s\" is already in use." ), name );
wxString msg = wxString::Format(_( "Layer name '%s' already in use." ), name );
m_parentDialog->SetError( msg, this, ctl );
return false;
}

2
pcbnew/exporters/export_footprint_associations.cpp

@ -80,6 +80,6 @@ void PCB_EDIT_FRAME::RecreateCmpFileFromBoard( wxCommandEvent& aEvent )
wxString path = dlg.GetPath();
if( !RecreateCmpFile( GetBoard(), path ) )
DisplayError( this, wxString::Format( _( "Could not create file '%s'." ), path ) );
DisplayError( this, wxString::Format( _( "Failed to create file '%s'." ), path ) );
}

4
pcbnew/exporters/gen_footprints_placefile.cpp

@ -290,7 +290,7 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateGerberFiles()
if( fpcount < 0 )
{
msg.Printf( _( "Unable to create file '%s'." ), filename );
msg.Printf( _( "Failed to create file '%s'." ), filename );
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
wxMessageBox( msg );
return false;
@ -427,7 +427,7 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles()
if( fpcount < 0 )
{
msg.Printf( _( "Unable to create file '%s'." ), fn.GetFullPath() );
msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
m_reporter->Report( msg, RPT_SEVERITY_ERROR );
wxMessageBox( msg );
return false;

2
pcbnew/exporters/gendrill_Excellon_writer.cpp

@ -121,7 +121,7 @@ void EXCELLON_WRITER::CreateDrillandMapFilesSet( const wxString& aPlotDirectory,
{
if( aReporter )
{
msg.Printf( _( "Create file %s\n" ), fullFilename );
msg.Printf( _( "Created file '%s'" ), fullFilename );
aReporter->Report( msg );
}
}

2
pcbnew/exporters/gendrill_file_writer_base.cpp

@ -351,7 +351,7 @@ void GENDRILL_WRITER_BASE::CreateMapFilesSet( const wxString& aPlotDirectory,
{
if( aReporter )
{
msg.Printf( _( "Create file %s\n" ), fullfilename );
msg.Printf( _( "Created file '%s'." ), fullfilename );
aReporter->Report( msg );
}
}

2
pcbnew/exporters/gendrill_gerber_writer.cpp

@ -110,7 +110,7 @@ void GERBER_WRITER::CreateDrillandMapFilesSet( const wxString& aPlotDirectory, b
{
if( aReporter )
{
msg.Printf( _( "Create file %s\n" ), fullFilename );
msg.Printf( _( "Created file '%s'." ), fullFilename );
aReporter->Report( msg );
}
}

6
pcbnew/footprint_libraries_utils.cpp

@ -246,7 +246,7 @@ FOOTPRINT* FOOTPRINT_EDIT_FRAME::ImportFootprint( const wxString& aName )
if( !fp )
{
wxString msg = wxString::Format( _( "File \"%s\" not found" ), fn.GetFullPath() );
wxString msg = wxString::Format( _( "File '%s' not found." ), fn.GetFullPath() );
DisplayError( this, msg );
return nullptr;
}
@ -258,7 +258,7 @@ FOOTPRINT* FOOTPRINT_EDIT_FRAME::ImportFootprint( const wxString& aName )
if( fileType == IO_MGR::FILE_TYPE_NONE )
{
DisplayError( this, _( "Not a footprint file" ) );
DisplayError( this, _( "Not a footprint file." ) );
return nullptr;
}
@ -1062,7 +1062,7 @@ bool FOOTPRINT_EDIT_FRAME::RevertFootprint()
{
if( GetScreen()->IsContentModified() && m_revertModule )
{
wxString msg = wxString::Format( _( "Revert \"%s\" to last version saved?" ),
wxString msg = wxString::Format( _( "Revert '%s' to last version saved?" ),
GetLoadedFPID().GetLibItemName().wx_str() );
if( ConfirmRevertDialog( this, msg ) )

4
pcbnew/load_select_footprint.cpp

@ -428,7 +428,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveLibraryAs( const wxString& aLibraryPath )
const FOOTPRINT* footprint = cur->GetEnumeratedFootprint( curLibPath, footprints[i] );
dst->FootprintSave( dstLibPath, footprint );
msg = wxString::Format( _( "Footprint \"%s\" saved" ), footprints[i] );
msg = wxString::Format( _( "Footprint '%s' saved." ), footprints[i] );
SetStatusText( msg );
}
}
@ -438,7 +438,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveLibraryAs( const wxString& aLibraryPath )
return false;
}
msg = wxString::Format( _( "Footprint library \"%s\" saved as \"%s\"." ),
msg = wxString::Format( _( "Footprint library '%s' saved as '%s'." ),
curLibPath,
dstLibPath );

2
pcbnew/netlist_reader/kicad_netlist_reader.cpp

@ -435,7 +435,7 @@ void KICAD_NETLIST_PARSER::parseComponent()
if( !footprint.IsEmpty() && fpid.Parse( footprint, true ) >= 0 )
{
wxString error;
error.Printf( _( "Invalid footprint ID in\nfile: \"%s\"\nline: %d\noffset: %d" ),
error.Printf( _( "Invalid footprint ID in\nfile: '%s'\nline: %d\noffset: %d" ),
CurSource(), CurLineNumber(), CurOffset() );
THROW_IO_ERROR( error );

2
pcbnew/pcb_edit_frame.cpp

@ -1485,7 +1485,7 @@ void PCB_EDIT_FRAME::RunEeschema()
}
catch( const IO_ERROR& err )
{
wxMessageBox( _( "Eeschema failed to load:\n" ) + err.What(),
wxMessageBox( _( "Eeschema failed to load." ) + wxS( "\n" ) + err.What(),
_( "KiCad Error" ), wxOK | wxICON_ERROR, this );
return;
}

2
pcbnew/pcb_group.cpp

@ -305,7 +305,7 @@ wxString PCB_GROUP::GetSelectMenuText( EDA_UNITS aUnits ) const
m_items.size() );
}
return wxString::Format( _( "Group \"%s\", %zu members" ),
return wxString::Format( _( "Group '%s', %zu members" ),
m_name,
m_items.size() );
}

4
pcbnew/plugins/altium/altium_pcb.cpp

@ -860,7 +860,7 @@ void ALTIUM_PCB::ParseClasses6Data( const CFB::CompoundFileReader& aReader,
{
// Name conflict, this is likely a bad board file.
// unique_ptr will delete nc on this code path
THROW_IO_ERROR( wxString::Format( _( "Duplicated Netclass name \"%s\"" ), elem.name ) );
THROW_IO_ERROR( wxString::Format( _( "Duplicate netclass name '%s'." ), elem.name ) );
}
}
}
@ -1281,7 +1281,7 @@ void ALTIUM_PCB::ParseModelsData( const CFB::CompoundFileReader& aReader,
{
if( !altiumModelsPath.Mkdir() )
{
wxLogError( _( "Cannot create directory '%s'. No 3D-models will be imported." ),
wxLogError( _( "Failed to create folder '%s'." ) + _( "No 3D-models will be imported." ),
altiumModelsPath.GetFullPath() );
return;
}

9
pcbnew/plugins/eagle/eagle_plugin.cpp

@ -1039,8 +1039,9 @@ void EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLib, const wxString* aLibName )
wxString lib = aLibName ? *aLibName : m_lib_path;
const wxString& pkg = pack_ref;
wxString emsg = wxString::Format(
_( "<package> name: \"%s\" duplicated in eagle <library>: \"%s\"" ), pkg, lib );
wxString emsg = wxString::Format( _( "<package> '%s' duplicated in <library> '%s'" ),
pkg,
lib );
THROW_IO_ERROR( emsg );
}
@ -2871,8 +2872,10 @@ void EAGLE_PLUGIN::cacheLib( const wxString& aLibPath )
wxXmlDocument xmlDocument;
if( !stream.IsOk() || !xmlDocument.Load( stream ) )
THROW_IO_ERROR( wxString::Format( _( "Unable to read file \"%s\"" ),
{
THROW_IO_ERROR( wxString::Format( _( "Unable to read file '%s'." ),
fn.GetFullPath() ) );
}
doc = xmlDocument.GetRoot();

19
pcbnew/plugins/geda/gpcb_plugin.cpp

@ -88,7 +88,7 @@ static inline long parseInt( const wxString& aValue, double aScalar )
aValue.ToCDouble(&value);
if( value == std::numeric_limits<double>::max() ) // conversion really failed
{
THROW_IO_ERROR( wxString::Format( _( "Cannot convert \"%s\" to an integer" ),
THROW_IO_ERROR( wxString::Format( _( "Cannot convert '%s' to an integer." ),
aValue.GetData() ) );
return 0;
}
@ -226,7 +226,7 @@ void GPCB_FPL_CACHE::Load()
if( !dir.IsOpened() )
{
THROW_IO_ERROR( wxString::Format( _( "footprint library path \"%s\" does not exist" ),
THROW_IO_ERROR( wxString::Format( _( "Footprint library '%s' not found." ),
m_lib_path.GetPath().GetData() ) );
}
@ -280,7 +280,7 @@ void GPCB_FPL_CACHE::Remove( const wxString& aFootprintName )
if( it == m_footprints.end() )
{
THROW_IO_ERROR( wxString::Format( _( "library \"%s\" has no footprint \"%s\" to delete" ),
THROW_IO_ERROR( wxString::Format( _( "Library '%s' has no footprint '%s'." ),
m_lib_path.GetPath().GetData(),
aFootprintName.GetData() ) );
}
@ -344,7 +344,7 @@ FOOTPRINT* GPCB_FPL_CACHE::parseFOOTPRINT( LINE_READER* aLineReader )
if( parameters[0].CmpNoCase( wxT( "Element" ) ) != 0 )
{
msg.Printf( _( "unknown token \"%s\"" ), parameters[0] );
msg.Printf( _( "Unknown token '%s'" ), parameters[0] );
THROW_PARSE_ERROR( msg, aLineReader->GetSource(), (const char *)aLineReader,
aLineReader->LineNumber(), 0 );
}
@ -874,7 +874,7 @@ void GPCB_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames, const wxSt
return;
else
{
THROW_IO_ERROR( wxString::Format( _( "footprint library path \"%s\" does not exist" ),
THROW_IO_ERROR( wxString::Format( _( "Footprint library '%s' not found." ),
aLibraryPath ) );
}
}
@ -960,7 +960,7 @@ void GPCB_PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxString&
if( !m_cache->IsWritable() )
{
THROW_IO_ERROR( wxString::Format( _( "Library \"%s\" is read only" ),
THROW_IO_ERROR( wxString::Format( _( "Library '%s' is read only." ),
aLibraryPath.GetData() ) );
}
@ -1006,8 +1006,9 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROPER
if( tmp.GetExt() != KiCadFootprintFileExtension )
{
THROW_IO_ERROR( wxString::Format( _( "unexpected file \"%s\" was found in library path \"%s\"" ),
files[i].GetData(), aLibraryPath.GetData() ) );
THROW_IO_ERROR( wxString::Format( _( "Unexpected file '%s' found in library '%s'." ),
files[i].GetData(),
aLibraryPath.GetData() ) );
}
}
@ -1024,7 +1025,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROPER
// we don't want that. we want bare metal portability with no UI here.
if( !wxRmdir( aLibraryPath ) )
{
THROW_IO_ERROR( wxString::Format( _( "footprint library \"%s\" cannot be deleted" ),
THROW_IO_ERROR( wxString::Format( _( "Footprint library '%s' cannot be deleted." ),
aLibraryPath.GetData() ) );
}

7
pcbnew/plugins/kicad/kicad_plugin.cpp

@ -169,13 +169,13 @@ void FP_CACHE::Save( FOOTPRINT* aFootprint )
if( !m_lib_path.DirExists() && !m_lib_path.Mkdir() )
{
THROW_IO_ERROR( wxString::Format( _( "Cannot create footprint library path '%s'." ),
THROW_IO_ERROR( wxString::Format( _( "Cannot create footprint library '%s'." ),
m_lib_raw_path ) );
}
if( !m_lib_path.IsDirWritable() )
{
THROW_IO_ERROR( wxString::Format( _( "Footprint library path '%s' is read only." ),
THROW_IO_ERROR( wxString::Format( _( "Footprint library '%s' is read only." ),
m_lib_raw_path ) );
}
@ -239,8 +239,7 @@ void FP_CACHE::Load()
if( !dir.IsOpened() )
{
wxString msg = wxString::Format( _( "Footprint library path '%s' does not exist "
"(or is not a directory)." ),
wxString msg = wxString::Format( _( "Footprint library '%s' not found." ),
m_lib_raw_path );
THROW_IO_ERROR( msg );
}

30
pcbnew/plugins/legacy/legacy_plugin.cpp

@ -2463,7 +2463,7 @@ void LEGACY_PLUGIN::loadNETCLASS()
// unique_ptr will delete nc on this code path
m_error.Printf( _( "duplicate NETCLASS name \"%s\"" ), nc->GetName().GetData() );
m_error.Printf( _( "Duplicate NETCLASS name '%s'." ), nc->GetName().GetData() );
THROW_IO_ERROR( m_error );
}
@ -2980,18 +2980,20 @@ BIU LEGACY_PLUGIN::biuParse( const char* aValue, const char** nptrptr )
if( errno )
{
m_error.Printf( _( "invalid float number in file: \"%s\"\nline: %d, offset: %d" ),
m_reader->GetSource().GetData(),
m_reader->LineNumber(), aValue - m_reader->Line() + 1 );
m_error.Printf( _( "Invalid floating point number in file: '%s'\nline: %d, offset: %d" ),
m_reader->GetSource().GetData(),
m_reader->LineNumber(),
aValue - m_reader->Line() + 1 );
THROW_IO_ERROR( m_error );
}
if( aValue == nptr )
{
m_error.Printf( _( "missing float number in file: \"%s\"\nline: %d, offset: %d" ),
m_reader->GetSource().GetData(),
m_reader->LineNumber(), aValue - m_reader->Line() + 1 );
m_error.Printf( _( "Missing floating point number in file: '%s'\nline: %d, offset: %d" ),
m_reader->GetSource().GetData(),
m_reader->LineNumber(),
aValue - m_reader->Line() + 1 );
THROW_IO_ERROR( m_error );
}
@ -3017,16 +3019,20 @@ double LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr )
if( errno )
{
m_error.Printf( _( "invalid float number in file: \"%s\"\nline: %d, offset: %d" ),
m_reader->GetSource().GetData(), m_reader->LineNumber(), aValue - m_reader->Line() + 1 );
m_error.Printf( _( "Invalid floating point number in file: '%s'\nline: %d, offset: %d" ),
m_reader->GetSource().GetData(),
m_reader->LineNumber(),
aValue - m_reader->Line() + 1 );
THROW_IO_ERROR( m_error );
}
if( aValue == nptr )
{
m_error.Printf( _( "missing float number in file: \"%s\"\nline: %d, offset: %d" ),
m_reader->GetSource().GetData(), m_reader->LineNumber(), aValue - m_reader->Line() + 1 );
m_error.Printf( _( "Missing floating point number in file: '%s'\nline: %d, offset: %d" ),
m_reader->GetSource().GetData(),
m_reader->LineNumber(),
aValue - m_reader->Line() + 1 );
THROW_IO_ERROR( m_error );
}
@ -3396,7 +3402,7 @@ bool LEGACY_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath,
// we don't want that. we want bare metal portability with no UI here.
if( wxRemove( aLibraryPath ) )
{
THROW_IO_ERROR( wxString::Format( _( "library \"%s\" cannot be deleted" ),
THROW_IO_ERROR( wxString::Format( _( "Footprint library '%s' cannot be deleted." ),
aLibraryPath.GetData() ) );
}

Loading…
Cancel
Save