More error message regularization.
This commit is contained in:
parent
70ac70f360
commit
4aa8318dc2
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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() );
|
||||
}
|
||||
|
||||
|
|
|
@ -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" ),
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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() );
|
||||
|
||||
|
|
|
@ -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<SCH_SHEET_INSTANCE>
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -23,10 +23,6 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file class_library.cpp
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <kiface_i.h>
|
||||
#include <eda_base_frame.h>
|
||||
|
@ -47,12 +43,6 @@
|
|||
#include <wx/log.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/regex.h>
|
||||
|
||||
#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 );
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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() ) ) )
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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() ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -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() ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -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" ),
|
||||
wxString error;
|
||||
error.Printf( _( "Layer '%s' in file '%s' at line %d is not in fixed layer hash." ),
|
||||
layer.m_name,
|
||||
CurSource(),
|
||||
CurLineNumber(),
|
||||
CurOffset()
|
||||
);
|
||||
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;
|
||||
|
|
|
@ -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() ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue