diff --git a/3d-viewer/3d_viewer/eda_3d_viewer.cpp b/3d-viewer/3d_viewer/eda_3d_viewer.cpp index 3f6dcfbf5d..aac7f42f9b 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer.cpp +++ b/3d-viewer/3d_viewer/eda_3d_viewer.cpp @@ -735,7 +735,7 @@ void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event ) { wxString msg; - msg.Printf( _( "Insufficient permissions required to save file\n%s" ), fullFileName ); + msg.Printf( _( "Insufficient permissions to save file '%s'." ), fullFileName ); wxMessageBox( msg, _( "Error" ), wxOK | wxICON_ERROR, this ); return; } diff --git a/common/eda_base_frame.cpp b/common/eda_base_frame.cpp index f6ae293535..1bc084e8d2 100644 --- a/common/eda_base_frame.cpp +++ b/common/eda_base_frame.cpp @@ -1035,17 +1035,17 @@ bool EDA_BASE_FRAME::IsWritable( const wxFileName& aFileName ) if( fn.IsDir() && !fn.IsDirWritable() ) { - msg.Printf( _( "You do not have write permissions to folder '%s'." ), + msg.Printf( _( "Insufficient permissions to folder '%s'." ), fn.GetPath() ); } else if( !fn.FileExists() && !fn.IsDirWritable() ) { - msg.Printf( _( "You do not have write permissions to save file '%s' to folder '%s'." ), + msg.Printf( _( "Insufficient permissions to save file '%s'." ), fn.GetFullName(), fn.GetPath() ); } else if( fn.FileExists() && !fn.IsFileWritable() ) { - msg.Printf( _( "You do not have write permissions to save file '%s'." ), + msg.Printf( _( "Insufficient permissions to save file '%s'." ), fn.GetFullPath() ); } diff --git a/common/tool/common_control.cpp b/common/tool/common_control.cpp index 235b3522e8..d7bfdef280 100644 --- a/common/tool/common_control.cpp +++ b/common/tool/common_control.cpp @@ -213,7 +213,7 @@ int COMMON_CONTROL::ShowHelp( const TOOL_EVENT& aEvent ) if( !helpFile ) { - msg = wxString::Format( _( "Help file \"%s\" or\n\"%s\" could not be found.\n" + msg = wxString::Format( _( "Help file '%s' or\n'%s' could not be found.\n" "Do you want to access the KiCad online help?" ), names[0], names[1] ); wxMessageDialog dlg( NULL, msg, _( "File Not Found" ), @@ -233,7 +233,7 @@ int COMMON_CONTROL::ShowHelp( const TOOL_EVENT& aEvent ) if( !helpFile ) { - msg = wxString::Format( _( "Help file \"%s\" could not be found.\n" + msg = wxString::Format( _( "Help file '%s' could not be found.\n" "Do you want to access the KiCad online help?" ), base_name ); wxMessageDialog dlg( NULL, msg, _( "File Not Found" ), diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index bfeb40edda..346ee838ee 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -531,7 +531,7 @@ void CVPCB_MAINFRAME::AssociateFootprint( const CVPCB_ASSOCIATION& aAssociation, // Test for validity of the requested footprint if( !fpid.empty() && !fpid.IsValid() ) { - wxString msg = wxString::Format( _( "\"%s\" is not a valid footprint." ), + wxString msg = wxString::Format( _( "'%s' is not a valid footprint." ), fpid.Format().wx_str() ); DisplayErrorMessage( this, msg ); return; @@ -841,7 +841,7 @@ void CVPCB_MAINFRAME::SendMessageToEESCHEMA( bool aClearHighligntOnly ) // Now highlight the selected symbol: COMPONENT* symbol = m_netlist.GetComponent( selection ); - packet = StrPrintf( "$PART: \"%s\"", TO_UTF8( symbol->GetReference() ) ); + packet = std::string( "$PART: \"" ) + TO_UTF8( symbol->GetReference() ) + "\""; if( Kiface().IsSingle() ) SendCommand( MSG_TO_SCH, packet ); diff --git a/eeschema/dialogs/dialog_schematic_setup.cpp b/eeschema/dialogs/dialog_schematic_setup.cpp index 92501bb1e4..8d1fec4532 100644 --- a/eeschema/dialogs/dialog_schematic_setup.cpp +++ b/eeschema/dialogs/dialog_schematic_setup.cpp @@ -147,7 +147,7 @@ void DIALOG_SCHEMATIC_SETUP::OnAuxiliaryAction( wxCommandEvent& event ) if( !m_frame->GetSettingsManager()->LoadProject( projectFn.GetFullPath(), false ) ) { wxString msg = wxString::Format( _( "Error importing settings from project:\n" - "Project file %s could not be loaded" ), + "Project file %s could not be loaded." ), projectFn.GetFullPath() ); DisplayErrorMessage( this, msg ); diff --git a/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp b/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp index 3e9a009c12..a4d4b315eb 100644 --- a/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp +++ b/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp @@ -2706,8 +2706,10 @@ void SCH_LEGACY_PLUGIN_CACHE::loadDocs() return; if( !fn.IsFileReadable() ) - THROW_IO_ERROR( wxString::Format( _( "user does not have permission to read library " - "document file \"%s\"" ), fn.GetFullPath() ) ); + { + THROW_IO_ERROR( wxString::Format( _( "Insufficient permissions to read library '%s'." ), + fn.GetFullPath() ) ); + } FILE_LINE_READER reader( fn.GetFullPath() ); diff --git a/eeschema/sch_sheet_path.cpp b/eeschema/sch_sheet_path.cpp index 1455362a8e..b7ff788ef0 100644 --- a/eeschema/sch_sheet_path.cpp +++ b/eeschema/sch_sheet_path.cpp @@ -923,7 +923,7 @@ void SCH_SHEET_LIST::UpdateSymbolInstances( if( it == aSymbolInstances.end() ) { - wxLogTrace( traceSchSheetPaths, "No symbol instance found for path \"%s\"", path ); + wxLogTrace( traceSchSheetPaths, "No symbol instance found for path '%s'", path ); continue; } @@ -954,7 +954,7 @@ void SCH_SHEET_LIST::UpdateSheetInstances( const std::vector if( it == aSheetInstances.end() ) { - wxLogTrace( traceSchSheetPaths, "No sheet instance found for path \"%s\"", + wxLogTrace( traceSchSheetPaths, "No sheet instance found for path '%s'", instance.PathWithoutRootUuid().AsString() ); continue; } diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index 78e7e8de94..89bfe66eb4 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -1551,7 +1551,7 @@ bool SIM_PLOT_FRAME::canCloseWindow( wxCloseEvent& aEvent ) if( filename.GetName().IsEmpty() ) filename.SetFullName( Prj().GetProjectName() + wxT( ".wbk" ) ); - wxString msg = _( "Save changes to \"%s\" before closing?" ); + wxString msg = _( "Save changes to '%s' before closing?" ); return HandleUnsavedChanges( this, wxString::Format( msg, filename.GetFullName() ), [&]()->bool diff --git a/eeschema/sim/spice_value.cpp b/eeschema/sim/spice_value.cpp index 5cf604c0e6..26649f5d12 100644 --- a/eeschema/sim/spice_value.cpp +++ b/eeschema/sim/spice_value.cpp @@ -274,8 +274,8 @@ bool SPICE_VALIDATOR::Validate( wxWindow* aParent ) } catch( ... ) { - DisplayError( aParent, - wxString::Format( _( "\"%s\" is not a valid Spice value" ), text->GetValue() ) ); + DisplayError( aParent, wxString::Format( _( "'%s' is not a valid Spice value." ), + text->GetValue() ) ); return false; } diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index 7f1a51e71c..7b17dc39b5 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -822,7 +822,7 @@ bool SYMBOL_EDIT_FRAME::AddLibraryFile( bool aCreateNew ) if( m_libMgr->LibraryExists( libName ) ) { - DisplayError( this, wxString::Format( _( "Library \"%s\" already exists" ), libName ) ); + DisplayError( this, wxString::Format( _( "Library '%s' already exists." ), libName ) ); return false; } @@ -831,7 +831,7 @@ bool SYMBOL_EDIT_FRAME::AddLibraryFile( bool aCreateNew ) if( !m_libMgr->CreateLibrary( fn.GetFullPath(), libTable ) ) { DisplayError( this, wxString::Format( _( "Could not create the library file '%s'.\n" - "Check write permission." ), + "Make sure you have write permissions and try again." ), fn.GetFullPath() ) ); return false; } @@ -1031,7 +1031,7 @@ bool SYMBOL_EDIT_FRAME::backupFile( const wxFileName& aOriginalFile, const wxStr if( !wxCopyFile( aOriginalFile.GetFullPath(), backupFileName.GetFullPath() ) ) { - DisplayError( this, wxString::Format( _( "Failed to save backup to \"%s\"" ), + DisplayError( this, wxString::Format( _( "Failed to save backup to '%s'." ), backupFileName.GetFullPath() ) ); return false; } diff --git a/eeschema/symbol_editor/symbol_editor_import_export.cpp b/eeschema/symbol_editor/symbol_editor_import_export.cpp index bb937f5c9d..95ef995995 100644 --- a/eeschema/symbol_editor/symbol_editor_import_export.cpp +++ b/eeschema/symbol_editor/symbol_editor_import_export.cpp @@ -163,7 +163,7 @@ void SYMBOL_EDIT_FRAME::ExportSymbol() if( fn.Exists() && !fn.IsDirWritable() ) { - msg.Printf( _( "Write permissions are required to save library '%s'." ), + msg.Printf( _( "Insufficient permissions to save library '%s'." ), fn.GetFullPath() ); DisplayError( this, msg ); return; diff --git a/eeschema/symbol_library.cpp b/eeschema/symbol_library.cpp index 4826a23935..096595a84a 100644 --- a/eeschema/symbol_library.cpp +++ b/eeschema/symbol_library.cpp @@ -23,10 +23,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file class_library.cpp - */ - #include #include #include @@ -47,12 +43,6 @@ #include #include #include -#include - -#define DUPLICATE_NAME_MSG \ - _( "Library \"%s\" has duplicate entry name \"%s\".\n" \ - "This may cause some unexpected behavior when loading symbols into a schematic." ) - SYMBOL_LIB::SYMBOL_LIB( SCH_LIB_TYPE aType, const wxString& aFileName, SCH_IO_MGR::SCH_FILE_T aPluginType ) : @@ -581,9 +571,10 @@ void SYMBOL_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress ) } catch( const IO_ERROR& ioe ) { - wxString msg = - wxString::Format( _( "Symbol library \"%s\" failed to load.\nError: %s" ), - cache_name, ioe.What() ); + wxString msg = wxString::Format( _( "Error loading symbol library '%s'." ) + + wxS( "\n%s" ), + cache_name, + ioe.What() ); THROW_IO_ERROR( msg ); } diff --git a/kicad/tools/kicad_manager_control.cpp b/kicad/tools/kicad_manager_control.cpp index b58836a856..84a4d7f70d 100644 --- a/kicad/tools/kicad_manager_control.cpp +++ b/kicad/tools/kicad_manager_control.cpp @@ -225,9 +225,8 @@ int KICAD_MANAGER_CONTROL::NewFromTemplate( const TOOL_EVENT& aEvent ) { wxString msg; - msg.Printf( _( "Cannot write to folder '%s'." ), fn.GetPath() ); + msg.Printf( _( "Insufficient permissions to write to folder '%s'." ), fn.GetPath() ); wxMessageDialog msgDlg( m_frame, msg, _( "Error" ), wxICON_ERROR | wxOK | wxCENTER ); - msgDlg.SetExtendedMessage( _( "Make sure you have write permissions and try again." ) ); msgDlg.ShowModal(); return -1; } @@ -536,7 +535,7 @@ int KICAD_MANAGER_CONTROL::SaveProjectAs( const TOOL_EVENT& aEvent ) if( !wxMkdir( newProjectDir.GetFullPath() ) ) { - msg.Printf( _( "Directory '%s' could not be created.\n\n" + msg.Printf( _( "Folder '%s' could not be created.\n\n" "Please make sure you have write permissions and try again." ), newProjectDir.GetPath() ); DisplayErrorMessage( m_frame, msg ); @@ -545,10 +544,9 @@ int KICAD_MANAGER_CONTROL::SaveProjectAs( const TOOL_EVENT& aEvent ) if( !newProjectDir.IsDirWritable() ) { - msg.Printf( _( "Cannot write to folder '%s'." ), newProjectDir.GetFullPath() ); + msg.Printf( _( "Insufficient permissions to write to folder '%s'." ), + newProjectDir.GetFullPath() ); wxMessageDialog msgDlg( m_frame, msg, _( "Error!" ), wxICON_ERROR | wxOK | wxCENTER ); - msgDlg.SetExtendedMessage( _( "Please check your access permissions to this folder " - "and try again." ) ); msgDlg.ShowModal(); return -1; } diff --git a/pagelayout_editor/files.cpp b/pagelayout_editor/files.cpp index 2c47e2cf9e..d7960be7f6 100644 --- a/pagelayout_editor/files.cpp +++ b/pagelayout_editor/files.cpp @@ -169,12 +169,12 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event ) case wxID_SAVE: if( !SaveDrawingSheetFile( filename ) ) { - msg.Printf( _( "Unable to write \"%s\"" ), filename ); + msg.Printf( _( "Unable to write '%s'." ), filename ); DisplayErrorMessage( this, msg ); } else { - msg.Printf( _("File \"%s\" saved."), filename ); + msg.Printf( _("File '%s' saved."), filename ); SetStatusText( msg ); } break; diff --git a/pcbnew/dialogs/dialog_create_array.cpp b/pcbnew/dialogs/dialog_create_array.cpp index b3802aa799..f8f507990c 100644 --- a/pcbnew/dialogs/dialog_create_array.cpp +++ b/pcbnew/dialogs/dialog_create_array.cpp @@ -296,8 +296,8 @@ static bool validateAxisOptions( const wxTextCtrl& offsetEntry, const wxChoice& if( !ok ) { - errors.Add( wxString::Format( _( "Could not determine numbering start from \"%s\": " - "expected value consistent with alphabet \"%s\"" ), + errors.Add( wxString::Format( _( "Could not determine numbering start from '%s': " + "expected value consistent with alphabet '%s'." ), text, aAxis.GetAlphabet() ) ); return false; diff --git a/pcbnew/dialogs/dialog_export_svg.cpp b/pcbnew/dialogs/dialog_export_svg.cpp index 59540b29c0..c30e3b73fb 100644 --- a/pcbnew/dialogs/dialog_export_svg.cpp +++ b/pcbnew/dialogs/dialog_export_svg.cpp @@ -261,7 +261,7 @@ void DIALOG_EXPORT_SVG::ExportSVGFile( bool aOnlyOneFile ) if( !EnsureFileDirectoryExists( &outputDir, boardFilename, &reporter ) ) { - wxString msg = wxString::Format( _( "Could not write plot files to folder \"%s\"." ), + wxString msg = wxString::Format( _( "Could not write plot files to folder '%s'." ), outputDir.GetPath() ); DisplayError( this, msg ); return; @@ -288,11 +288,12 @@ void DIALOG_EXPORT_SVG::ExportSVGFile( bool aOnlyOneFile ) if( CreateSVGFile( svgPath ) ) { - reporter.Report( wxString::Format( _( "Exported \"%s\"." ), svgPath ), RPT_SEVERITY_ACTION ); + reporter.Report( wxString::Format( _( "Exported '%s'." ), svgPath ), + RPT_SEVERITY_ACTION ); } else // Error { - reporter.Report( wxString::Format( _( "Unable to create file \"%s\"." ), svgPath ), + reporter.Report( wxString::Format( _( "Unable to create '%s'." ), svgPath ), RPT_SEVERITY_ERROR ); } diff --git a/pcbnew/dialogs/dialog_fp_plugin_options.cpp b/pcbnew/dialogs/dialog_fp_plugin_options.cpp index fd027ff990..fc01df1bb3 100644 --- a/pcbnew/dialogs/dialog_fp_plugin_options.cpp +++ b/pcbnew/dialogs/dialog_fp_plugin_options.cpp @@ -59,7 +59,7 @@ public: m_initial_help( INITIAL_HELP ), m_grid_widths_dirty( true ) { - SetTitle( wxString::Format( _( "Options for Library \"%s\"" ), aNickname ) ); + SetTitle( wxString::Format( _( "Options for Library '%s'" ), aNickname ) ); // Give a bit more room for combobox editors m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 ); diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp index 2808076012..a260035f28 100644 --- a/pcbnew/drc/drc_engine.cpp +++ b/pcbnew/drc/drc_engine.cpp @@ -1003,7 +1003,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintId, const BOAR } else { - REPORT( wxString::Format( _( "Checking rule condition \"%s\"." ), + REPORT( wxString::Format( _( "Checking rule condition '%s'." ), EscapeHTML( c->condition->GetExpression() ) ) ) } diff --git a/pcbnew/exporters/export_d356.cpp b/pcbnew/exporters/export_d356.cpp index c62640e526..14e026409e 100644 --- a/pcbnew/exporters/export_d356.cpp +++ b/pcbnew/exporters/export_d356.cpp @@ -338,7 +338,7 @@ void IPC356D_WRITER::Write( const wxString& aFilename ) if( ( file = wxFopen( aFilename, wxT( "wt" ) ) ) == nullptr ) { wxString details; - details.Printf( "The file %s could not be opened for writing", aFilename ); + details.Printf( "The file %s could not be opened for writing.", aFilename ); DisplayErrorMessage( m_parent, "Could not write IPC-356D file!", details ); return; } diff --git a/pcbnew/exporters/export_footprint_associations.cpp b/pcbnew/exporters/export_footprint_associations.cpp index 4923d5e716..16b6ed1fb9 100644 --- a/pcbnew/exporters/export_footprint_associations.cpp +++ b/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( _( "Could not create file '%s'." ), path ) ); } diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 9d5c864dfd..cc78b3ad0e 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -942,7 +942,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool addToHistory, if( !IsWritable( pcbFileName ) ) { - wxString msg = wxString::Format( _( "No access rights to write to file \"%s\"" ), + wxString msg = wxString::Format( _( "Insufficient permissions to write file '%s'." ), pcbFileName.GetFullPath() ); DisplayError( this, msg ); @@ -1081,7 +1081,7 @@ bool PCB_EDIT_FRAME::SavePcbCopy( const wxString& aFileName, bool aCreateProject if( !IsWritable( pcbFileName ) ) { - DisplayError( this, wxString::Format( _( "No access rights to write to file '%s'." ), + DisplayError( this, wxString::Format( _( "Insufficient permissions to write file '%s'." ), pcbFileName.GetFullPath() ) ); return false; } diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index f2273d6e55..aabf63e7d2 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -619,7 +619,7 @@ bool FOOTPRINT_EDIT_FRAME::canCloseWindow( wxCloseEvent& aEvent ) } wxString footprintName = GetBoard()->GetFirstFootprint()->GetFPID().GetLibItemName(); - wxString msg = _( "Save changes to \"%s\" before closing?" ); + wxString msg = _( "Save changes to '%s' before closing?" ); if( !HandleUnsavedChanges( this, wxString::Format( msg, footprintName ), [&]() -> bool diff --git a/pcbnew/footprint_libraries_utils.cpp b/pcbnew/footprint_libraries_utils.cpp index 5440ed14a7..63a14fdc27 100644 --- a/pcbnew/footprint_libraries_utils.cpp +++ b/pcbnew/footprint_libraries_utils.cpp @@ -356,7 +356,7 @@ void FOOTPRINT_EDIT_FRAME::ExportFootprint( FOOTPRINT* aFootprint ) if( fp == nullptr ) { - wxMessageBox( wxString::Format( _( "Unable to create or write file '%s'." ), + wxMessageBox( wxString::Format( _( "Insufficient permissions to write file '%s'." ), dlg.GetPath() ) ); return; } diff --git a/pcbnew/plugins/altium/altium_pcb.cpp b/pcbnew/plugins/altium/altium_pcb.cpp index 6def840e59..1c6876119c 100644 --- a/pcbnew/plugins/altium/altium_pcb.cpp +++ b/pcbnew/plugins/altium/altium_pcb.cpp @@ -1309,9 +1309,10 @@ void ALTIUM_PCB::ParseModelsData( const CFB::CompoundFileReader& aReader, aReader.ReadFile( stepEntry, 0, stepContent.get(), stepSize ); wxFileName storagePath( altiumModelsPath.GetPath(), elem.name ); + if( !storagePath.IsDirWritable() ) { - wxLogError( _( "You do not have write permissions to save file '%s'." ), + wxLogError( _( "Insufficient permissions to save file '%s'." ), storagePath.GetFullPath() ); continue; } diff --git a/pcbnew/plugins/geda/gpcb_plugin.cpp b/pcbnew/plugins/geda/gpcb_plugin.cpp index baa226e7c7..aeed527906 100644 --- a/pcbnew/plugins/geda/gpcb_plugin.cpp +++ b/pcbnew/plugins/geda/gpcb_plugin.cpp @@ -979,7 +979,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROPER if( !fn.IsDirWritable() ) { - THROW_IO_ERROR( wxString::Format( _( "user does not have permission to delete directory \"%s\"" ), + THROW_IO_ERROR( wxString::Format( _( "Insufficient permissions to delete folder '%s'." ), aLibraryPath.GetData() ) ); } @@ -987,7 +987,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROPER if( dir.HasSubDirs() ) { - THROW_IO_ERROR( wxString::Format( _( "library directory \"%s\" has unexpected sub-directories" ), + THROW_IO_ERROR( wxString::Format( _( "Library folder '%s' has unexpected sub-folders." ), aLibraryPath.GetData() ) ); } diff --git a/pcbnew/plugins/kicad/kicad_plugin.cpp b/pcbnew/plugins/kicad/kicad_plugin.cpp index f330e0a5c2..8e9d3c16eb 100644 --- a/pcbnew/plugins/kicad/kicad_plugin.cpp +++ b/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 path '%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 path '%s' is read only." ), m_lib_raw_path ) ); } @@ -195,7 +195,7 @@ void FP_CACHE::Save( FOOTPRINT* aFootprint ) // Allow file output stream to go out of scope to close the file stream before // renaming the file. { - wxLogTrace( traceKicadPcbPlugin, wxT( "Creating temporary library file %s" ), + wxLogTrace( traceKicadPcbPlugin, wxT( "Creating temporary library file '%s'." ), tempFileName ); FILE_OUTPUTFORMATTER formatter( tempFileName ); @@ -213,9 +213,9 @@ void FP_CACHE::Save( FOOTPRINT* aFootprint ) if( !wxRenameFile( tempFileName, fn.GetFullPath() ) ) { - wxString msg = wxString::Format( - _( "Cannot rename temporary file \"%s\" to footprint library file \"%s\"" ), - tempFileName, fn.GetFullPath() ); + wxString msg = wxString::Format( _( "Cannot rename temporary file '%s' to '%s'" ), + tempFileName, + fn.GetFullPath() ); THROW_IO_ERROR( msg ); } #endif @@ -296,7 +296,7 @@ void FP_CACHE::Remove( const wxString& aFootprintName ) if( it == m_footprints.end() ) { - wxString msg = wxString::Format( _( "library \"%s\" has no footprint \"%s\" to delete" ), + wxString msg = wxString::Format( _( "Library '%s' has no footprint '%s'." ), m_lib_raw_path, aFootprintName ); THROW_IO_ERROR( msg ); @@ -2400,7 +2400,7 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* aFoot { if( !m_cache->Exists() ) { - const wxString msg = wxString::Format( _( "Library \"%s\" does not exist.\n" + const wxString msg = wxString::Format( _( "Library '%s' does not exist.\n" "Would you like to create it?"), aLibraryPath ); @@ -2412,7 +2412,7 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* aFoot } else { - wxString msg = wxString::Format( _( "Library \"%s\" is read only" ), aLibraryPath ); + wxString msg = wxString::Format( _( "Library '%s' is read only." ), aLibraryPath ); THROW_IO_ERROR( msg ); } } @@ -2430,13 +2430,13 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* aFoot if( !fn.IsOk() ) { - THROW_IO_ERROR( wxString::Format( _( "Footprint file name \"%s\" is not valid." ), + THROW_IO_ERROR( wxString::Format( _( "Footprint file name '%s' is not valid." ), fn.GetFullPath() ) ); } if( fn.FileExists() && !fn.IsFileWritable() ) { - THROW_IO_ERROR( wxString::Format( _( "No write permissions to delete file \"%s\"" ), + THROW_IO_ERROR( wxString::Format( _( "Insufficient permissions to delete '%s'." ), fn.GetFullPath() ) ); } @@ -2488,7 +2488,7 @@ void PCB_IO::FootprintDelete( const wxString& aLibraryPath, const wxString& aFoo 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() ) ); } @@ -2507,7 +2507,7 @@ void PCB_IO::FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* { if( wxDir::Exists( aLibraryPath ) ) { - THROW_IO_ERROR( wxString::Format( _( "Cannot overwrite library path \"%s\"." ), + THROW_IO_ERROR( wxString::Format( _( "Cannot overwrite library path '%s'." ), aLibraryPath.GetData() ) ); } @@ -2532,8 +2532,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* if( !fn.IsDirWritable() ) { - THROW_IO_ERROR( wxString::Format( _( "User does not have permission to delete directory " - "\"%s\"." ), + THROW_IO_ERROR( wxString::Format( _( "Insufficient permissions to delete folder '%s'." ), aLibraryPath.GetData() ) ); } @@ -2541,8 +2540,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* if( dir.HasSubDirs() ) { - THROW_IO_ERROR( wxString::Format( _( "Library directory \"%s\" has unexpected " - "sub-directories." ), + THROW_IO_ERROR( wxString::Format( _( "Library folder '%s' has unexpected sub-folders." ), aLibraryPath.GetData() ) ); } @@ -2561,9 +2559,10 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* 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 " + "path '%s'." ), + files[i].GetData(), + aLibraryPath.GetData() ) ); } } @@ -2571,14 +2570,14 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* wxRemoveFile( files[i] ); } - wxLogTrace( traceKicadPcbPlugin, wxT( "Removing footprint library \"%s\"." ), + wxLogTrace( traceKicadPcbPlugin, wxT( "Removing footprint library '%s'." ), aLibraryPath.GetData() ); // Some of the more elaborate wxRemoveFile() crap puts up its own wxLog dialog // 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() ) ); } diff --git a/pcbnew/plugins/kicad/pcb_parser.cpp b/pcbnew/plugins/kicad/pcb_parser.cpp index 28b9ee7041..e20e197711 100644 --- a/pcbnew/plugins/kicad/pcb_parser.cpp +++ b/pcbnew/plugins/kicad/pcb_parser.cpp @@ -171,7 +171,7 @@ double PCB_PARSER::parseDouble() if( errno ) { wxString error; - error.Printf( _( "Invalid floating point number in\nfile: \"%s\"\nline: %d\noffset: %d" ), + error.Printf( _( "Invalid floating point number in\nfile: '%s'\nline: %d\noffset: %d" ), CurSource(), CurLineNumber(), CurOffset() ); THROW_IO_ERROR( error ); @@ -180,7 +180,7 @@ double PCB_PARSER::parseDouble() if( CurText() == tmp ) { wxString error; - error.Printf( _( "Missing floating point number in\nfile: \"%s\"\nline: %d\noffset: %d" ), + error.Printf( _( "Missing floating point number in\nfile: '%s'\nline: %d\noffset: %d" ), CurSource(), CurLineNumber(), CurOffset() ); THROW_IO_ERROR( error ); @@ -570,7 +570,7 @@ BOARD_ITEM* PCB_PARSER::Parse() default: wxString err; - err.Printf( _( "Unknown token \"%s\"" ), FromUTF8() ); + err.Printf( _( "Unknown token '%s'" ), FromUTF8() ); THROW_PARSE_ERROR( err, CurSource(), CurLine(), CurLineNumber(), CurOffset() ); } @@ -736,7 +736,7 @@ BOARD* PCB_PARSER::parseBOARD_unchecked() default: wxString err; - err.Printf( _( "Unknown token \"%s\"" ), FromUTF8() ); + err.Printf( _( "Unknown token '%s'" ), FromUTF8() ); THROW_PARSE_ERROR( err, CurSource(), CurLine(), CurLineNumber(), CurOffset() ); } } @@ -1007,7 +1007,7 @@ void PCB_PARSER::parsePAGE_INFO() if( !pageInfo.SetType( pageType ) ) { wxString err; - err.Printf( _( "Page type \"%s\" is not valid " ), FromUTF8() ); + err.Printf( _( "Page type '%s' is not valid." ), FromUTF8() ); THROW_PARSE_ERROR( err, CurSource(), CurLine(), CurLineNumber(), CurOffset() ); } @@ -1537,13 +1537,12 @@ void PCB_PARSER::parseLayers() if( it == m_layerIndices.end() ) { - wxString error = wxString::Format( - _( "Layer \"%s\" in file \"%s\" at line %d, is not in fixed layer hash" ), - layer.m_name, - CurSource(), - CurLineNumber(), - CurOffset() - ); + wxString error; + error.Printf( _( "Layer '%s' in file '%s' at line %d is not in fixed layer hash." ), + layer.m_name, + CurSource(), + CurLineNumber(), + CurOffset() ); THROW_IO_ERROR( error ); } @@ -2219,8 +2218,11 @@ void PCB_PARSER::parseNETCLASS() // unique_ptr will delete nc on this code path wxString error; - error.Printf( _( "Duplicate NETCLASS name \"%s\" in file \"%s\" at line %d, offset %d" ), - nc->GetName().GetData(), CurSource().GetData(), CurLineNumber(), CurOffset() ); + error.Printf( _( "Duplicate NETCLASS name '%s' in file '%s' at line %d, offset %d." ), + nc->GetName().GetData(), + CurSource().GetData(), + CurLineNumber(), + CurOffset() ); THROW_IO_ERROR( error ); } } @@ -3063,8 +3065,10 @@ FOOTPRINT* PCB_PARSER::parseFOOTPRINT_unchecked( wxArrayString* aInitialComments if( !name.IsEmpty() && fpid.Parse( name, true ) >= 0 ) { wxString error; - error.Printf( _( "Invalid footprint ID in\nfile: \"%s\"\nline: %d\noffset: %d" ), - CurSource(), CurLineNumber(), CurOffset() ); + error.Printf( _( "Invalid footprint ID in\nfile: '%s'\nline: %d\noffset: %d." ), + CurSource(), + CurLineNumber(), + CurOffset() ); THROW_IO_ERROR( error ); } @@ -4463,8 +4467,10 @@ PCB_ARC* PCB_PARSER::parseARC() case T_net: if( !arc->SetNetCode( getNetCode( parseInt( "net number" ) ), /* aNoAssert */ true ) ) THROW_IO_ERROR( wxString::Format( - _( "Invalid net ID in\nfile: \"%s\"\nline: %d\noffset: %d" ), CurSource(), - CurLineNumber(), CurOffset() ) ); + _( "Invalid net ID in\nfile: '%s'\nline: %d\noffset: %d." ), + CurSource(), + CurLineNumber(), + CurOffset() ) ); break; case T_tstamp: @@ -4541,7 +4547,7 @@ PCB_TRACK* PCB_PARSER::parsePCB_TRACK() case T_net: if( !track->SetNetCode( getNetCode( parseInt( "net number" ) ), /* aNoAssert */ true ) ) THROW_IO_ERROR( wxString::Format( - _( "Invalid net ID in\nfile: \"%s\"\nline: %d\noffset: %d" ), CurSource(), + _( "Invalid net ID in\nfile: '%s'\nline: %d\noffset: %d." ), CurSource(), CurLineNumber(), CurOffset() ) ); break; @@ -4745,8 +4751,10 @@ ZONE* PCB_PARSER::parseZONE( BOARD_ITEM_CONTAINER* aParent ) if( !zone->SetNetCode( tmp, /* aNoAssert */ true ) ) THROW_IO_ERROR( wxString::Format( - _( "Invalid net ID in\nfile: \"%s\"\nline: %d\noffset: %d" ), CurSource(), - CurLineNumber(), CurOffset() ) ); + _( "Invalid net ID in\n file: '%s;\nline: %d\noffset: %d." ), + CurSource(), + CurLineNumber(), + CurOffset() ) ); NeedRIGHT(); break; diff --git a/pcbnew/specctra_import_export/specctra_export.cpp b/pcbnew/specctra_import_export/specctra_export.cpp index 1779114271..f60a90ed41 100644 --- a/pcbnew/specctra_import_export/specctra_export.cpp +++ b/pcbnew/specctra_import_export/specctra_export.cpp @@ -1026,7 +1026,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) if( footprint->GetReference() == wxEmptyString ) { THROW_IO_ERROR( wxString::Format( - _( "Symbol with value of \"%s\" has empty reference id." ), + _( "Symbol with value of '%s' has empty reference id." ), footprint->GetValue() ) ); } @@ -1036,7 +1036,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) if( !refpair.second ) // insert failed { THROW_IO_ERROR( wxString::Format( - _( "Multiple symbols have identical reference IDs of \"%s\"." ), + _( "Multiple symbols have identical reference IDs of '%s'." ), footprint->GetReference() ) ); } } diff --git a/pcbnew/specctra_import_export/specctra_import.cpp b/pcbnew/specctra_import_export/specctra_import.cpp index 8726cd66af..bd78ebd0df 100644 --- a/pcbnew/specctra_import_export/specctra_import.cpp +++ b/pcbnew/specctra_import_export/specctra_import.cpp @@ -163,9 +163,8 @@ PCB_TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) if( layerNdx == -1 ) { - wxString layerName = FROM_UTF8( aPath->layer_id.c_str() ); - THROW_IO_ERROR( - wxString::Format( _( "Session file uses invalid layer id \"%s\"" ), layerName ) ); + THROW_IO_ERROR( wxString::Format( _( "Session file uses invalid layer id '%s'." ), + FROM_UTF8( aPath->layer_id.c_str() ) ) ); } PCB_TRACK* track = new PCB_TRACK( m_sessionBoard );