Skip to content

Commit

Permalink
Fix quotes in UI messages
Browse files Browse the repository at this point in the history
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
  • Loading branch information
GyrosGeier authored and stambaughw committed Dec 15, 2017
1 parent 9ed0f21 commit a9ccf11
Show file tree
Hide file tree
Showing 120 changed files with 406 additions and 406 deletions.
8 changes: 4 additions & 4 deletions bitmap2component/bitmap2cmp_gui.cpp
Expand Up @@ -500,7 +500,7 @@ void BM2CMP_FRAME::OnExportLogo()
if( outfile == NULL )
{
wxString msg;
msg.Printf( _( "File '%s' could not be created." ), GetChars( m_ConvertedFileName ) );
msg.Printf( _( "File \"%s\" could not be created." ), GetChars( m_ConvertedFileName ) );
wxMessageBox( msg );
return;
}
Expand Down Expand Up @@ -538,7 +538,7 @@ void BM2CMP_FRAME::OnExportPostScript()
if( outfile == NULL )
{
wxString msg;
msg.Printf( _( "File '%s' could not be created." ), GetChars( m_ConvertedFileName ) );
msg.Printf( _( "File \"%s\" could not be created." ), GetChars( m_ConvertedFileName ) );
wxMessageBox( msg );
return;
}
Expand Down Expand Up @@ -575,7 +575,7 @@ void BM2CMP_FRAME::OnExportEeschema()
if( outfile == NULL )
{
wxString msg;
msg.Printf( _( "File '%s' could not be created." ), GetChars( m_ConvertedFileName ) );
msg.Printf( _( "File \"%s\" could not be created." ), GetChars( m_ConvertedFileName ) );
wxMessageBox( msg );
return;
}
Expand Down Expand Up @@ -612,7 +612,7 @@ void BM2CMP_FRAME::OnExportPcbnew()
if( outfile == NULL )
{
wxString msg;
msg.Printf( _( "File '%s' could not be created." ), GetChars( m_ConvertedFileName ) );
msg.Printf( _( "File \"%s\" could not be created." ), GetChars( m_ConvertedFileName ) );
wxMessageBox( msg );
return;
}
Expand Down
16 changes: 8 additions & 8 deletions common/basicframe.cpp
Expand Up @@ -439,7 +439,7 @@ wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type,
else
{
wxString msg = wxString::Format(
wxT( "file '%s' was not found." ),
_( "File \"%s\" was not found." ),
GetChars( fn ) );

wxMessageBox( msg );
Expand Down Expand Up @@ -484,7 +484,7 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
if( !helpFile )
{
wxString msg = wxString::Format( _(
"Html or pdf help file \n'%s'\n or\n'%s' could not be found." ), names[0], names[1] );
"Html or pdf help file \n\"%s\"\n or\n\"%s\" could not be found." ), names[0], names[1] );
wxMessageBox( msg );
}
else
Expand All @@ -501,7 +501,7 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
if( !helpFile )
{
wxString msg = wxString::Format( _(
"Help file '%s' could not be found." ),
"Help file \"%s\" could not be found." ),
GetChars( base_name )
);
wxMessageBox( msg );
Expand Down Expand Up @@ -570,17 +570,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( _( "You do not have write permissions to folder \"%s\"." ),
GetChars( 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( _( "You do not have write permissions to save file \"%s\" to folder \"%s\"." ),
GetChars( fn.GetFullName() ), GetChars( fn.GetPath() ) );
}
else if( fn.FileExists() && !fn.IsFileWritable() )
{
msg.Printf( _( "You do not have write permissions to save file <%s>." ),
msg.Printf( _( "You do not have write permissions to save file \"%s\"." ),
GetChars( fn.GetFullPath() ) );
}

Expand Down Expand Up @@ -614,7 +614,7 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
wxString msg = wxString::Format( _(
"Well this is potentially embarrassing!\n"
"It appears that the last time you were editing the file\n"
"'%s'\n"
"\"%s\"\n"
"it was not saved properly. Do you wish to restore the last saved edits you made?" ),
GetChars( aFileName.GetFullName() )
);
Expand All @@ -640,7 +640,7 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
// Rename the old file to the backup file name.
if( !wxRenameFile( aFileName.GetFullPath(), backupFileName.GetFullPath() ) )
{
msg.Printf( _( "Could not create backup file <%s>" ),
msg.Printf( _( "Could not create backup file \"%s\"" ),
GetChars( backupFileName.GetFullPath() ) );
wxMessageBox( msg );
}
Expand Down
6 changes: 3 additions & 3 deletions common/common.cpp
Expand Up @@ -277,7 +277,7 @@ bool EnsureFileDirectoryExists( wxFileName* aTargetFullFileName,
{
if( aReporter )
{
msg.Printf( _( "Cannot make path '%s' absolute with respect to '%s'." ),
msg.Printf( _( "Cannot make path \"%s\" absolute with respect to \"%s\"." ),
GetChars( aTargetFullFileName->GetPath() ),
GetChars( baseFilePath ) );
aReporter->Report( msg, REPORTER::RPT_ERROR );
Expand All @@ -295,7 +295,7 @@ bool EnsureFileDirectoryExists( wxFileName* aTargetFullFileName,
{
if( aReporter )
{
msg.Printf( _( "Output directory '%s' created.\n" ), GetChars( outputPath ) );
msg.Printf( _( "Output directory \"%s\" created.\n" ), GetChars( outputPath ) );
aReporter->Report( msg, REPORTER::RPT_INFO );
return true;
}
Expand All @@ -304,7 +304,7 @@ bool EnsureFileDirectoryExists( wxFileName* aTargetFullFileName,
{
if( aReporter )
{
msg.Printf( _( "Cannot create output directory '%s'.\n" ),
msg.Printf( _( "Cannot create output directory \"%s\".\n" ),
GetChars( outputPath ) );
aReporter->Report( msg, REPORTER::RPT_ERROR );
}
Expand Down
2 changes: 1 addition & 1 deletion common/dialogs/dialog_env_var_config.cpp
Expand Up @@ -248,7 +248,7 @@ void DIALOG_ENV_VAR_CONFIG::EditSelectedEntry()
if( IsEnvVarImmutable( envName ) )
{
DisplayErrorMessage( this,
wxString::Format( _( "Environment variable '%s' cannot be renamed" ),
wxString::Format( _( "Environment variable \"%s\" cannot be renamed" ),
envName.ToStdString() ),
_( "The selected environment variable name "
"is required for KiCad functionality and "
Expand Down
6 changes: 3 additions & 3 deletions common/dialogs/dialog_page_settings.cpp
Expand Up @@ -433,7 +433,7 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
if( !wxFileExists( fullFileName ) )
{
wxString msg;
msg.Printf( _("Page layout description file <%s> not found. Abort"),
msg.Printf( _("Page layout description file \"%s\" not found. Abort"),
GetChars( fullFileName ) );
wxMessageBox( msg );
return false;
Expand Down Expand Up @@ -823,9 +823,9 @@ void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event )
wxString msg = wxString::Format( _(
"The page layout descr filename has changed.\n"
"Do you want to use the relative path:\n"
"'%s'\n"
"\"%s\"\n"
"instead of\n"
"'%s'" ), GetChars( shortFileName ), GetChars( fileName ) );
"\"%s\"" ), GetChars( shortFileName ), GetChars( fileName ) );

if( !IsOK( this, msg ) )
shortFileName = fileName;
Expand Down
2 changes: 1 addition & 1 deletion common/dialogs/wx_html_report_panel.cpp
Expand Up @@ -265,7 +265,7 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event )
{
wxString msg;

msg.Printf( _( "Cannot write report to file '%s'." ),
msg.Printf( _( "Cannot write report to file \"%s\"." ),
fn.GetFullPath().GetData() );
wxMessageBox( msg, _( "File save error" ), wxOK | wxICON_ERROR, this );
return;
Expand Down
10 changes: 5 additions & 5 deletions common/dsnlexer.cpp
Expand Up @@ -353,23 +353,23 @@ bool DSNLEXER::IsSymbol( int aTok )
void DSNLEXER::Expecting( int aTok )
{
wxString errText = wxString::Format(
_("Expecting '%s'"), GetChars( GetTokenString( aTok ) ) );
_( "Expecting \"%s\"" ), GetChars( GetTokenString( aTok ) ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}


void DSNLEXER::Expecting( const char* text )
{
wxString errText = wxString::Format(
_("Expecting '%s'"), GetChars( wxString::FromUTF8( text ) ) );
_( "Expecting \"%s\"" ), GetChars( wxString::FromUTF8( text ) ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}


void DSNLEXER::Unexpected( int aTok )
{
wxString errText = wxString::Format(
_("Unexpected '%s'"), GetChars( GetTokenString( aTok ) ) );
_( "Unexpected \"%s\"" ), GetChars( GetTokenString( aTok ) ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}

Expand All @@ -385,7 +385,7 @@ void DSNLEXER::Duplicate( int aTok )
void DSNLEXER::Unexpected( const char* text )
{
wxString errText = wxString::Format(
_("Unexpected '%s'"), GetChars( wxString::FromUTF8( text ) ) );
_( "Unexpected \"%s\"" ), GetChars( wxString::FromUTF8( text ) ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}

Expand Down Expand Up @@ -430,7 +430,7 @@ int DSNLEXER::NeedNUMBER( const char* aExpectation )
if( tok != DSN_NUMBER )
{
wxString errText = wxString::Format(
_("need a NUMBER for '%s'"), wxString::FromUTF8( aExpectation ).GetData() );
_( "need a NUMBER for \"%s\"" ), wxString::FromUTF8( aExpectation ).GetData() );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}
return tok;
Expand Down
4 changes: 2 additions & 2 deletions common/eda_doc.cpp
Expand Up @@ -157,7 +157,7 @@ bool GetAssociatedDocument( wxWindow* aParent,

if( !wxFileExists( fullfilename ) )
{
msg.Printf( _( "Doc File '%s' not found" ), GetChars( aDocName ) );
msg.Printf( _( "Doc File \"%s\" not found" ), GetChars( aDocName ) );
DisplayError( aParent, msg );
return false;
}
Expand Down Expand Up @@ -200,7 +200,7 @@ bool GetAssociatedDocument( wxWindow* aParent,

if( !success )
{
msg.Printf( _( "Unknown MIME type for doc file <%s>" ), GetChars( fullfilename ) );
msg.Printf( _( "Unknown MIME type for doc file \"%s\"" ), GetChars( fullfilename ) );
DisplayError( aParent, msg );
}

Expand Down
2 changes: 1 addition & 1 deletion common/exceptions.cpp
Expand Up @@ -27,7 +27,7 @@


#define THROWERS_WHERE _( "from %s : %s() line:%d" )
#define PARSE_PROBLEM _( "%s in input/source\n'%s'\nline %d, offset %d" )
#define PARSE_PROBLEM _( "%s in input/source\n\"%s\"\nline %d, offset %d" )


const wxString IO_ERROR::What() const
Expand Down
2 changes: 1 addition & 1 deletion common/footprint_info.cpp
Expand Up @@ -61,7 +61,7 @@ FOOTPRINT_INFO* FOOTPRINT_LIST::GetModuleInfo( const wxString& aFootprintName )

wxCHECK_MSG( fpid.Parse( aFootprintName ) < 0, NULL,
wxString::Format(
wxT( "'%s' is not a valid LIB_ID." ), GetChars( aFootprintName ) ) );
wxT( "\"%s\" is not a valid LIB_ID." ), GetChars( aFootprintName ) ) );

wxString libNickname = fpid.GetLibNickname();
wxString footprintName = fpid.GetLibItemName();
Expand Down
6 changes: 3 additions & 3 deletions common/fp_lib_table.cpp
Expand Up @@ -192,7 +192,7 @@ 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 "
_( "Duplicate library nickname \"%s\" found in footprint library "
"table file line %d" ), GetChars( nickname ), lineNum );

if( !errMsg.IsEmpty() )
Expand Down Expand Up @@ -259,7 +259,7 @@ const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname )
if( !row )
{
wxString msg = wxString::Format(
_( "fp-lib-table files contain no library with nickname '%s'" ),
_( "fp-lib-table files contain no library with nickname \"%s\"" ),
GetChars( aNickname ) );

THROW_IO_ERROR( msg );
Expand Down Expand Up @@ -413,7 +413,7 @@ bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable )

if( !fn.DirExists() && !fn.Mkdir( 0x777, wxPATH_MKDIR_FULL ) )
{
THROW_IO_ERROR( wxString::Format( _( "Cannot create global library table path '%s'." ),
THROW_IO_ERROR( wxString::Format( _( "Cannot create global library table path \"%s\"." ),
GetChars( fn.GetPath() ) ) );
}

Expand Down
6 changes: 3 additions & 3 deletions common/gestfich.cpp
Expand Up @@ -230,7 +230,7 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para
#endif

wxString msg;
msg.Printf( _( "Command <%s> could not found" ), GetChars( fullFileName ) );
msg.Printf( _( "Command \"%s\" could not found" ), GetChars( fullFileName ) );
DisplayError( frame, msg, 20 );
return -1;
}
Expand Down Expand Up @@ -374,14 +374,14 @@ bool OpenPDF( const wxString& file )
else
{
wxString msg;
msg.Printf( _( "Problem while running the PDF viewer\nCommand is '%s'" ), command );
msg.Printf( _( "Problem while running the PDF viewer\nCommand is \"%s\"" ), command );
DisplayError( NULL, msg );
}
}
else
{
wxString msg;
msg.Printf( _( "Unable to find a PDF viewer for '%s'" ), file );
msg.Printf( _( "Unable to find a PDF viewer for \"%s\"" ), file );
DisplayError( NULL, msg );
}

Expand Down
6 changes: 3 additions & 3 deletions common/kiway.cpp
Expand Up @@ -183,7 +183,7 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad )
// here and catching it in the KiCad launcher resolves the crash issue. See bug
// report https://bugs.launchpad.net/kicad/+bug/1577786.

msg.Printf( _( "Failed to load kiface library '%s'." ), GetChars( dname ) );
msg.Printf( _( "Failed to load kiface library \"%s\"." ), GetChars( dname ) );
THROW_IO_ERROR( msg );
}
else if( ( addr = dso.GetSymbol( wxT( KIFACE_INSTANCE_NAME_AND_VERSION ) ) ) == NULL )
Expand All @@ -192,7 +192,7 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad )
// No further reporting required here. Assume the same thing applies here as
// above with the Load() call. This has not been tested.
msg.Printf(
_( "Could not read instance name and version symbol form kiface library '%s'." ),
_( "Could not read instance name and version symbol form kiface library \"%s\"." ),
GetChars( dname ) );
THROW_IO_ERROR( msg );
}
Expand Down Expand Up @@ -227,7 +227,7 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad )

msg = wxString::Format( _(
"Fatal Installation Bug. File:\n"
"'%s'\ncould not be loaded\n" ), GetChars( dname ) );
"\"%s\"\ncould not be loaded\n" ), GetChars( dname ) );

if( ! wxFileExists( dname ) )
msg << _( "It is missing.\n" );
Expand Down
4 changes: 2 additions & 2 deletions common/project.cpp
Expand Up @@ -256,7 +256,7 @@ static bool copy_pro_file_template( const SEARCH_STACK& aSearchS, const wxString
if( !templ.IsFileReadable() )
{
wxString msg = wxString::Format( _(
"Unable to find '%s' template config file." ),
"Unable to find \"%s\" template config file." ),
GetChars( templateFile ) );

DisplayErrorMessage( nullptr, _( "Error copying project file template" ), msg );
Expand All @@ -279,7 +279,7 @@ static bool copy_pro_file_template( const SEARCH_STACK& aSearchS, const wxString
success = wxCopyFile( kicad_pro_template, aDestination );
else
{
wxLogMessage( _( "Cannot create prj file '%s' (Directory not writable)" ),
wxLogMessage( _( "Cannot create prj file \"%s\" (Directory not writable)" ),
GetChars( aDestination) );
success = false;
}
Expand Down
6 changes: 3 additions & 3 deletions common/richio.cpp
Expand Up @@ -164,7 +164,7 @@ FILE_LINE_READER::FILE_LINE_READER( const wxString& aFileName,
if( !m_fp )
{
wxString msg = wxString::Format(
_( "Unable to open filename '%s' for reading" ), aFileName.GetData() );
_( "Unable to open filename \"%s\" for reading" ), aFileName.GetData() );
THROW_IO_ERROR( msg );
}

Expand Down Expand Up @@ -524,7 +524,7 @@ FILE_OUTPUTFORMATTER::FILE_OUTPUTFORMATTER( const wxString& aFileName,
if( !m_fp )
{
wxString msg = wxString::Format(
_( "cannot open or save file '%s'" ),
_( "cannot open or save file \"%s\"" ),
m_filename.GetData() );
THROW_IO_ERROR( msg );
}
Expand All @@ -543,7 +543,7 @@ void FILE_OUTPUTFORMATTER::write( const char* aOutBuf, int aCount )
if( 1 != fwrite( aOutBuf, aCount, 1, m_fp ) )
{
wxString msg = wxString::Format(
_( "error writing to file '%s'" ),
_( "error writing to file \"%s\"" ),
m_filename.GetData() );
THROW_IO_ERROR( msg );
}
Expand Down
2 changes: 1 addition & 1 deletion common/tool/tool_manager.cpp
Expand Up @@ -434,7 +434,7 @@ void TOOL_MANAGER::InitTools()
if( !tool->Init() )
{
wxMessageBox(
wxString::Format( "Initialization of tool '%s' failed", tool->GetName() ) );
wxString::Format( "Initialization of tool \"%s\" failed", tool->GetName() ) );

// Unregister the tool
m_toolState.erase( tool );
Expand Down
2 changes: 1 addition & 1 deletion common/widgets/widget_hotkey_list.cpp
Expand Up @@ -481,7 +481,7 @@ bool WIDGET_HOTKEY_LIST::ResolveKeyConflicts( long aKey, const wxString& aSectio
{
wxString info = wxGetTranslation( conflicting_key->m_InfoMsg );
wxString msg = wxString::Format(
_( "<%s> is already assigned to \"%s\" in section \"%s\". Are you sure you want "
_( "\"%s\" is already assigned to \"%s\" in section \"%s\". Are you sure you want "
"to change its assignment?" ),
KeyNameFromKeyCode( aKey ), GetChars( info ),
*(conflicting_section->m_Title) );
Expand Down

0 comments on commit a9ccf11

Please sign in to comment.