diff --git a/common/basicframe.cpp b/common/basicframe.cpp
index 5da0db7756..d7ea5354eb 100644
--- a/common/basicframe.cpp
+++ b/common/basicframe.cpp
@@ -388,7 +388,8 @@ void EDA_BASE_FRAME::OnSelectPreferredEditor( wxCommandEvent& event )
wildcard += wxT( ".exe" );
#endif
- wildcard = _( "Executable file (" ) + wildcard + wxT( ")|" ) + wildcard;
+ wildcard.Printf( _( "Executable file (%s)|%s" ),
+ GetChars( wildcard ), GetChars( wildcard ) );
wxFileDialog dlg( this, _( "Select Preferred Editor" ), fn.GetPath(),
fn.GetFullName(), wildcard,
@@ -644,7 +645,8 @@ edits you made?" ),
// Rename the old file to the backup file name.
if( !wxRenameFile( aFileName.GetFullPath(), backupFileName.GetFullPath() ) )
{
- msg = _( "Could not create backup file " ) + backupFileName.GetFullPath();
+ msg.Printf( _( "Could not create backup file <%s>" ),
+ GetChars( backupFileName.GetFullPath() ) );
wxMessageBox( msg );
}
}
diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp
index a183d52698..20aca80eb9 100644
--- a/common/dialogs/dialog_page_settings.cpp
+++ b/common/dialogs/dialog_page_settings.cpp
@@ -63,9 +63,9 @@ const wxString pageFmts[] =
_("C 17x22in"),
_("D 22x34in"),
_("E 34x44in"),
- _("USLetter 8.5x11in"),
- _("USLegal 8.5x14in"),
- _("USLedger 11x17in"),
+ _("US Letter 8.5x11in"),
+ _("US Legal 8.5x14in"),
+ _("US Ledger 11x17in"),
_("User (Custom)"),
wxT("") // end of list
};
diff --git a/common/dsnlexer.cpp b/common/dsnlexer.cpp
index 9efadcecca..00e9fad992 100644
--- a/common/dsnlexer.cpp
+++ b/common/dsnlexer.cpp
@@ -280,24 +280,25 @@ bool DSNLEXER::IsSymbol( int aTok )
void DSNLEXER::Expecting( int aTok ) throw( IO_ERROR )
{
- wxString errText( _("Expecting") );
- errText << wxT(" ") << GetTokenString( aTok );
+ wxString errText;
+ errText.Printf( _("Expecting %s"), GetChars( GetTokenString( aTok ) ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}
void DSNLEXER::Expecting( const char* text ) throw( IO_ERROR )
{
- wxString errText( _("Expecting") );
- errText << wxT(" '") << wxString::FromUTF8( text ) << wxT("'");
+ wxString errText;
+ errText.Printf( _("Expecting '%s'"),
+ GetChars( wxString::FromUTF8( text ) ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}
void DSNLEXER::Unexpected( int aTok ) throw( IO_ERROR )
{
- wxString errText( _("Unexpected") );
- errText << wxT(" ") << GetTokenString( aTok );
+ wxString errText;
+ errText.Printf( _("Unexpected %s"), GetChars( GetTokenString( aTok ) ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}
@@ -312,8 +313,9 @@ void DSNLEXER::Duplicate( int aTok ) throw( IO_ERROR )
void DSNLEXER::Unexpected( const char* text ) throw( IO_ERROR )
{
- wxString errText( _("Unexpected") );
- errText << wxT(" '") << wxString::FromUTF8( text ) << wxT("'");
+ wxString errText;
+ errText.Printf( _("Unexpected '%s'"),
+ GetChars( wxString::FromUTF8( text ) ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}
diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp
index 4082634b36..495359cf06 100644
--- a/common/eda_doc.cpp
+++ b/common/eda_doc.cpp
@@ -122,8 +122,7 @@ bool GetAssociatedDocument( wxFrame* aFrame,
if( !wxFileExists( fullfilename ) )
{
- msg = _( "Doc File " );
- msg << wxT("\"") << aDocName << wxT("\"") << _( " not found" );
+ msg.Printf( _( "Doc File <%s> not found" ), GetChars( aDocName ) );
DisplayError( aFrame, msg );
return false;
}
diff --git a/common/gestfich.cpp b/common/gestfich.cpp
index 0fb679615b..900b5b10a9 100644
--- a/common/gestfich.cpp
+++ b/common/gestfich.cpp
@@ -652,15 +652,16 @@ bool OpenPDF( const wxString& file )
if( !success )
{
- wxString msg = _( "Problem while running the PDF viewer" );
- msg << _( "\n command is " ) << command;
+ wxString msg;
+ msg.Printf( _( "Problem while running the PDF viewer\nCommand is '%s'" ),
+ GetChars( command ) );
DisplayError( NULL, msg );
}
}
else
{
- wxString msg = _( "Unable to find a PDF viewer for" );
- msg << wxT( " " ) << filename;
+ wxString msg;
+ msg.Printf( _( "Unable to find a PDF viewer for <%s>" ), GetChars( filename ) );
DisplayError( NULL, msg );
success = false;
}
diff --git a/common/wxwineda.cpp b/common/wxwineda.cpp
index 4a92cc1b7a..f68fe9a19c 100644
--- a/common/wxwineda.cpp
+++ b/common/wxwineda.cpp
@@ -57,7 +57,8 @@ EDA_GRAPHIC_TEXT_CTRL::EDA_GRAPHIC_TEXT_CTRL( wxWindow* parent,
if( !Title.IsEmpty() )
{
- wxString msg = _( "Size" ) + ReturnUnitSymbol( m_UserUnit );
+ wxString msg;
+ msg.Printf( _( "Size%s" ), GetChars( ReturnUnitSymbol( m_UserUnit ) ) );
wxStaticText* text = new wxStaticText( parent, -1, msg );
BoxSizer->Add( text, 0, wxGROW | wxLEFT | wxRIGHT, 5 );
diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp
index 06b2367234..b556d198e5 100644
--- a/cvpcb/cvpcb.cpp
+++ b/cvpcb/cvpcb.cpp
@@ -27,7 +27,6 @@ const wxString RetroFileExtension( wxT( "stf" ) );
const wxString FootprintAliasFileExtension( wxT( "equ" ) );
// Wildcard for schematic retroannotation (import footprint names in schematic):
-const wxString RetroFileWildcard( _( "KiCad retroannotation files (*.stf)|*.stf" ) );
const wxString FootprintAliasFileWildcard( _( "KiCad footprint alias files (*.equ)|*.equ" ) );
const wxString titleLibLoadError( _( "Library Load Error" ) );
diff --git a/cvpcb/dialogs/dialog_cvpcb_config.cpp b/cvpcb/dialogs/dialog_cvpcb_config.cpp
index 7ffa02d5cc..b9ca3946c7 100644
--- a/cvpcb/dialogs/dialog_cvpcb_config.cpp
+++ b/cvpcb/dialogs/dialog_cvpcb_config.cpp
@@ -54,7 +54,7 @@ DIALOG_CVPCB_CONFIG::DIALOG_CVPCB_CONFIG( CVPCB_MAINFRAME* parent ) :
m_Config = wxGetApp().GetCommonSettings();
Init( );
- title = _( "Project file: " ) + fn.GetFullPath();
+ title.Format( _( "Project file: <%s>" ), GetChars( fn.GetFullPath() ) );
SetTitle( title );
if( GetSizer() )
diff --git a/cvpcb/setvisu.cpp b/cvpcb/setvisu.cpp
index 02ef50df1a..e1196ec57d 100644
--- a/cvpcb/setvisu.cpp
+++ b/cvpcb/setvisu.cpp
@@ -60,15 +60,16 @@ void DISPLAY_FOOTPRINTS_FRAME::InitDisplay()
if( !footprintName.IsEmpty() )
{
- msg = _( "Footprint: " ) + footprintName;
+ msg.Printf( _( "Footprint: %s" ), GetChars( footprintName ) );
SetTitle( msg );
FOOTPRINT_INFO* module_info = parentframe->m_footprints.GetModuleInfo( footprintName );
- msg = _( "Lib: " );
+ const wxChar *libname;
if( module_info )
- msg += module_info->m_LibName;
+ libname = GetChars( module_info->m_LibName );
else
- msg += wxT( "???" );
+ libname = GetChars( wxT( "???" ) );
+ msg.Printf( _( "Lib: %s" ), libname );
SetStatusText( msg, 0 );
diff --git a/eeschema/component_references_lister.cpp b/eeschema/component_references_lister.cpp
index 54d64a6455..a6c92abe5f 100644
--- a/eeschema/component_references_lister.cpp
+++ b/eeschema/component_references_lister.cpp
@@ -708,14 +708,20 @@ int SCH_REFERENCE_LIST::CheckAnnotation( wxArrayString* aMessageList )
else
tmp = wxT( "?" );
- msg.Printf( _( "Item not annotated: %s%s" ),
- GetChars( componentFlatList[ii].GetRef() ), GetChars( tmp ) );
if( ( componentFlatList[ii].m_Unit > 0 )
&& ( componentFlatList[ii].m_Unit < 0x7FFFFFFF ) )
{
- tmp.Printf( _( " (unit %d)" ), componentFlatList[ii].m_Unit );
- msg << tmp;
+ msg.Printf( _( "Item not annotated: %s%s (unit %d)\n" ),
+ GetChars( componentFlatList[ii].GetRef() ),
+ GetChars( tmp ),
+ componentFlatList[ii].m_Unit );
+ }
+ else
+ {
+ msg.Printf( _( "Item not annotated: %s%s\n" ),
+ GetChars( componentFlatList[ii].GetRef() ),
+ GetChars( tmp ) );
}
if( aMessageList )
@@ -736,16 +742,14 @@ int SCH_REFERENCE_LIST::CheckAnnotation( wxArrayString* aMessageList )
else
tmp = wxT( "?" );
- msg.Printf( _( "Error item %s%s" ), GetChars( componentFlatList[ii].GetRef() ),
- GetChars( tmp ) );
-
- tmp.Printf( _( " unit %d and no more than %d parts" ),
+ msg.Printf( _( "Error item %s%s unit %d and no more than %d parts\n" ),
+ GetChars( componentFlatList[ii].GetRef() ),
+ GetChars( tmp ),
componentFlatList[ii].m_Unit,
componentFlatList[ii].GetLibComponent()->GetPartCount() );
- msg << tmp;
if( aMessageList )
- aMessageList->Add( msg + wxT( "\n" ) );
+ aMessageList->Add( msg );
error++;
break;
@@ -775,18 +779,23 @@ int SCH_REFERENCE_LIST::CheckAnnotation( wxArrayString* aMessageList )
else
tmp = wxT( "?" );
- msg.Printf( _( "Multiple item %s%s" ),
- GetChars( componentFlatList[ii].GetRef() ), GetChars( tmp ) );
-
- if( ( componentFlatList[ii].m_Unit > 0 )
- && ( componentFlatList[ii].m_Unit < 0x7FFFFFFF ) )
+ if( ( componentFlatList[ii].m_Unit > 0 )
+ && ( componentFlatList[ii].m_Unit < 0x7FFFFFFF ) )
{
- tmp.Printf( _( " (unit %d)" ), componentFlatList[ii].m_Unit );
- msg << tmp;
+ msg.Printf( _( "Multiple item %s%s (unit %d)\n" ),
+ GetChars( componentFlatList[ii].GetRef() ),
+ GetChars( tmp ),
+ componentFlatList[ii].m_Unit );
+ }
+ else
+ {
+ msg.Printf( _( "Multiple item %s%s\n" ),
+ GetChars( componentFlatList[ii].GetRef() ),
+ GetChars( tmp ) );
}
if( aMessageList )
- aMessageList->Add( msg + wxT( "\n" ) );
+ aMessageList->Add( msg );
error++;
continue;
@@ -802,18 +811,23 @@ int SCH_REFERENCE_LIST::CheckAnnotation( wxArrayString* aMessageList )
else
tmp = wxT( "?" );
- msg.Printf( _( "Multiple item %s%s" ),
- GetChars( componentFlatList[ii].GetRef() ), GetChars( tmp ) );
-
- if( ( componentFlatList[ii].m_Unit > 0 )
- && ( componentFlatList[ii].m_Unit < 0x7FFFFFFF ) )
+ if( ( componentFlatList[ii].m_Unit > 0 )
+ && ( componentFlatList[ii].m_Unit < 0x7FFFFFFF ) )
{
- tmp.Printf( _( " (unit %d)" ), componentFlatList[ii].m_Unit );
- msg << tmp;
+ msg.Printf( _( "Multiple item %s%s (unit %d)\n" ),
+ GetChars( componentFlatList[ii].GetRef() ),
+ GetChars( tmp ),
+ componentFlatList[ii].m_Unit );
+ }
+ else
+ {
+ msg.Printf( _( "Multiple item %s%s\n" ),
+ GetChars( componentFlatList[ii].GetRef() ),
+ GetChars( tmp ) );
}
if( aMessageList )
- aMessageList->Add( msg + wxT( "\n" ));
+ aMessageList->Add( msg );
error++;
}
diff --git a/eeschema/database.cpp b/eeschema/database.cpp
index 8058f17431..6aca6f8793 100644
--- a/eeschema/database.cpp
+++ b/eeschema/database.cpp
@@ -56,18 +56,31 @@ wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufNa
if( nameList.empty() )
{
- msg = _( "No components found matching " );
-
- if( !BufName.IsEmpty() )
+ if( !BufName.IsEmpty() )
{
- msg += _( "name search criteria <" ) + BufName + wxT( "> " );
-
- if( !Keys.IsEmpty() )
- msg += _( "and " );
+ if( !Keys.IsEmpty() )
+ {
+ msg.Printf( _( "No components found matching name search criteria '%s' and key search criteria '%s'" ),
+ GetChars( BufName ), GetChars( Keys ) );
+ }
+ else
+ {
+ msg.Printf( _( "No components found matching name search criteria '%s'" ),
+ GetChars( BufName ) );
+ }
+ }
+ else
+ {
+ if( !Keys.IsEmpty() )
+ {
+ msg.Printf( _( "No components found matching key search criteria '%s'" ),
+ GetChars( Keys ) );
+ }
+ else
+ {
+ msg = _( "No components found matching" );
+ }
}
-
- if( !Keys.IsEmpty() )
- msg += _( "key search criteria <" ) + Keys + wxT( "> " );
DisplayInfoMessage( frame, msg );
diff --git a/eeschema/dialogs/annotate_dialog.cpp b/eeschema/dialogs/annotate_dialog.cpp
index 8d2fc2ade2..c463e11009 100644
--- a/eeschema/dialogs/annotate_dialog.cpp
+++ b/eeschema/dialogs/annotate_dialog.cpp
@@ -132,16 +132,19 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event )
if( GetResetItems() )
{
- message = _( "Clear and annotate all of the components " );
+ if( GetLevel() )
+ message += _( "Clear and annotate all of the components on the entire schematic?" );
+ else
+ message += _( "Clear and annotate all of the components on the current sheet?" );
promptUser = true;
}
else
- message = _( "Annotate only the unannotated components " );
-
- if( GetLevel() )
- message += _( "on the entire schematic?" );
- else
- message += _( "on the current sheet?" );
+ {
+ if( GetLevel() )
+ message += _( "Annotate only the unannotated components on the entire schematic?" );
+ else
+ message += _( "Annotate only the unannotated components on the current sheet?" );
+ }
message += _( "\n\nThis operation will change the current annotation and cannot be undone." );
@@ -179,11 +182,11 @@ void DIALOG_ANNOTATE::OnClearAnnotationCmpClick( wxCommandEvent& event )
{
int response;
- wxString message = _( "Clear the existing annotation for " );
+ wxString message;
if( GetLevel() )
- message += _( "the entire schematic?" );
+ message = _( "Clear the existing annotation for the entire schematic?" );
else
- message += _( "the current sheet?" );
+ message = _( "Clear the existing annotation for the current sheet?" );
message += _( "\n\nThis operation will clear the existing annotation and cannot be undone." );
response = wxMessageBox( message, wxT( "" ), wxICON_EXCLAMATION | wxOK | wxCANCEL );
diff --git a/eeschema/dialogs/dialog_build_BOM.cpp b/eeschema/dialogs/dialog_build_BOM.cpp
index eac045fc38..95c01afe22 100644
--- a/eeschema/dialogs/dialog_build_BOM.cpp
+++ b/eeschema/dialogs/dialog_build_BOM.cpp
@@ -472,7 +472,7 @@ void DIALOG_BUILD_BOM::CreateSpreadSheetPartsShortList( )
if( ( f = wxFopen( m_listFileName, wxT( "wt" ) ) ) == NULL )
{
wxString msg;
- msg.Printf( _( "Failed to open file '%s'" ), GetChars(m_listFileName) );
+ msg.Printf( _( "Failed to open file <%s>" ), GetChars(m_listFileName) );
DisplayError( this, msg );
return;
}
@@ -509,8 +509,7 @@ void DIALOG_BUILD_BOM::CreateSpreadSheetPartsFullList( bool aIncludeSubComponent
if( ( f = wxFopen( m_listFileName, wxT( "wt" ) ) ) == NULL )
{
- msg = _( "Failed to open file " );
- msg << m_listFileName;
+ msg.Printf( _( "Failed to open file <%s>" ), GetChars( m_listFileName ) );
DisplayError( this, msg );
return;
}
@@ -553,8 +552,7 @@ void DIALOG_BUILD_BOM::CreatePartsAndLabelsFullList( bool aIncludeSubComponents
if( ( f = wxFopen( m_listFileName, wxT( "wt" ) ) ) == NULL )
{
- msg = _( "Failed to open file " );
- msg << m_listFileName;
+ msg.Printf( _( "Failed to open file <%s>" ), GetChars( m_listFileName ) );
DisplayError( this, msg );
return;
}
diff --git a/eeschema/dialogs/dialog_edit_component_in_lib.cpp b/eeschema/dialogs/dialog_edit_component_in_lib.cpp
index 0bb2726259..8b5ba1de76 100644
--- a/eeschema/dialogs/dialog_edit_component_in_lib.cpp
+++ b/eeschema/dialogs/dialog_edit_component_in_lib.cpp
@@ -49,18 +49,17 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::initDlg()
return;
}
- wxString title = _( "Properties for " );
-
+ wxString title;
bool isRoot = m_Parent->GetAliasName().CmpNoCase( component->GetName() ) == 0;
if( !isRoot )
{
- title += m_Parent->GetAliasName() + _( " (alias of " ) + component->GetName() + wxT( ")" );
+ title.Printf( _( "Properties for %s (alias of %s)" ),
+ GetChars( m_Parent->GetAliasName() ),
+ GetChars( component->GetName() ) );
}
else
- {
- title += component->GetName();
- }
+ title.Printf( _( "Properties for %s" ), GetChars( component->GetName() ) );
SetTitle( title );
InitPanelDoc();
@@ -453,7 +452,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile( wxCommandEvent& e
void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAllFootprintFilter( wxCommandEvent& event )
{
- if( IsOK( this, _( "Ok to Delete FootprintFilter LIST" ) ) )
+ if( IsOK( this, _( "OK to Delete FootprintFilter LIST" ) ) )
{
m_FootprintFilterListBox->Clear();
m_ButtonDeleteAllFootprintFilter->Enable( false );
diff --git a/eeschema/dialogs/dialog_edit_label.cpp b/eeschema/dialogs/dialog_edit_label.cpp
index 70424476a2..edc191d350 100644
--- a/eeschema/dialogs/dialog_edit_label.cpp
+++ b/eeschema/dialogs/dialog_edit_label.cpp
@@ -194,7 +194,7 @@ void DIALOG_LABEL_EDITOR::InitDialog()
m_TextStyle->SetSelection( style );
wxString units = ReturnUnitSymbol( g_UserUnit, wxT( "(%s)" ) );
- msg = _( "H" ) + units + _( " x W" ) + units;
+ msg.Printf( _( "H%s x W%s" ), GetChars( units ), GetChars( units ) );
m_staticSizeUnits->SetLabel( msg );
msg = ReturnStringFromValue( g_UserUnit, m_CurrentText->GetSize().x );
diff --git a/eeschema/dialogs/dialog_eeschema_config.cpp b/eeschema/dialogs/dialog_eeschema_config.cpp
index 0e4751d171..b8994c03a5 100644
--- a/eeschema/dialogs/dialog_eeschema_config.cpp
+++ b/eeschema/dialogs/dialog_eeschema_config.cpp
@@ -54,7 +54,7 @@ DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG( SCH_EDIT_FRAME* aSchFrame,
Init();
- msg = _( "from " ) + wxGetApp().GetCurrentOptionFile();
+ msg.Printf( _( "from <%s>" ), GetChars( wxGetApp().GetCurrentOptionFile() ) );
SetTitle( msg );
if( GetSizer() )
diff --git a/eeschema/eelibs_read_libraryfiles.cpp b/eeschema/eelibs_read_libraryfiles.cpp
index 05ab46c11f..5d623767ed 100644
--- a/eeschema/eelibs_read_libraryfiles.cpp
+++ b/eeschema/eelibs_read_libraryfiles.cpp
@@ -68,12 +68,11 @@ void SCH_EDIT_FRAME::LoadLibraries( void )
}
// Loaded library statusbar message
- msg = _( "Library " ) + tmp;
fn = tmp;
if( CMP_LIBRARY::AddLibrary( fn, errMsg ) )
{
- msg += _( " loaded" );
+ msg.Printf( _( "Library <%s> loaded" ), GetChars( tmp ) );
sortOrder.Add( fn.GetName() );
}
else
@@ -84,7 +83,7 @@ void SCH_EDIT_FRAME::LoadLibraries( void )
GetChars( fn.GetFullPath() ),
GetChars( errMsg ) );
DisplayError( this, prompt );
- msg += _( " error!" );
+ msg.Printf( _( "Library <%s> error!" ), GetChars( tmp ) );
}
PrintMsg( msg );
diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp
index c282cca629..46263035c2 100644
--- a/eeschema/files-io.cpp
+++ b/eeschema/files-io.cpp
@@ -336,7 +336,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& aFileName, bool aIsNew )
}
// Reloading configuration.
- msg = _( "Ready\nWorking dir: \n" ) + wxGetCwd();
+ msg.Printf( _( "Ready\nWorking dir: <%s>\n" ), GetChars( wxGetCwd() ) );
PrintMsg( msg );
LoadProjectFile( wxEmptyString, false );
diff --git a/eeschema/find.cpp b/eeschema/find.cpp
index b77390f734..845eb4ec74 100644
--- a/eeschema/find.cpp
+++ b/eeschema/find.cpp
@@ -122,7 +122,6 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
wxPoint pos, curpos;
bool centerAndRedraw = false;
bool notFound = true;
- wxString msg;
LIB_PIN* pin;
SCH_SHEET_LIST sheetList;
@@ -236,28 +235,29 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
/* Print diag */
wxString msg_item;
- msg = aReference;
+ wxString msg;
switch( aSearchType )
{
default:
case FIND_COMPONENT_ONLY: // Find component only
+ msg_item = _( "component" );
break;
case FIND_PIN: // find a pin
- msg_item = _( "Pin " ) + aSearchText;
+ msg_item.Printf( _( "pin %s" ), GetChars( aSearchText ) );
break;
case FIND_REFERENCE: // find reference
- msg_item = _( "Ref " ) + aSearchText;
+ msg_item.Printf( _( "reference %s" ), GetChars( aSearchText ) );
break;
case FIND_VALUE: // find value
- msg_item = _( "Value " ) + aSearchText;
+ msg_item.Printf( _( "value " ), GetChars( aSearchText ) );
break;
case FIND_FIELD: // find field. todo
- msg_item = _( "Field " ) + aSearchText;
+ msg_item.Printf( _( "field " ), GetChars( aSearchText ) );
break;
}
@@ -265,27 +265,19 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
{
if( !notFound )
{
- if( !msg_item.IsEmpty() )
- msg += wxT( " " ) + msg_item;
-
- msg += _( " found" );
+ msg.Printf( _( "%s %s found" ),
+ GetChars( aReference ), GetChars( msg_item ) );
}
else
{
- msg += _( " found" );
-
- if( !msg_item.IsEmpty() )
- {
- msg += wxT( " but " ) + msg_item + _( " not found" );
- }
+ msg.Printf( _( "%s found but %s not found" ),
+ GetChars( aReference ), GetChars( msg_item ) );
}
}
else
{
- if( !msg_item.IsEmpty() )
- msg += wxT( " " ) + msg_item;
-
- msg += _( " not found" );
+ msg.Printf( _( "Component %s not found" ),
+ GetChars( aReference ) );
}
SetStatusText( msg );
diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp
index 327a11ccea..3f651f5cce 100644
--- a/eeschema/getpart.cpp
+++ b/eeschema/getpart.cpp
@@ -117,8 +117,8 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname,
}
}
- /* Ask for a component name or key words */
- msg.Printf( _( "component selection (%d items loaded):" ), CmpCount );
+ // Ask for a component name or key words
+ msg.Printf( _( "Component selection (%d items loaded):" ), CmpCount );
DIALOG_GET_COMPONENT dlg( this, aHistoryList, msg, aUseLibBrowser );
diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp
index bc219fbb42..38e8d97549 100644
--- a/eeschema/lib_arc.cpp
+++ b/eeschema/lib_arc.cpp
@@ -131,7 +131,7 @@ bool LIB_ARC::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
&m_Convert, &m_Width, tmp, &startx, &starty, &endx, &endy );
if( cnt < 8 )
{
- aErrorMsg.Printf( _( "arc only had %d parameters of the required 8" ), cnt );
+ aErrorMsg.Printf( _( "Arc only had %d parameters of the required 8" ), cnt );
return false;
}
diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp
index eba6999410..72ed65b853 100644
--- a/eeschema/lib_circle.cpp
+++ b/eeschema/lib_circle.cpp
@@ -74,7 +74,7 @@ bool LIB_CIRCLE::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
if( cnt < 6 )
{
- aErrorMsg.Printf( _( "circle only had %d parameters of the required 6" ), cnt );
+ aErrorMsg.Printf( _( "Circle only had %d parameters of the required 6" ), cnt );
return false;
}
diff --git a/eeschema/lib_export.cpp b/eeschema/lib_export.cpp
index c81695e6cf..b32980b330 100644
--- a/eeschema/lib_export.cpp
+++ b/eeschema/lib_export.cpp
@@ -149,19 +149,19 @@ void LIB_EDIT_FRAME::OnExportPart( wxCommandEvent& event )
{
if( createLib )
{
- msg = fn.GetFullPath() + _( " - OK" );
+ msg.Printf( _( "<%s> - OK" ), GetChars( fn.GetFullPath() ) );
DisplayInfoMessage( this, _( "This library will not be available \
until it is loaded by Eeschema.\n\nModify the Eeschema library configuration \
if you want to include it as part of this project." ) );
}
else
{
- msg = fn.GetFullPath() + _( " - Export OK" );
+ msg.Printf( _( "<%s> - Export OK" ), GetChars( fn.GetFullPath() ) );
}
} // Error
else
{
- msg = _( "Error creating " ) + fn.GetFullName();
+ msg.Printf( _( "Error creating <%s>" ), GetChars( fn.GetFullName() ) );
}
SetStatusText( msg );
diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp
index 86807d6b97..27c5f4b4bf 100644
--- a/eeschema/lib_polyline.cpp
+++ b/eeschema/lib_polyline.cpp
@@ -85,13 +85,13 @@ bool LIB_POLYLINE::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
if( i < 4 )
{
- aErrorMsg.Printf( _( "polyline only had %d parameters of the required 4" ), i );
+ aErrorMsg.Printf( _( "Polyline only had %d parameters of the required 4" ), i );
return false;
}
if( ccount <= 0 )
{
- aErrorMsg.Printf( _( "polyline count parameter %d is invalid" ), ccount );
+ aErrorMsg.Printf( _( "Polyline count parameter %d is invalid" ), ccount );
return false;
}
@@ -107,7 +107,7 @@ bool LIB_POLYLINE::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
if( p == NULL || sscanf( p, "%d", &pt.x ) != 1 )
{
- aErrorMsg.Printf( _( "polyline point %d X position not defined" ), i );
+ aErrorMsg.Printf( _( "Polyline point %d X position not defined" ), i );
return false;
}
@@ -115,7 +115,7 @@ bool LIB_POLYLINE::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
if( p == NULL || sscanf( p, "%d", &pt.y ) != 1 )
{
- aErrorMsg.Printf( _( "polyline point %d Y position not defined" ), i );
+ aErrorMsg.Printf( _( "Polyline point %d Y position not defined" ), i );
return false;
}
diff --git a/eeschema/lib_rectangle.cpp b/eeschema/lib_rectangle.cpp
index 5ac99ba5a2..508e49ff42 100644
--- a/eeschema/lib_rectangle.cpp
+++ b/eeschema/lib_rectangle.cpp
@@ -76,7 +76,7 @@ bool LIB_RECTANGLE::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
if( cnt < 7 )
{
- aErrorMsg.Printf( _( "rectangle only had %d parameters of the required 7" ), cnt );
+ aErrorMsg.Printf( _( "Rectangle only had %d parameters of the required 7" ), cnt );
return false;
}
diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp
index 320119c09a..7964844b47 100644
--- a/eeschema/lib_text.cpp
+++ b/eeschema/lib_text.cpp
@@ -130,7 +130,7 @@ bool LIB_TEXT::Load( LINE_READER& aLineReader, wxString& errorMsg )
if( cnt < 8 )
{
- errorMsg.Printf( _( "text only had %d parameters of the required 8" ), cnt );
+ errorMsg.Printf( _( "Text only had %d parameters of the required 8" ), cnt );
return false;
}
diff --git a/eeschema/libarch.cpp b/eeschema/libarch.cpp
index 896b4736f6..05ebc3731a 100644
--- a/eeschema/libarch.cpp
+++ b/eeschema/libarch.cpp
@@ -102,7 +102,8 @@ bool SCH_EDIT_FRAME::CreateArchiveLibrary( const wxString& aFileName )
}
catch( ... /* IO_ERROR ioe */ )
{
- msg = wxT( "Failed to create component library file " ) + aFileName;
+ msg.Printf( _( "Failed to create component library file <%s>" ),
+ GetChars( aFileName ) );
DisplayError( this, msg );
return false;
}
diff --git a/eeschema/libedit.cpp b/eeschema/libedit.cpp
index 7ec6f1351f..8f761b5104 100644
--- a/eeschema/libedit.cpp
+++ b/eeschema/libedit.cpp
@@ -170,7 +170,7 @@ void LIB_EDIT_FRAME::LoadOneLibraryPart( wxCommandEvent& event )
if( libEntry == NULL )
{
- msg.Printf( _( "Component name \"%s\" not found in library \"%s\"." ),
+ msg.Printf( _( "Component name %s not found in library %s" ),
GetChars( CmpName ),
GetChars( searchLib->GetName() ) );
DisplayError( this, msg );
@@ -337,7 +337,8 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile )
{
fn = wxFileName( m_library->GetFullFileName() );
- msg = _( "Modify library file \"" ) + fn.GetFullPath() + _( "\"?" );
+ msg.Printf( _( "Modify library file <%s> ?" ),
+ GetChars( fn.GetFullPath() ) );
if( !IsOK( this, msg ) )
return false;
@@ -374,7 +375,8 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile )
if( !m_library->Save( libFormatter ) )
{
- msg = _( "Error occurred while saving library file \"" ) + fn.GetFullPath() + _( "\"." );
+ msg.Printf( _( "Error occurred while saving library file <%s>" ),
+ GetChars( fn.GetFullPath() ) );
AppendMsgPanel( _( "*** ERROR: ***" ), msg, RED );
DisplayError( this, msg );
return false;
@@ -383,7 +385,8 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile )
catch( ... /* IO_ERROR ioe */ )
{
libFileName.MakeAbsolute();
- msg = wxT( "Failed to create component library file " ) + libFileName.GetFullPath();
+ msg.Printf( _( "Failed to create component library file <%s>" ),
+ GetChars( libFileName.GetFullPath() ) );
DisplayError( this, msg );
return false;
}
@@ -413,8 +416,8 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile )
if( !m_library->SaveDocs( docFormatter ) )
{
- msg = _( "Error occurred while saving library document file \"" ) +
- docFileName.GetFullPath() + _( "\"." );
+ msg.Printf( _( "Error occurred while saving library documentation file <%s>" ),
+ GetChars( docFileName.GetFullPath() ) );
AppendMsgPanel( _( "*** ERROR: ***" ), msg, RED );
DisplayError( this, msg );
return false;
@@ -423,15 +426,16 @@ bool LIB_EDIT_FRAME::SaveActiveLibrary( bool newFile )
catch( ... /* IO_ERROR ioe */ )
{
docFileName.MakeAbsolute();
- msg = wxT( "Failed to create component document library file " ) +
- docFileName.GetFullPath();
+ msg.Printf( _( "Failed to create component document library file <%s>" ),
+ GetChars( docFileName.GetFullPath() ) );
DisplayError( this, msg );
return false;
}
- msg = _( "Library file \"" ) + fn.GetFullName() + wxT( "\" Ok" );
+ msg.Printf( _( "Library file <%s> OK" ), GetChars( fn.GetFullName() ) );
fn.SetExt( DOC_EXT );
- wxString msg1 = _( "Document file \"" ) + fn.GetFullPath() + wxT( "\" Ok" );
+ wxString msg1;
+ msg1.Printf( _( "Documentation file <%s> OK" ), GetChars( fn.GetFullPath() ) );
AppendMsgPanel( msg, msg1, BLUE );
return true;
@@ -539,7 +543,7 @@ void LIB_EDIT_FRAME::DeleteOnePart( wxCommandEvent& event )
return;
}
- msg.Printf( _( "Delete component \"%s\" from library \"%s\"?" ),
+ msg.Printf( _( "Delete component %s from library %s?" ),
GetChars( LibEntry->GetName() ),
GetChars( m_library->GetName() ) );
@@ -615,7 +619,7 @@ lost!\n\nClear the current component from the screen?" ) ) )
if( m_library && m_library->FindEntry( name ) )
{
wxString msg;
- msg.Printf( _( "Component \"%s\" already exists in library \"%s\"." ),
+ msg.Printf( _( "Component %s already exists in library %s" ),
GetChars( name ),
GetChars( m_library->GetName() ) );
DisplayError( this, msg );
@@ -704,7 +708,7 @@ void LIB_EDIT_FRAME::SaveOnePartInMemory()
if( oldComponent != NULL )
{
- msg.Printf( _( "Component \"%s\" already exists. Change it?" ),
+ msg.Printf( _( "Component %s already exists. Change it?" ),
GetChars( m_component->GetName() ) );
if( !IsOK( this, msg ) )
diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp
index 21f8d4716f..acee6deba3 100644
--- a/eeschema/libeditframe.cpp
+++ b/eeschema/libeditframe.cpp
@@ -369,7 +369,7 @@ void LIB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
if( lib.IsModified() )
{
wxString msg;
- msg.Printf( _( "Library \"%s\" was modified!\nDiscard changes?" ),
+ msg.Printf( _( "Library %s was modified!\nDiscard changes?" ),
GetChars( lib.GetName() ) );
if( !IsOK( this, msg ) )
diff --git a/eeschema/load_one_schematic_file.cpp b/eeschema/load_one_schematic_file.cpp
index 6d0d5528c0..f75c81ab7b 100644
--- a/eeschema/load_one_schematic_file.cpp
+++ b/eeschema/load_one_schematic_file.cpp
@@ -86,7 +86,7 @@ bool SCH_EDIT_FRAME::LoadOneEEFile( SCH_SCREEN* aScreen, const wxString& aFullFi
if( ( f = wxFopen( fname, wxT( "rt" ) ) ) == NULL )
{
- msgDiag = _( "Failed to open " ) + aFullFileName;
+ msgDiag.Printf( _( "Failed to open <%s>" ), GetChars( aFullFileName ) );
DisplayError( this, msgDiag );
return false;
}
@@ -94,14 +94,14 @@ bool SCH_EDIT_FRAME::LoadOneEEFile( SCH_SCREEN* aScreen, const wxString& aFullFi
// reader now owns the open FILE.
FILE_LINE_READER reader( f, aFullFileName );
- msgDiag = _( "Loading " ) + aScreen->GetFileName();
+ msgDiag.Printf( _( "Loading <%s>" ), GetChars( aScreen->GetFileName() ) );
PrintMsg( msgDiag );
if( !reader.ReadLine()
|| strncmp( (char*)reader + 9, SCHEMATIC_HEAD_STRING,
sizeof( SCHEMATIC_HEAD_STRING ) - 1 ) != 0 )
{
- msgDiag = aFullFileName + _( " is NOT an Eeschema file!" );
+ msgDiag.Printf( _( "<%s> is NOT an Eeschema file!" ), GetChars( aFullFileName ) );
DisplayError( this, msgDiag );
return false;
}
@@ -119,8 +119,9 @@ bool SCH_EDIT_FRAME::LoadOneEEFile( SCH_SCREEN* aScreen, const wxString& aFullFi
if( version > EESCHEMA_VERSION )
{
- msgDiag = aFullFileName + _( " was created by a more recent \
-version of Eeschema and may not load correctly. Please consider updating!" );
+ msgDiag.Printf( _( "<%s> was created by a more recent \
+version of Eeschema and may not load correctly. Please consider updating!" ),
+ GetChars( aFullFileName ) );
DisplayInfoMessage( this, msgDiag );
}
@@ -138,7 +139,7 @@ again." );
if( !reader.ReadLine() || strncmp( reader, "LIBS:", 5 ) != 0 )
{
- msgDiag = aFullFileName + _( " is NOT an Eeschema file!" );
+ msgDiag.Printf( _( "<%s> is NOT an Eeschema file!" ), GetChars( aFullFileName ) );
DisplayError( this, msgDiag );
return false;
}
@@ -252,7 +253,7 @@ again." );
aScreen->TestDanglingEnds();
- msgDiag = _( "Done Loading " ) + aScreen->GetFileName();
+ msgDiag.Printf( _( "Done Loading <%s>" ), GetChars( aScreen->GetFileName() ) );
PrintMsg( msgDiag );
return true; // Although it may be that file is only partially loaded.
diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp
index 5d71c919d9..9a39af7109 100644
--- a/eeschema/netform.cpp
+++ b/eeschema/netform.cpp
@@ -380,7 +380,9 @@ bool SCH_EDIT_FRAME::WriteNetListFile( int aFormat, const wxString& aFullFileNam
{
if( ( f = wxFopen( aFullFileName, wxT( "wt" ) ) ) == NULL )
{
- wxString msg = _( "Failed to create file " ) + aFullFileName;
+ wxString msg;
+ msg.Printf( _( "Failed to create file <%s>" ),
+ GetChars( aFullFileName ) );
DisplayError( this, msg );
return false;
}
@@ -1102,7 +1104,8 @@ bool NETLIST_EXPORT_TOOL::WriteGENERICNetList( const wxString& aOutFileName )
if( ( out = wxFopen( aOutFileName, wxT( "wt" ) ) ) == NULL )
{
- wxString msg = _( "Failed to create file " ) + aOutFileName;
+ wxString msg;
+ msg.Printf( _( "Failed to create file <%s>" ), GetChars( aOutFileName ) );
DisplayError( NULL, msg );
return false;
}
diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp
index 8d071e8714..d6c0471a8e 100644
--- a/eeschema/netlist.cpp
+++ b/eeschema/netlist.cpp
@@ -146,14 +146,14 @@ void SCH_EDIT_FRAME::BuildNetListBase()
if( g_NetObjectslist.size() == 0 )
return; // no objects
- activity << wxT( " " ) << _( "net count =" ) << wxT( " " ) << g_NetObjectslist.size();
+ activity += wxString::Format( _( " net count = %u" ), g_NetObjectslist.size() );
SetStatusText( activity );
/* Sort objects by Sheet */
sort( g_NetObjectslist.begin(), g_NetObjectslist.end(), SortItemsBySheet );
- activity << wxT( ", " ) << _( "connections" ) << wxT( "..." );
+ activity += _( ", connections... " );
SetStatusText( activity );
sheet = &(g_NetObjectslist[0]->m_SheetList);
@@ -261,13 +261,13 @@ void SCH_EDIT_FRAME::BuildNetListBase()
dumpNetTable();
#endif
- activity << _( "done" );
+ activity += _( "done" );
SetStatusText( activity );
/* Updating the Bus Labels Netcode connected by Bus */
ConnectBusLabels( g_NetObjectslist );
- activity << wxT( ", " ) << _( "bus labels" ) << wxT( "..." );
+ activity += _( ", bus labels..." );
SetStatusText( activity );
/* Group objects by label. */
@@ -306,11 +306,11 @@ void SCH_EDIT_FRAME::BuildNetListBase()
dumpNetTable();
#endif
- activity << _( "done" );
+ activity += _( "done" );
SetStatusText( activity );
/* Connection hierarchy. */
- activity << wxT( ", " ) << _( "hierarchy..." );
+ activity += _( ", hierarchy..." );
SetStatusText( activity );
for( unsigned ii = 0; ii < g_NetObjectslist.size(); ii++ )
@@ -328,7 +328,7 @@ void SCH_EDIT_FRAME::BuildNetListBase()
dumpNetTable();
#endif
- activity << _( "done" );
+ activity += _( "done" );
SetStatusText( activity );
/* Compress numbers of Netcode having consecutive values. */
diff --git a/eeschema/onrightclick.cpp b/eeschema/onrightclick.cpp
index 42e406b794..db36e65d66 100644
--- a/eeschema/onrightclick.cpp
+++ b/eeschema/onrightclick.cpp
@@ -301,36 +301,54 @@ void AddMenusForComponentField( wxMenu* PopMenu, SCH_FIELD* Field )
{
wxString msg, name;
- name << wxT(" ");
- switch( Field->GetId() )
- {
- case REFERENCE: name << _( "Reference" ); break;
- case VALUE: name << _( "Value" ); break;
- case FOOTPRINT: name << _( "Footprint Field" ); break;
- default: name << _( "Field" ); break;
- }
-
if( !Field->GetFlags() )
{
- msg = AddHotkeyName( _( "Move" ) + name, s_Schematic_Hokeys_Descr,
- HK_MOVE_COMPONENT_OR_ITEM );
+ switch( Field->GetId() )
+ {
+ case REFERENCE: name = _( "Move reference" ); break;
+ case VALUE: name = _( "Move value" ); break;
+ case FOOTPRINT: name = _( "Move footprint field" ); break;
+ default: name = _( "Move field" ); break;
+ }
+
+ msg = AddHotkeyName( name, s_Schematic_Hokeys_Descr,
+ HK_MOVE_COMPONENT_OR_ITEM );
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_text_xpm ) );
}
- msg = AddHotkeyName( _( "Rotate" ) + name, s_Schematic_Hokeys_Descr,
- HK_ROTATE );
+ switch( Field->GetId() )
+ {
+ case REFERENCE: name = _( "Rotate reference" ); break;
+ case VALUE: name = _( "Rotate value" ); break;
+ case FOOTPRINT: name = _( "Rotate footprint field" ); break;
+ default: name = _( "Rotate field" ); break;
+ }
+
+ msg = AddHotkeyName( name, s_Schematic_Hokeys_Descr, HK_ROTATE );
AddMenuItem( PopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_field_xpm ) );
// Ref, value and footprint have specific hotkeys. Show the specific hotkey:
hotkey_id_commnand id;
switch( Field->GetId() )
{
- case REFERENCE: id = HK_EDIT_COMPONENT_REFERENCE; break;
- case VALUE: id = HK_EDIT_COMPONENT_VALUE; break;
- case FOOTPRINT: id = HK_EDIT_COMPONENT_FOOTPRINT; break;
- default: id = HK_EDIT; break;
+ case REFERENCE:
+ id = HK_EDIT_COMPONENT_REFERENCE;
+ name = _( "Edit reference" );
+ break;
+ case VALUE:
+ id = HK_EDIT_COMPONENT_VALUE;
+ name = _( "Edit value" );
+ break;
+ case FOOTPRINT:
+ id = HK_EDIT_COMPONENT_FOOTPRINT;
+ name = _( "Edit footprint field" );
+ break;
+ default:
+ id = HK_EDIT;
+ name = _( "Edit field" );
+ break;
}
- msg = AddHotkeyName( _( "Edit" ) + name, s_Schematic_Hokeys_Descr, id );
+ msg = AddHotkeyName( name, s_Schematic_Hokeys_Descr, id );
AddMenuItem( PopMenu, ID_SCH_EDIT_ITEM, msg, KiBitmap( edit_text_xpm ) );
}
@@ -350,8 +368,8 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
if( !Component->GetFlags() )
{
- msg = _( "Move Component" );
- msg << wxT( " " ) << Component->GetField( REFERENCE )->GetText();
+ msg.Printf( _( "Move Component %s" ),
+ GetChars( Component->GetField( REFERENCE )->GetText() ) );
msg = AddHotkeyName( msg, s_Schematic_Hokeys_Descr, HK_MOVE_COMPONENT_OR_ITEM );
AddMenuItem( PopMenu, ID_SCH_MOVE_ITEM, msg, KiBitmap( move_xpm ) );
msg = AddHotkeyName( _( "Drag Component" ), s_Schematic_Hokeys_Descr, HK_DRAG );
@@ -825,7 +843,7 @@ void AddMenusForBlock( wxMenu* PopMenu, SCH_EDIT_FRAME* frame )
msg = AddHotkeyName( _( "Mirror Block --" ), s_Schematic_Hokeys_Descr,
HK_MIRROR_X_COMPONENT );
AddMenuItem( PopMenu, ID_SCH_MIRROR_X, msg, KiBitmap( mirror_v_xpm ) );
- msg = AddHotkeyName( _( "Rotate Block ccw" ), s_Schematic_Hokeys_Descr, HK_ROTATE );
+ msg = AddHotkeyName( _( "Rotate Block CCW" ), s_Schematic_Hokeys_Descr, HK_ROTATE );
AddMenuItem( PopMenu, ID_SCH_ROTATE_CLOCKWISE, msg, KiBitmap( rotate_ccw_xpm ) );
#if 0
diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp
index 2095e17325..f84128f232 100644
--- a/eeschema/pinedit.cpp
+++ b/eeschema/pinedit.cpp
@@ -645,6 +645,9 @@ void LIB_EDIT_FRAME::OnCheckComponent( wxCommandEvent& event )
dup_error++;
Pin->ReturnPinStringNum( stringPinNum );
+
+ /* TODO I dare someone to find a way to make happy translators on
+ this thing! Lorenzo */
curr_pin->ReturnPinStringNum( stringCurrPinNum );
msg.Printf( _( "Duplicate pin %s \"%s\" at location (%.3f, \
%.3f) conflicts with pin %s \"%s\" at location (%.3f, %.3f)" ),
diff --git a/eeschema/plot_schematic_DXF.cpp b/eeschema/plot_schematic_DXF.cpp
index 41183c98c5..8cc0c75268 100644
--- a/eeschema/plot_schematic_DXF.cpp
+++ b/eeschema/plot_schematic_DXF.cpp
@@ -84,9 +84,9 @@ void DIALOG_PLOT_SCHEMATIC::CreateDXFFile( bool aPlotAll, bool aPlotFrameRef )
wxString msg;
if( PlotOneSheetDXF( plotFileName, screen, plot_offset, 1.0, aPlotFrameRef ) )
- msg.Printf( _( "Plot: %s OK\n" ), GetChars( plotFileName ) );
+ msg.Printf( _( "Plot: <%s> OK\n" ), GetChars( plotFileName ) );
else // Error
- msg.Printf( _( "** Unable to create %s **\n" ), GetChars( plotFileName ) );
+ msg.Printf( _( "Unable to create <%s>\n" ), GetChars( plotFileName ) );
m_MessagesBox->AppendText( msg );
diff --git a/eeschema/plot_schematic_HPGL.cpp b/eeschema/plot_schematic_HPGL.cpp
index f11c94e8fd..a64b95a29f 100644
--- a/eeschema/plot_schematic_HPGL.cpp
+++ b/eeschema/plot_schematic_HPGL.cpp
@@ -182,9 +182,9 @@ void DIALOG_PLOT_SCHEMATIC::createHPGLFile( bool aPlotAll, bool aPlotFrameRef )
wxString msg;
if( Plot_1_Page_HPGL( plotFileName, screen, plotPage, plotOffset,
plot_scale, aPlotFrameRef ) )
- msg.Printf( _( "Plot: %s OK\n" ), GetChars( plotFileName ) );
+ msg.Printf( _( "Plot: <%s> OK\n" ), GetChars( plotFileName ) );
else // Error
- msg.Printf( _( "** Unable to create %s **\n" ), GetChars( plotFileName ) );
+ msg.Printf( _( "Unable to create <%s>\n" ), GetChars( plotFileName ) );
m_MessagesBox->AppendText( msg );
diff --git a/eeschema/plot_schematic_PDF.cpp b/eeschema/plot_schematic_PDF.cpp
index 2c299d8c8e..ba2176b77a 100644
--- a/eeschema/plot_schematic_PDF.cpp
+++ b/eeschema/plot_schematic_PDF.cpp
@@ -90,7 +90,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
if( ! plotter->OpenFile( plotFileName ) )
{
- msg.Printf( _( "** Unable to create %s **\n" ), GetChars( plotFileName ) );
+ msg.Printf( _( "Unable to create <%s>\n" ), GetChars( plotFileName ) );
m_MessagesBox->AppendText( msg );
delete plotter;
return;
@@ -124,7 +124,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
m_parent->SetSheetNumberAndCount();
- msg.Printf( _( "Plot: %s OK\n" ), GetChars( plotFileName ) );
+ msg.Printf( _( "Plot: <%s> OK\n" ), GetChars( plotFileName ) );
m_MessagesBox->AppendText( msg );
}
diff --git a/eeschema/plot_schematic_PS.cpp b/eeschema/plot_schematic_PS.cpp
index 7d992cfcca..66d32ac79b 100644
--- a/eeschema/plot_schematic_PS.cpp
+++ b/eeschema/plot_schematic_PS.cpp
@@ -108,9 +108,9 @@ void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef )
if( plotOneSheetPS( plotFileName, screen, plotPage, plot_offset,
scale, aPlotFrameRef ) )
- msg.Printf( _( "Plot: %s OK\n" ), GetChars( plotFileName ) );
+ msg.Printf( _( "Plot: <%s> OK\n" ), GetChars( plotFileName ) );
else // Error
- msg.Printf( _( "** Unable to create %s **\n" ), GetChars( plotFileName ) );
+ msg.Printf( _( "Unable to create <%s>\n" ), GetChars( plotFileName ) );
m_MessagesBox->AppendText( msg );
diff --git a/eeschema/plot_schematic_SVG.cpp b/eeschema/plot_schematic_SVG.cpp
index 86d6bb4aba..de1ffb0466 100644
--- a/eeschema/plot_schematic_SVG.cpp
+++ b/eeschema/plot_schematic_SVG.cpp
@@ -77,12 +77,18 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
bool success = plotOneSheetSVG( m_parent, fn.GetFullPath(), screen,
getModeColor() ? false : true,
aPrintFrameRef );
- msg = _( "Create file " ) + fn.GetFullPath();
if( !success )
- msg += _( " error" );
+ {
+ msg.Printf( _( "Error creating file <%s>\n" ),
+ GetChars( fn.GetFullPath() ) );
+ }
+ else
+ {
+ msg.Printf( _( "File <%s> OK\n" ),
+ GetChars( fn.GetFullPath() ) );
+ }
- msg += wxT( "\n" );
m_MessagesBox->AppendText( msg );
}
@@ -102,10 +108,10 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
getModeColor() ? false : true,
aPrintFrameRef );
if( success )
- msg.Printf( _( "Plot: %s OK\n" ),
+ msg.Printf( _( "Plot: <%s> OK\n" ),
GetChars( fn.GetFullPath() ) );
else // Error
- msg.Printf( _( "** Unable to create %s **\n" ),
+ msg.Printf( _( "Unable to create <%s>\n" ),
GetChars( fn.GetFullPath() ) );
m_MessagesBox->AppendText( msg );
diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp
index 836a3e83e5..896d2d1d52 100644
--- a/eeschema/sheet.cpp
+++ b/eeschema/sheet.cpp
@@ -107,13 +107,18 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC )
{
if( ( useScreen != NULL ) || loadFromFile ) // Load from existing file.
{
- msg.Printf( _( "A file named \"%s\" already exists" ),
- GetChars( newFullFilename ) );
-
if( useScreen != NULL )
- msg += _( " in the current schematic hierarchy" );
+ {
+ msg.Printf( _( "A file named <%s> already exists in the current schematic hierarchy." ),
+ GetChars( newFullFilename ) );
+ }
+ else
+ {
+ msg.Printf( _( "A file named <%s> already exists." ),
+ GetChars( newFullFilename ) );
+ }
- msg += _(".\n\nDo you want to create a sheet with the contents of this file?" );
+ msg += _("\n\nDo you want to create a sheet with the contents of this file?" );
if( !IsOK( this, msg ) )
return false;
@@ -141,14 +146,20 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC )
if( ( useScreen != NULL ) || loadFromFile ) // Load from existing file.
{
- tmp.Printf( _( "A file named \"%s\" already exists" ),
- GetChars( newFullFilename ) );
- msg += tmp;
-
+ wxString tmp;
if( useScreen != NULL )
- msg += _( " in the current schematic hierarchy" );
+ {
+ tmp.Printf( _( "A file named <%s> already exists in the current schematic hierarchy." ),
+ GetChars( newFullFilename ) );
+ }
+ else
+ {
+ tmp.Printf( _( "A file named <%s> already exists." ),
+ GetChars( newFullFilename ) );
+ }
- msg += _(".\n\nDo you want to replace the sheet with the contents of this file?" );
+ msg += tmp;
+ msg += _("\n\nDo you want to replace the sheet with the contents of this file?" );
if( !IsOK( this, msg ) )
return false;
diff --git a/eeschema/symbedit.cpp b/eeschema/symbedit.cpp
index cf24aae25a..0e22eff8ff 100644
--- a/eeschema/symbedit.cpp
+++ b/eeschema/symbedit.cpp
@@ -154,7 +154,7 @@ void LIB_EDIT_FRAME::SaveOneSymbol()
wxGetApp().SaveLastVisitedLibraryPath( fn.GetPath() );
- msg.Printf( _( "Saving symbol in [%s]" ), GetChars( fn.GetPath() ) );
+ msg.Printf( _( "Saving symbol in <%s>" ), GetChars( fn.GetPath() ) );
SetStatusText( msg );
wxString line;
diff --git a/gerbview/dcode.cpp b/gerbview/dcode.cpp
index 7cc851c5b1..5dbb5a7e8a 100644
--- a/gerbview/dcode.cpp
+++ b/gerbview/dcode.cpp
@@ -185,7 +185,7 @@ int GERBVIEW_FRAME::ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName
dest = wxFopen( D_Code_FullFileName, wxT( "rt" ) );
if( dest == 0 )
{
- msg = _( "File " ) + D_Code_FullFileName + _( " not found" );
+ msg.Printf( _( "File <%s> not found" ), GetChars( D_Code_FullFileName ) );
DisplayError( this, msg, 10 );
return -1;
}
diff --git a/gerbview/export_to_pcbnew.cpp b/gerbview/export_to_pcbnew.cpp
index e2635cd59b..a1ada2d65f 100644
--- a/gerbview/export_to_pcbnew.cpp
+++ b/gerbview/export_to_pcbnew.cpp
@@ -160,7 +160,7 @@ void GERBVIEW_FRAME::ExportDataInPcbnewFormat( wxCommandEvent& event )
if( wxFileExists( fileName ) )
{
- if( !IsOK( this, _( "Ok to change the existing file ?" ) ) )
+ if( !IsOK( this, _( "OK to change the existing file ?" ) ) )
return;
}
diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp
index b5d1dff3ed..02b0d01125 100644
--- a/gerbview/gerbview_frame.cpp
+++ b/gerbview/gerbview_frame.cpp
@@ -478,7 +478,7 @@ void GERBVIEW_FRAME::UpdateTitleAndInfo()
gerber->DisplayImageInfo();
// Display Image Name and Layer Name (from the current gerber data):
- text.Printf( _( "Image name: \"%s\" Layer name: \"%s\"" ),
+ text.Printf( _( "Image name: '%s' Layer name: '%s'" ),
GetChars( gerber->m_ImageName ),
GetChars( gerber->GetLayerParams().m_LayerName ) );
SetStatusText( text, 0 );
diff --git a/gerbview/readgerb.cpp b/gerbview/readgerb.cpp
index 0fffdc9328..74a9cb9ea3 100644
--- a/gerbview/readgerb.cpp
+++ b/gerbview/readgerb.cpp
@@ -44,7 +44,7 @@ bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName,
gerber->m_Current_File = wxFopen( GERBER_FullFileName, wxT( "rt" ) );
if( gerber->m_Current_File == 0 )
{
- msg = _( "File " ) + GERBER_FullFileName + _( " not found" );
+ msg.Printf( _( "File <%s> not found" ), GetChars( GERBER_FullFileName ) );
DisplayError( this, msg, 10 );
return false;
}
diff --git a/kicad/class_treeproject_item.cpp b/kicad/class_treeproject_item.cpp
index 1c2102f21f..33a7fb8823 100644
--- a/kicad/class_treeproject_item.cpp
+++ b/kicad/class_treeproject_item.cpp
@@ -151,7 +151,7 @@ bool TREEPROJECT_ITEM::Delete( bool check )
{
wxString msg;
- msg.Printf( _( "Do you really want to delete '%s'" ), GetChars( GetFileName() ) );
+ msg.Printf( _( "Do you really want to delete <%s>" ), GetChars( GetFileName() ) );
wxMessageDialog dialog( m_parent, msg,
_( "Delete File" ), wxYES_NO | wxICON_QUESTION );
diff --git a/kicad/files-io.cpp b/kicad/files-io.cpp
index c88c7d5078..911dee57ed 100644
--- a/kicad/files-io.cpp
+++ b/kicad/files-io.cpp
@@ -71,7 +71,9 @@ void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event )
if( dlg.ShowModal() == wxID_CANCEL )
return;
- PrintMsg( _( "\nOpen " ) + dlg.GetPath() + wxT( "\n" ) );
+ wxString msg;
+ msg.Printf( _("\nOpen <%s>\n" ), GetChars( dlg.GetPath() ) );
+ PrintMsg( msg );
wxDirDialog dirDlg( this, _( "Target Directory" ), fn.GetPath(),
wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
@@ -80,7 +82,8 @@ void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event )
return;
wxSetWorkingDirectory( dirDlg.GetPath() );
- PrintMsg( _( "Unzipping project in " ) + dirDlg.GetPath() + wxT( "\n" ) );
+ msg.Printf( _( "Unzipping project in <%s>\n" ), GetChars( dirDlg.GetPath() ) );
+ PrintMsg( msg );
wxFileSystem zipfilesys;
zipfilesys.AddHandler( new wxZipFSHandler );
@@ -100,7 +103,8 @@ void KICAD_MANAGER_FRAME::OnUnarchiveFiles( wxCommandEvent& event )
wxString unzipfilename = localfilename.AfterLast( ':' );
- PrintMsg( _( "Extract file " ) + unzipfilename );
+ msg.Printf( _( "Extract file <%s>" ), GetChars( unzipfilename ) );
+ PrintMsg( msg );
wxInputStream* stream = zipfile->GetStream();
@@ -176,7 +180,8 @@ void KICAD_MANAGER_FRAME::OnArchiveFiles( wxCommandEvent& event )
while( cont )
{
wxFileSystem fsfile;
- PrintMsg( _( "Archive file " ) + currFilename );
+ msg.Printf(_( "Archive file <%s>" ), GetChars( currFilename ) );
+ PrintMsg( msg );
// Read input file and put it in zip file:
wxFSFile * infile = fsfile.OpenFile(currFilename);
if( infile )
diff --git a/kicad/prjconfig.cpp b/kicad/prjconfig.cpp
index 12d2b991ba..58ab903e17 100644
--- a/kicad/prjconfig.cpp
+++ b/kicad/prjconfig.cpp
@@ -235,8 +235,11 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event )
if( !m_ProjectFileName.FileExists() && !filename.IsSameAs( nameless_prj ) )
{
- DisplayError( this, _( "KiCad project file <" ) +
- m_ProjectFileName.GetFullPath() + _( "> not found" ) );
+ wxString msg;
+ msg.Printf( _( "KiCad project file <%s> not found" ),
+ GetChars( m_ProjectFileName.GetFullPath() ) );
+
+ DisplayError( this, msg );
return;
}
@@ -260,10 +263,11 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event )
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED, ID_INIT_WATCHED_PATHS );
wxPostEvent( this, cmd);
#endif
-
- PrintMsg( _( "Working dir: " ) + m_ProjectFileName.GetPath() +
- _( "\nProject: " ) + m_ProjectFileName.GetFullName() +
- wxT( "\n" ) );
+ wxString msg;
+ msg.Format( _( "Working dir: <%s>\nProject: <%s>\n" ),
+ GetChars( m_ProjectFileName.GetPath() ),
+ GetChars( m_ProjectFileName.GetFullName() ) );
+ PrintMsg( msg );
}
diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp
index b442b1a918..ae58782f93 100644
--- a/kicad/tree_project_frame.cpp
+++ b/kicad/tree_project_frame.cpp
@@ -739,7 +739,8 @@ void TREE_PROJECT_FRAME::OnRenameFile( wxCommandEvent& )
return;
wxString buffer = m_TreeProject->GetItemText( curr_item );
- wxString msg = _( "Change filename: " ) + tree_data->m_FileName;
+ wxString msg;
+ msg.Printf( _( "Change filename: <%s>" ), GetChars( tree_data->m_FileName ) );
wxTextEntryDialog dlg( this, msg, _( "Change filename" ), buffer );
diff --git a/pcbnew/autorouter/autoplac.cpp b/pcbnew/autorouter/autoplac.cpp
index ce7d5bb9d8..7a32b43473 100644
--- a/pcbnew/autorouter/autoplac.cpp
+++ b/pcbnew/autorouter/autoplac.cpp
@@ -648,7 +648,7 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC )
if( m_canvas->GetAbortRequest() )
{
- if( IsOK( this, _( "Ok to abort?" ) ) )
+ if( IsOK( this, _( "OK to abort?" ) ) )
return ESC;
else
m_canvas->SetAbortRequest( false );
diff --git a/pcbnew/autorouter/solve.cpp b/pcbnew/autorouter/solve.cpp
index 768825a765..c3c174d352 100644
--- a/pcbnew/autorouter/solve.cpp
+++ b/pcbnew/autorouter/solve.cpp
@@ -362,7 +362,7 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int aLayersCount )
}
msg.Printf( wxT( "%d" ), nbsucces );
- AppendMsgPanel( wxT( "Ok" ), msg, GREEN );
+ AppendMsgPanel( wxT( "OK" ), msg, GREEN );
msg.Printf( wxT( "%d" ), nbunsucces );
AppendMsgPanel( wxT( "Fail" ), msg, RED );
msg.Printf( wxT( " %d" ), GetBoard()->GetUnconnectedNetCount() );
diff --git a/pcbnew/build_BOM_from_board.cpp b/pcbnew/build_BOM_from_board.cpp
index b57468a080..66bbd9718d 100644
--- a/pcbnew/build_BOM_from_board.cpp
+++ b/pcbnew/build_BOM_from_board.cpp
@@ -80,7 +80,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
if( FichBom == NULL )
{
- msg = _( "Unable to create file " ) + fn.GetFullPath();
+ msg.Printf( _( "Unable to create file <%s>" ), GetChars( fn.GetFullPath() ) );
DisplayError( this, msg );
return;
}
diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp
index c28d719df8..7d9e4aad33 100644
--- a/pcbnew/class_dimension.cpp
+++ b/pcbnew/class_dimension.cpp
@@ -489,9 +489,8 @@ EDA_RECT DIMENSION::GetBoundingBox() const
wxString DIMENSION::GetSelectMenuText() const
{
wxString text;
-
- text << _( "Dimension" ) << wxT( " \"" ) << GetText() << wxT( "\" on " )
- << GetLayerName();
+ text.Printf( _( "Dimension \"%s\" on %s" ),
+ GetChars( GetText() ), GetChars( GetLayerName() ) );
return text;
}
diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp
index 3cb827fa47..e0ed4790fc 100644
--- a/pcbnew/class_edge_mod.cpp
+++ b/pcbnew/class_edge_mod.cpp
@@ -263,10 +263,10 @@ void EDGE_MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
wxString EDGE_MODULE::GetSelectMenuText() const
{
wxString text;
-
- text << _( "Graphic" ) << wxT( " " ) << ShowShape( (STROKE_T) m_Shape );
- text << wxT( " on " ) << GetLayerName();
- text << _( " of " ) << ( (MODULE*) GetParent() )->GetReference();
+ text.Printf( _( "Graphic (%s) on %s of %s" ),
+ GetChars( ShowShape( (STROKE_T) m_Shape ) ),
+ GetChars( GetLayerName() ),
+ GetChars( ((MODULE*) GetParent())->GetReference() ) );
return text;
}
diff --git a/pcbnew/class_marker_pcb.cpp b/pcbnew/class_marker_pcb.cpp
index 88b361fbba..4e947e07cd 100644
--- a/pcbnew/class_marker_pcb.cpp
+++ b/pcbnew/class_marker_pcb.cpp
@@ -99,8 +99,9 @@ void MARKER_PCB::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
wxString errorTxt;
- errorTxt << _( "ErrType" ) << wxT( "(" ) << rpt.GetErrorCode() << wxT( ")- " )
- << rpt.GetErrorText() << wxT( ":" );
+ errorTxt.Printf( _( "ErrType (%d)- %s:" ),
+ rpt.GetErrorCode(),
+ GetChars( rpt.GetErrorText() ) );
aList.push_back( MSG_PANEL_ITEM( errorTxt, wxEmptyString, RED ) );
@@ -131,8 +132,7 @@ void MARKER_PCB::Flip(const wxPoint& aCentre )
wxString MARKER_PCB::GetSelectMenuText() const
{
wxString text;
-
- text << _( "Marker" ) << wxT( " @(" ) << GetPos().x << wxT( "," ) << GetPos().y << wxT( ")" );
+ text.Printf( _( "Marker @(%d,%d)" ), GetPos().x, GetPos().y );
return text;
}
diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp
index b6317bb3d5..b000a609ca 100644
--- a/pcbnew/class_module.cpp
+++ b/pcbnew/class_module.cpp
@@ -512,8 +512,9 @@ void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
aList.push_back( MSG_PANEL_ITEM( _( "3D-Shape" ), msg, RED ) );
- wxString doc = _( "Doc: " ) + m_Doc;
- wxString keyword = _( "KeyW: " ) + m_KeyWord;
+ wxString doc, keyword;
+ doc.Printf( _( "Doc: %s" ), GetChars( m_Doc ) );
+ keyword.Printf( _( "KeyW: %s" ), GetChars( m_KeyWord ) );
aList.push_back( MSG_PANEL_ITEM( doc, keyword, BLACK ) );
}
@@ -673,9 +674,9 @@ SEARCH_RESULT MODULE::Visit( INSPECTOR* inspector, const void* testData,
wxString MODULE::GetSelectMenuText() const
{
wxString text;
-
- text << _( "Footprint" ) << wxT( " " ) << GetReference();
- text << wxT( " on " ) << GetLayerName();
+ text.Printf( _( "Footprint %s on %s" ),
+ GetChars ( GetReference() ),
+ GetChars ( GetLayerName() ) );
return text;
}
diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp
index 5912c3d0fa..c5fc88bb37 100644
--- a/pcbnew/class_pcb_text.cpp
+++ b/pcbnew/class_pcb_text.cpp
@@ -174,7 +174,7 @@ wxString TEXTE_PCB::GetSelectMenuText() const
else
shorttxt += m_Text.Left( 10 ) + wxT( "..." );
- text.Printf( _( "Pcb Text %s on %s"),
+ text.Printf( _( "Pcb Text \"%s\" on %s"),
GetChars ( shorttxt ), GetChars( GetLayerName() ) );
return text;
diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp
index 0d6c32fa48..acc817b4c6 100644
--- a/pcbnew/class_text_mod.cpp
+++ b/pcbnew/class_text_mod.cpp
@@ -406,18 +406,18 @@ wxString TEXTE_MODULE::GetSelectMenuText() const
switch( m_Type )
{
case TEXT_is_REFERENCE:
- text << _( "Reference" ) << wxT( " " ) << m_Text;
+ text.Printf( _( "Reference %s" ), GetChars( m_Text ) );
break;
case TEXT_is_VALUE:
- text << _( "Value" ) << wxT( " " ) << m_Text << _( " of " )
- << ( (MODULE*) GetParent() )->GetReference();
+ text.Printf( _( "Value %s of %s" ), GetChars( m_Text ),
+ GetChars( ( (MODULE*) GetParent() )->GetReference() ) );
break;
default: // wrap this one in quotes:
- text << _( "Text" ) << wxT( " \"" ) << m_Text << wxT( "\"" ) << _( " of " )
- << ( (MODULE*) GetParent() )->GetReference() << _( " on " )
- << GetLayerName();
+ text.Printf( _( "Text \"%s\" on %s of %s" ), GetChars( m_Text ),
+ GetChars( GetLayerName() ),
+ GetChars( ( (MODULE*) GetParent() )->GetReference() ) );
break;
}
diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp
index 933f9ebed8..024ad5aaf7 100644
--- a/pcbnew/class_track.cpp
+++ b/pcbnew/class_track.cpp
@@ -158,7 +158,7 @@ EDA_ITEM* SEGZONE::Clone() const
wxString SEGZONE::GetSelectMenuText() const
{
- wxString text;
+ wxString text, nettxt;
NETINFO_ITEM* net;
BOARD* board = GetBoard();
@@ -169,15 +169,16 @@ wxString SEGZONE::GetSelectMenuText() const
net = board->FindNet( GetNet() );
if( net )
- text << wxT( " [" ) << net->GetNetname() << wxT( "]" );
+ nettxt = net->GetNetname();
}
else
{
wxFAIL_MSG( wxT( "SEGZONE::GetSelectMenuText: BOARD is NULL" ) );
- text << wxT( "???" );
+ nettxt = wxT( "???" );
}
- text << _( " on " ) << GetLayerName();
+ text.Printf( _( "Zone (%08lX) [%s] on %s" ),
+ m_TimeStamp, GetChars( nettxt ), GetChars( GetLayerName() ) );
return text;
}
@@ -198,7 +199,6 @@ EDA_ITEM* SEGVIA::Clone() const
wxString SEGVIA::GetSelectMenuText() const
{
- // Note: we use here Printf to make message translatable.
wxString text;
wxString format;
NETINFO_ITEM* net;
@@ -234,7 +234,6 @@ wxString SEGVIA::GetSelectMenuText() const
else
{
wxFAIL_MSG( wxT( "SEGVIA::GetSelectMenuText: BOARD is NULL" ) );
- text << wxT( "???" );
text.Printf( format.GetData(), GetChars( ShowWidth() ),
wxT( "???" ), 0,
wxT( "??" ), wxT( "??" ) );
diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp
index 3fcf9c31e7..a561e974a3 100644
--- a/pcbnew/class_zone.cpp
+++ b/pcbnew/class_zone.cpp
@@ -924,8 +924,6 @@ wxString ZONE_CONTAINER::GetSelectMenuText() const
NETINFO_ITEM* net;
BOARD* board = GetBoard();
- text = _( "Zone Outline" );
-
int ncont = m_Poly->GetContour( m_CornerSelection );
if( ncont )
@@ -934,8 +932,7 @@ wxString ZONE_CONTAINER::GetSelectMenuText() const
if( GetIsKeepout() )
text << wxT( " " ) << _( "(Keepout)" );
- text << wxT( " " );
- text << wxString::Format( wxT( "(%08lX)" ), m_TimeStamp );
+ text << wxString::Format( wxT( " (%08lX)" ), m_TimeStamp );
// Display net name for copper zones
if( !GetIsKeepout() )
@@ -964,7 +961,8 @@ wxString ZONE_CONTAINER::GetSelectMenuText() const
}
}
- text << _( " on " ) << GetLayerName();
+ text.Printf( _( "Zone Outline %s on %s" ), GetChars( text ),
+ GetChars( GetLayerName() ) );
return text;
}
diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp
index c5a14ca726..ae71a34709 100644
--- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp
+++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp
@@ -267,9 +267,9 @@ void DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties()
m_ValueCtrl->SetValue( m_ValueCopy->GetText() );
m_AttributsCtrl->SetItemToolTip( 0,
- _( "Use this attribute for most non smd components" ) );
+ _( "Use this attribute for most non SMD components" ) );
m_AttributsCtrl->SetItemToolTip( 1,
- _( "Use this attribute for smd components.\nOnly components with this option are put in the footprint position list file" ) );
+ _( "Use this attribute for SMD components.\nOnly components with this option are put in the footprint position list file" ) );
m_AttributsCtrl->SetItemToolTip( 2,
_( "Use this attribute for \"virtual\" components drawn on board (like a old ISA PC bus connector)" ) );
diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp
index 0481490122..cce6a7b4b5 100644
--- a/pcbnew/dialogs/dialog_global_deletion.cpp
+++ b/pcbnew/dialogs/dialog_global_deletion.cpp
@@ -68,7 +68,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( )
}
else
{
- if( !IsOK( this, _( "Ok to delete selected items ?" ) ) )
+ if( !IsOK( this, _( "OK to delete selected items ?" ) ) )
return;
BOARD * pcb = m_Parent->GetBoard();
diff --git a/pcbnew/dialogs/dialog_orient_footprints.cpp b/pcbnew/dialogs/dialog_orient_footprints.cpp
index e14fd86ef0..01cae40e27 100644
--- a/pcbnew/dialogs/dialog_orient_footprints.cpp
+++ b/pcbnew/dialogs/dialog_orient_footprints.cpp
@@ -127,7 +127,7 @@ bool PCB_EDIT_FRAME::ReOrientModules( const wxString& ModuleMask,
wxString line;
bool modified = false;
- line.Printf( _( "Ok to set footprints orientation to %.1f degrees ?" ), (double)Orient / 10 );
+ line.Printf( _( "OK to set footprints orientation to %.1f degrees ?" ), (double)Orient / 10 );
if( !IsOK( this, line ) )
return false;
diff --git a/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp b/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp
index 7813c5c58e..9d467f5e15 100644
--- a/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp
+++ b/pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp
@@ -60,7 +60,8 @@ DIALOG_PCBNEW_CONFIG_LIBS::DIALOG_PCBNEW_CONFIG_LIBS( PCB_EDIT_FRAME* parent ):
Init( );
- wxString title = _( "from " ) + wxGetApp().GetCurrentOptionFile();
+ wxString title;
+ title.Printf( _( "from <%s>" ), GetChars( wxGetApp().GetCurrentOptionFile() ) );
SetTitle( title );
m_sdbSizer1OK->SetDefault();
diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp
index 9488ef438c..2bdebcd6f4 100644
--- a/pcbnew/editedge.cpp
+++ b/pcbnew/editedge.cpp
@@ -152,7 +152,9 @@ void PCB_EDIT_FRAME::Delete_Drawings_All_Layer( LAYER_NUM aLayer )
return;
}
- wxString msg = _( "Delete everything on layer " ) + GetBoard()->GetLayerName( aLayer );
+ wxString msg;
+ msg.Printf( _( "Delete everything on layer %s?" ),
+ GetChars( GetBoard()->GetLayerName( aLayer ) ) );
if( !IsOK( this, msg ) )
return;
diff --git a/pcbnew/export_gencad.cpp b/pcbnew/export_gencad.cpp
index 4d19b63a34..5273d037fa 100644
--- a/pcbnew/export_gencad.cpp
+++ b/pcbnew/export_gencad.cpp
@@ -136,7 +136,7 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent )
if( ( file = wxFopen( dlg.GetPath(), wxT( "wt" ) ) ) == NULL )
{
- msg = _( "Unable to create " ) + dlg.GetPath();
+ msg.Printf( _( "Unable to create <%s>" ), GetChars( dlg.GetPath() ) );
DisplayError( this, msg ); return;
}
diff --git a/pcbnew/gen_modules_placefile.cpp b/pcbnew/gen_modules_placefile.cpp
index d000e68869..9264755326 100644
--- a/pcbnew/gen_modules_placefile.cpp
+++ b/pcbnew/gen_modules_placefile.cpp
@@ -235,9 +235,9 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
}
if( singleFile )
- msg.Printf( _( "Place file: %s\n" ), GetChars( fn.GetFullPath() ) );
+ msg.Printf( _( "Place file: <%s>\n" ), GetChars( fn.GetFullPath() ) );
else
- msg.Printf( _( "Component side place file: %s\n" ), GetChars( fn.GetFullPath() ) );
+ msg.Printf( _( "Component side place file: <%s>\n" ), GetChars( fn.GetFullPath() ) );
AddMessage( msg );
msg.Printf( _( "Footprint count %d\n" ), fpcount );
@@ -268,7 +268,7 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
// Display results
if( !singleFile )
{
- msg.Printf( _( "Copper side place file: %s\n" ), GetChars( fn.GetFullPath() ) );
+ msg.Printf( _( "Copper side place file: <%s>\n" ), GetChars( fn.GetFullPath() ) );
AddMessage( msg );
msg.Printf( _( "Footprint count %d\n" ), fpcount );
AddMessage( msg );
@@ -531,7 +531,7 @@ void PCB_EDIT_FRAME::GenFootprintsReport( wxCommandEvent& event )
wxString msg;
if( success )
{
- msg.Printf( _( "Module report file created:\n%s" ),
+ msg.Printf( _( "Module report file created:\n<%s>" ),
GetChars( fn.GetFullPath() ) );
wxMessageBox( msg, _( "Module Report" ), wxICON_INFORMATION );
}
diff --git a/pcbnew/gpcb_plugin.cpp b/pcbnew/gpcb_plugin.cpp
index 76dcfed4f1..230bae94d1 100644
--- a/pcbnew/gpcb_plugin.cpp
+++ b/pcbnew/gpcb_plugin.cpp
@@ -232,7 +232,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 path <%s> does not exist" ),
m_lib_path.GetPath().GetData() ) );
}
@@ -278,7 +278,7 @@ void GPCB_FPL_CACHE::Remove( const wxString& aFootprintName )
if( it == m_modules.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 to delete" ),
m_lib_path.GetPath().GetData(),
aFootprintName.GetData() ) );
}
@@ -878,7 +878,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() ) );
}
@@ -897,7 +897,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES*
if( !fn.IsDirWritable() )
{
- THROW_IO_ERROR( wxString::Format( _( "user does not have permission to delete directory '%s'" ),
+ THROW_IO_ERROR( wxString::Format( _( "user does not have permission to delete directory <%s>" ),
aLibraryPath.GetData() ) );
}
@@ -905,7 +905,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES*
if( dir.HasSubDirs() )
{
- THROW_IO_ERROR( wxString::Format( _( "library directory '%s' has unexpected sub-directories" ),
+ THROW_IO_ERROR( wxString::Format( _( "library directory <%s> has unexpected sub-directories" ),
aLibraryPath.GetData() ) );
}
@@ -924,7 +924,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES*
if( tmp.GetExt() != KiCadFootprintFileExtension )
{
- THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' was found in library path '%s'" ),
+ THROW_IO_ERROR( wxString::Format( _( "unexpected file <%s> was found in library path '%s'" ),
files[i].GetData(), aLibraryPath.GetData() ) );
}
}
@@ -942,7 +942,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES*
// 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/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp
index 0b441d4334..7c145c96ad 100644
--- a/pcbnew/kicad_plugin.cpp
+++ b/pcbnew/kicad_plugin.cpp
@@ -158,13 +158,13 @@ void FP_CACHE::Save()
{
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_path.GetPath().GetData() ) );
}
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" ),
GetChars( m_lib_path.GetPath() ) ) );
}
@@ -193,7 +193,7 @@ void FP_CACHE::Save()
if( wxRename( tempFileName, fn.GetFullPath() ) )
{
- THROW_IO_ERROR( wxString::Format( _( "cannot rename temporary file '%s' to footprint library file '%s'" ),
+ THROW_IO_ERROR( wxString::Format( _( "Cannot rename temporary file <%s> to footprint library file <%s>" ),
tempFileName.GetData(),
fn.GetFullPath().GetData() ) );
}
@@ -210,7 +210,7 @@ void FP_CACHE::Load()
if( !dir.IsOpened() )
{
- THROW_IO_ERROR( wxString::Format( _( "footprint library path '%s' does not exist" ),
+ THROW_IO_ERROR( wxString::Format( _( "Footprint library path <%s> does not exist" ),
m_lib_path.GetPath().GetData() ) );
}
@@ -249,7 +249,7 @@ void FP_CACHE::Remove( const wxString& aFootprintName )
if( it == m_modules.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 to delete" ),
m_lib_path.GetPath().GetData(),
aFootprintName.GetData() ) );
}
@@ -1632,7 +1632,7 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
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() ) );
}
@@ -1645,13 +1645,13 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
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." ),
GetChars( fn.GetFullPath() ) ) );
}
if( fn.FileExists() && !fn.IsFileWritable() )
{
- THROW_IO_ERROR( wxString::Format( _( "user does not have write permission to delete file '%s' " ),
+ THROW_IO_ERROR( wxString::Format( _( "user does not have write permission to delete file <%s> " ),
GetChars( fn.GetFullPath() ) ) );
}
@@ -1694,7 +1694,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() ) );
}
@@ -1706,7 +1706,7 @@ void PCB_IO::FootprintLibCreate( const wxString& aLibraryPath, PROPERTIES* aProp
{
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() ) );
}
@@ -1731,7 +1731,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProp
if( !fn.IsDirWritable() )
{
- THROW_IO_ERROR( wxString::Format( _( "user does not have permission to delete directory '%s'" ),
+ THROW_IO_ERROR( wxString::Format( _( "user does not have permission to delete directory <%s>" ),
aLibraryPath.GetData() ) );
}
@@ -1739,7 +1739,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProp
if( dir.HasSubDirs() )
{
- THROW_IO_ERROR( wxString::Format( _( "library directory '%s' has unexpected sub-directories" ),
+ THROW_IO_ERROR( wxString::Format( _( "library directory <%s> has unexpected sub-directories" ),
aLibraryPath.GetData() ) );
}
@@ -1758,7 +1758,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProp
if( tmp.GetExt() != KiCadFootprintFileExtension )
{
- THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' was found in library path '%s'" ),
+ THROW_IO_ERROR( wxString::Format( _( "unexpected file <%s> was found in library path '%s'" ),
files[i].GetData(), aLibraryPath.GetData() ) );
}
}
@@ -1776,7 +1776,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProp
// 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/layer_widget.cpp b/pcbnew/layer_widget.cpp
index 3ead91151e..250538af92 100644
--- a/pcbnew/layer_widget.cpp
+++ b/pcbnew/layer_widget.cpp
@@ -452,7 +452,7 @@ void LAYER_WIDGET::insertRenderRow( int aRow, const ROW& aSpec )
{
wxBitmapButton* bmb = makeColorButton( m_RenderScrolledWindow, aSpec.color, encodeId( col, aSpec.id ) );
bmb->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnMiddleDownRenderColor ), NULL, this );
- bmb->SetToolTip( _("Middle click for color change" ) );
+ bmb->SetToolTip( _( "Middle click for color change" ) );
m_RenderFlexGridSizer->wxSizer::Insert( index+col, bmb, 0, flags );
// could add a left click handler on the color button that toggles checkbox.
@@ -530,7 +530,7 @@ LAYER_WIDGET::LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner, int aPoint
m_LayerPanel->SetSizer( bSizer3 );
m_LayerPanel->Layout();
bSizer3->Fit( m_LayerPanel );
- m_notebook->AddPage( m_LayerPanel, _("Layer"), true );
+ m_notebook->AddPage( m_LayerPanel, _( "Layer" ), true );
m_RenderingPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer4;
@@ -550,7 +550,7 @@ LAYER_WIDGET::LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner, int aPoint
m_RenderingPanel->SetSizer( bSizer4 );
m_RenderingPanel->Layout();
bSizer4->Fit( m_RenderingPanel );
- m_notebook->AddPage( m_RenderingPanel, _("Render"), false );
+ m_notebook->AddPage( m_RenderingPanel, _( "Render" ), false );
boxSizer->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp
index def084e9c1..f3dec7cf47 100644
--- a/pcbnew/legacy_plugin.cpp
+++ b/pcbnew/legacy_plugin.cpp
@@ -90,7 +90,7 @@
typedef LEGACY_PLUGIN::BIU BIU;
-#define VERSION_ERROR_FORMAT _( "File '%s' is format version: %d.\nI only support format version <= %d.\nPlease upgrade Pcbnew to load this file." )
+#define VERSION_ERROR_FORMAT _( "File <%s> is format version: %d.\nI only support format version <= %d.\nPlease upgrade Pcbnew to load this file." )
#define UNKNOWN_GRAPHIC_FORMAT _( "unknown graphic type: %d")
#define UNKNOWN_PAD_FORMAT _( "unknown pad type: %d")
#define UNKNOWN_PAD_ATTRIBUTE _( "unknown pad attribute: %d" )
@@ -2739,7 +2739,7 @@ BIU LEGACY_PLUGIN::biuParse( const char* aValue, const char** nptrptr )
if( errno )
{
- m_error.Printf( _( "invalid float number in\nfile: '%s'\nline: %d\noffset: %d" ),
+ m_error.Printf( _( "invalid float number in\nfile: <%s>\nline: %d\noffset: %d" ),
m_reader->GetSource().GetData(), m_reader->LineNumber(), aValue - m_reader->Line() + 1 );
THROW_IO_ERROR( m_error );
@@ -2747,7 +2747,7 @@ BIU LEGACY_PLUGIN::biuParse( const char* aValue, const char** nptrptr )
if( aValue == nptr )
{
- m_error.Printf( _( "missing float number in\nfile: '%s'\nline: %d\noffset: %d" ),
+ m_error.Printf( _( "missing float number in\nfile: <%s>\nline: %d\noffset: %d" ),
m_reader->GetSource().GetData(), m_reader->LineNumber(), aValue - m_reader->Line() + 1 );
THROW_IO_ERROR( m_error );
@@ -2774,7 +2774,7 @@ double LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr )
if( errno )
{
- m_error.Printf( _( "invalid float number in\nfile: '%s'\nline: %d\noffset: %d" ),
+ m_error.Printf( _( "invalid float number in\nfile: <%s>\nline: %d\noffset: %d" ),
m_reader->GetSource().GetData(), m_reader->LineNumber(), aValue - m_reader->Line() + 1 );
THROW_IO_ERROR( m_error );
@@ -2782,7 +2782,7 @@ double LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr )
if( aValue == nptr )
{
- m_error.Printf( _( "missing float number in\nfile: '%s'\nline: %d\noffset: %d" ),
+ m_error.Printf( _( "missing float number in\nfile: <%s>\nline: %d\noffset: %d" ),
m_reader->GetSource().GetData(), m_reader->LineNumber(), aValue - m_reader->Line() + 1 );
THROW_IO_ERROR( m_error );
@@ -2830,7 +2830,7 @@ void LEGACY_PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, PROPERTIES*
FILE* fp = wxFopen( aFileName, wxT( "w" ) );
if( !fp )
{
- m_error.Printf( _( "Unable to open file '%s'" ), aFileName.GetData() );
+ m_error.Printf( _( "Unable to open file <%s>" ), aFileName.GetData() );
THROW_IO_ERROR( m_error );
}
@@ -2867,7 +2867,7 @@ void LEGACY_PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, PROPERTIES*
wxString LEGACY_PLUGIN::writeError() const
{
- return wxString::Format( _( "error writing to file '%s'" ), m_filename.GetData() );
+ return wxString::Format( _( "error writing to file <%s>" ), m_filename.GetData() );
}
#define CHECK_WRITE_ERROR() \
@@ -3991,7 +3991,7 @@ void FPL_CACHE::ReadAndVerifyHeader( LINE_READER* aReader )
}
L_bad_library:
- THROW_IO_ERROR( wxString::Format( _( "File '%s' is empty or is not a legacy library" ),
+ THROW_IO_ERROR( wxString::Format( _( "File <%s> is empty or is not a legacy library" ),
m_lib_path.GetData() ) );
}
@@ -4104,7 +4104,7 @@ void FPL_CACHE::Save()
if( !m_writable )
{
THROW_IO_ERROR( wxString::Format(
- _( "Legacy library file '%s' is read only" ), m_lib_path.GetData() ) );
+ _( "Legacy library file <%s> is read only" ), m_lib_path.GetData() ) );
}
wxString tempFileName;
@@ -4124,7 +4124,7 @@ void FPL_CACHE::Save()
if( !fp )
{
THROW_IO_ERROR( wxString::Format(
- _( "Unable to open or create legacy library file '%s'" ),
+ _( "Unable to open or create legacy library file <%s>" ),
m_lib_path.GetData() ) );
}
@@ -4150,7 +4150,7 @@ void FPL_CACHE::Save()
if( wxRename( tempFileName, m_lib_path ) )
{
THROW_IO_ERROR( wxString::Format(
- _( "Unable to rename tempfile '%s' to library file '%s'" ),
+ _( "Unable to rename tempfile <%s> to library file <%s>" ),
tempFileName.GetData(),
m_lib_path.GetData() ) );
}
@@ -4266,7 +4266,7 @@ void LEGACY_PLUGIN::FootprintSave( const wxString& aLibraryPath, const MODULE* a
if( !m_cache->m_writable )
{
- THROW_IO_ERROR( wxString::Format( _( "Library '%s' is read only" ), aLibraryPath.GetData() ) );
+ THROW_IO_ERROR( wxString::Format( _( "Library <%s> is read only" ), aLibraryPath.GetData() ) );
}
std::string footprintName = TO_UTF8( aFootprint->GetLibRef() );
@@ -4310,7 +4310,7 @@ void LEGACY_PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxStrin
if( !m_cache->m_writable )
{
- THROW_IO_ERROR( wxString::Format( _( "Library '%s' is read only" ), aLibraryPath.GetData() ) );
+ THROW_IO_ERROR( wxString::Format( _( "Library <%s> is read only" ), aLibraryPath.GetData() ) );
}
std::string footprintName = TO_UTF8( aFootprintName );
@@ -4320,7 +4320,7 @@ void LEGACY_PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxStrin
if( erasedCount != 1 )
{
THROW_IO_ERROR( wxString::Format(
- _( "library '%s' has no footprint '%s' to delete" ),
+ _( "library <%s> has no footprint %s to delete" ),
aLibraryPath.GetData(), aFootprintName.GetData() ) );
}
@@ -4333,7 +4333,7 @@ void LEGACY_PLUGIN::FootprintLibCreate( const wxString& aLibraryPath, PROPERTIES
if( wxFileExists( aLibraryPath ) )
{
THROW_IO_ERROR( wxString::Format(
- _( "library '%s' already exists, will not create anew" ),
+ _( "library <%s> already exists, will not create anew" ),
aLibraryPath.GetData() ) );
}
@@ -4360,7 +4360,7 @@ bool LEGACY_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES
if( wxRemove( aLibraryPath ) )
{
THROW_IO_ERROR( wxString::Format(
- _( "library '%s' cannot be deleted" ),
+ _( "library <%s> cannot be deleted" ),
aLibraryPath.GetData() ) );
}
diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp
index b560b1f4ee..81e8efa549 100644
--- a/pcbnew/librairi.cpp
+++ b/pcbnew/librairi.cpp
@@ -53,27 +53,27 @@
// unique, "file local" translations:
-#define FMT_OK_OVERWRITE _( "Library '%s' exists, OK to replace ?" )
+#define FMT_OK_OVERWRITE _( "Library <%s> exists, OK to replace ?" )
#define FMT_CREATE_LIB _( "Create New Library" )
-#define FMT_OK_DELETE _( "Ok to delete module '%s' in library '%s'" )
+#define FMT_OK_DELETE _( "OK to delete module %s in library <%s>" )
#define FMT_IMPORT_MODULE _( "Import Footprint Module" )
-#define FMT_FILE_NOT_FOUND _( "File '%s' not found" )
+#define FMT_FILE_NOT_FOUND _( "File <%s> not found" )
#define FMT_NOT_MODULE _( "Not a module file" )
-#define FMT_MOD_NOT_FOUND _( "Unable to find or load footprint '%s' from lib path '%s'" )
-#define FMT_BAD_PATH _( "Unable to find or load footprint from path '%s'" )
-#define FMT_BAD_PATHS _( "The footprint library '%s' could not be found in any of the search paths." )
-#define FMT_LIB_READ_ONLY _( "Library '%s' is read only, not writable" )
+#define FMT_MOD_NOT_FOUND _( "Unable to find or load footprint %s from lib path <%s>" )
+#define FMT_BAD_PATH _( "Unable to find or load footprint from path <%s>" )
+#define FMT_BAD_PATHS _( "The footprint library <%s> could not be found in any of the search paths." )
+#define FMT_LIB_READ_ONLY _( "Library <%s> is read only, not writable" )
#define FMT_EXPORT_MODULE _( "Export Module" )
#define FMT_SAVE_MODULE _( "Save Module" )
#define FMT_MOD_REF _( "Module Reference:" )
-#define FMT_EXPORTED _( "Module exported to file '%s'" )
-#define FMT_MOD_DELETED _( "Component '%s' deleted from library '%s'" )
+#define FMT_EXPORTED _( "Module exported to file <%s>" )
+#define FMT_MOD_DELETED _( "Module %s deleted from library <%s>" )
#define FMT_MOD_CREATE _( "Module Creation" )
#define FMT_NO_MODULES _( "No modules to archive!" )
#define FMT_LIBRARY _( "Library" ) // window title
-#define FMT_MOD_EXISTS _( "Footprint '%s' already exists in library '%s'" )
+#define FMT_MOD_EXISTS _( "Module %s already exists in library <%s>" )
#define FMT_NO_REF_ABORTED _( "No reference, aborted" )
#define FMT_SELECT_LIB _( "Select Active Library:" )
diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp
index 67689c9f5b..3a8161f8cc 100644
--- a/pcbnew/loadcmp.cpp
+++ b/pcbnew/loadcmp.cpp
@@ -302,7 +302,7 @@ MODULE* PCB_BASE_FRAME::loadFootprintFromLibrary( const wxString& aLibraryPath,
if( aDisplayError )
{
wxString msg = wxString::Format(
- _( "Footprint '%s' not found in library '%s'" ),
+ _( "Footprint %s not found in library <%s>" ),
aFootprintName.GetData(),
libPath.GetData() );
@@ -375,7 +375,7 @@ MODULE* PCB_BASE_FRAME::loadFootprintFromLibraries(
if( aDisplayError )
{
wxString msg = wxString::Format(
- _( "Footprint '%s' not found in any library" ),
+ _( "Footprint %s not found in any library" ),
aFootprintName.GetData() );
DisplayError( NULL, msg );
@@ -574,7 +574,7 @@ void FOOTPRINT_EDIT_FRAME::OnSaveLibraryAs( wxCommandEvent& aEvent )
}
wxString msg = wxString::Format(
- _( "Footprint library\n'%s' saved as\n'%s'" ),
+ _( "Footprint library\n<%s> saved as\n<%s>" ),
GetChars( curLibPath ), GetChars( dstLibPath ) );
DisplayInfoMessage( this, msg );
diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp
index ec92189f30..590905e98e 100644
--- a/pcbnew/netlist.cpp
+++ b/pcbnew/netlist.cpp
@@ -78,7 +78,7 @@ static FILE* OpenNetlistFile( const wxString& aFullFileName )
if( file == NULL )
{
wxString msg;
- msg.Printf( _( "Netlist file %s not found" ), GetChars( aFullFileName ) );
+ msg.Printf( _( "Netlist file <%s> not found" ), GetChars( aFullFileName ) );
wxMessageBox( msg );
}
@@ -126,12 +126,12 @@ bool PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFullFilename,
if( aMessageWindow )
{
wxString msg;
- msg.Printf( _( "Reading Netlist \"%s\"" ), GetChars( aNetlistFullFilename ) );
+ msg.Printf( _( "Reading Netlist <%s>" ), GetChars( aNetlistFullFilename ) );
aMessageWindow->AppendText( msg + wxT( "\n" ) );
if( useCmpfile )
{
- msg.Printf( _( "Using component/footprint link file \"%s\"" ),
+ msg.Printf( _( "Using component/footprint link file <%s>" ),
GetChars( aCmpFullFileName ) );
aMessageWindow->AppendText( msg + wxT( "\n" ) );
}
@@ -176,7 +176,7 @@ bool PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFullFilename,
if( aDeleteExtraFootprints )
{
if( IsOK( NULL,
- _( "Ok to delete not locked footprints not found in netlist?" ) ) )
+ _( "OK to delete not locked footprints not found in netlist?" ) ) )
netList_Reader.RemoveExtraFootprints();
}
diff --git a/pcbnew/netlist_reader_common.cpp b/pcbnew/netlist_reader_common.cpp
index 24462bd5e7..f0cc2c58bc 100644
--- a/pcbnew/netlist_reader_common.cpp
+++ b/pcbnew/netlist_reader_common.cpp
@@ -256,7 +256,7 @@ void NETLIST_READER::TestFootprintsMatchingAndExchange()
else if( m_messageWindow )
{
wxString msg;
- msg.Printf( _( "Component \"%s\": module [%s] not found\n" ),
+ msg.Printf( _( "Component %s: module %s not found\n" ),
GetChars( cmp_info->m_Reference ),
GetChars( cmp_info->m_Footprint ) );
@@ -266,7 +266,7 @@ void NETLIST_READER::TestFootprintsMatchingAndExchange()
else if( m_messageWindow )
{
wxString msg;
- msg.Printf( _( "Component \"%s\": Mismatch! module is [%s] and netlist said [%s]\n" ),
+ msg.Printf( _( "Component %s: Mismatch! module is %s and netlist said %s\n" ),
GetChars( cmp_info->m_Reference ),
GetChars( module->GetLibRef() ),
GetChars( cmp_info->m_Footprint ) );
@@ -323,7 +323,7 @@ int NETLIST_READER::SetPadsNetName( const wxString & aModule, const wxString & a
if( m_messageWindow )
{
wxString msg;
- msg.Printf( _( "Module [%s]: Pad [%s] not found" ),
+ msg.Printf( _( "Module %s: Pad %s not found" ),
GetChars( aModule ), GetChars( aPadname ) );
m_messageWindow->AppendText( msg + wxT( "\n" ) );
}
@@ -564,7 +564,7 @@ bool NETLIST_READER::loadNewModules()
if( m_messageWindow )
{
wxString msg;
- msg.Printf( _( "Component [%s]: footprint <%s> not found" ),
+ msg.Printf( _( "Component %s: footprint %s not found" ),
GetChars( cmp_info->m_Reference ),
GetChars( cmp_info->m_Footprint ) );
diff --git a/pcbnew/netlist_reader_firstformat.cpp b/pcbnew/netlist_reader_firstformat.cpp
index fd3da7cfd8..c98b1eb122 100644
--- a/pcbnew/netlist_reader_firstformat.cpp
+++ b/pcbnew/netlist_reader_firstformat.cpp
@@ -279,7 +279,7 @@ void* NETLIST_READER::ReadOldFmtNetlistModuleDescr( char* aText, bool aBuildList
if( m_messageWindow )
{
wxString msg;
- msg.Printf( _( "Component [%s] not found" ), GetChars( cmpReference ) );
+ msg.Printf( _( "Component %s not found" ), GetChars( cmpReference ) );
m_messageWindow->AppendText( msg + wxT( "\n" ) );
}
}
@@ -334,7 +334,7 @@ bool NETLIST_READER::SetPadNetName( char* aText )
if( m_messageWindow )
{
wxString msg;
- msg.Printf( _( "Module [%s]: Pad [%s] not found" ),
+ msg.Printf( _( "Module %s: Pad %s not found" ),
GetChars( m_currModule->GetReference() ),
GetChars( pinName ) );
m_messageWindow->AppendText( msg + wxT( "\n" ) );
diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp
index aa9e169ebf..0e42cfd2a5 100644
--- a/pcbnew/onleftclick.cpp
+++ b/pcbnew/onleftclick.cpp
@@ -245,7 +245,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
if( IsCopperLayer( getActiveLayer() ) )
{
- DisplayError( this, _( "Graphic not authorized on Copper layers" ) );
+ DisplayError( this, _( "Graphic not allowed on Copper layers" ) );
break;
}
@@ -368,7 +368,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
case ID_PCB_DIMENSION_BUTT:
if( IsCopperLayer( getActiveLayer() ) )
{
- DisplayError( this, _( "Dimension not authorized on Copper layers" ) );
+ DisplayError( this, _( "Dimension not allowed on Copper layers" ) );
break;
}
diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp
index 39dda89adb..0383a5e797 100644
--- a/pcbnew/pcb_parser.cpp
+++ b/pcbnew/pcb_parser.cpp
@@ -89,7 +89,7 @@ double PCB_PARSER::parseDouble() throw( IO_ERROR )
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" ),
GetChars( CurSource() ), CurLineNumber(), CurOffset() );
THROW_IO_ERROR( error );
@@ -98,7 +98,7 @@ double PCB_PARSER::parseDouble() throw( IO_ERROR )
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" ),
GetChars( CurSource() ), CurLineNumber(), CurOffset() );
THROW_IO_ERROR( error );
@@ -754,7 +754,7 @@ T PCB_PARSER::lookUpLayer( const M& aMap ) throw( PARSE_ERROR, IO_ERROR )
#endif
wxString error = wxString::Format(
- _( "Layer '%s' in file <%s> at line %d, position %d, was not defined in the layers section" ),
+ _( "Layer %s in file <%s> at line %d, position %d, was not defined in the layers section" ),
GetChars( FROM_UTF8( CurText() ) ), GetChars( CurSource() ),
CurLineNumber(), CurOffset() );
@@ -1128,7 +1128,7 @@ void PCB_PARSER::parseNETCLASS() throw( IO_ERROR, PARSE_ERROR )
// auto_ptr will delete nc on this code path
wxString error;
- error.Printf( _( "duplicate NETCLASS name '%s' in file %s at line %d, offset %d" ),
+ 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 );
}
diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp
index 1a508a4265..17004e252c 100644
--- a/pcbnew/pcbplot.cpp
+++ b/pcbnew/pcbplot.cpp
@@ -153,7 +153,7 @@ bool EnsureOutputDirectory( wxFileName *aOutputDir,
if( !aOutputDir->MakeAbsolute( boardFilePath ) )
{
wxString msg;
- msg.Printf( _( "Cannot make %s absolute with respect to %s!" ),
+ msg.Printf( _( "Cannot make <%s> absolute with respect to <%s>!" ),
GetChars( aOutputDir->GetPath() ),
GetChars( boardFilePath ) );
wxMessageBox( msg, _( "Plot" ), wxOK | wxICON_ERROR );
@@ -168,9 +168,9 @@ bool EnsureOutputDirectory( wxFileName *aOutputDir,
if( aMessageBox )
{
wxString msg;
- msg.Printf( _( "Directory %s created.\n" ), GetChars( outputPath ) );
+ msg.Printf( _( "Directory <%s> created.\n" ), GetChars( outputPath ) );
aMessageBox->AppendText( msg );
- return true;
+ return true;
}
}
else
diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp
index de4fe71b55..8b751fb538 100644
--- a/pcbnew/specctra_export.cpp
+++ b/pcbnew/specctra_export.cpp
@@ -964,7 +964,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR )
if( module->GetReference() == wxEmptyString )
{
- ThrowIOError( _("Component with value of \"%s\" has empty reference id."),
+ ThrowIOError( _("Component with value of %s has empty reference id."),
GetChars( module->GetValue() ) );
}
@@ -972,7 +972,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR )
STRINGSET_PAIR refpair = refs.insert( TO_UTF8( module->GetReference() ) );
if( !refpair.second ) // insert failed
{
- ThrowIOError( _("Multiple components have identical reference IDs of \"%s\"."),
+ ThrowIOError( _("Multiple components have identical reference IDs of %s."),
GetChars( module->GetReference() ) );
}
}
diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp
index cff88fb8e4..f0290bec13 100644
--- a/pcbnew/xchgmod.cpp
+++ b/pcbnew/xchgmod.cpp
@@ -192,7 +192,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference,
{
if( ShowError )
{
- msg.Printf( _( "file %s not found" ), GetChars( fn.GetFullPath() ) );
+ msg.Printf( _( "file <%s> not found" ), GetChars( fn.GetFullPath() ) );
m_WinMessages->AppendText( msg );
}
@@ -207,7 +207,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference,
{
if( ShowError )
{
- msg.Printf( _( "Unable to create file %s" ),
+ msg.Printf( _( "Unable to create file <%s>" ),
GetChars( tmpFileName.GetFullPath() ) );
m_WinMessages->AppendText( msg );
}
@@ -323,14 +323,14 @@ void DIALOG_EXCHANGE_MODULE::Change_ModuleId( bool aUseValue )
{
check_module_value = true;
value = m_CurrentModule->GetValue();
- msg.Printf( _( "Change modules <%s> -> <%s> (val = %s)?" ),
+ msg.Printf( _( "Change modules %s -> %s (for value = %s)?" ),
GetChars( m_CurrentModule->GetLibRef() ),
GetChars( newmodulename ),
GetChars( m_CurrentModule->GetValue() ) );
}
else
{
- msg.Printf( _( "Change modules <%s> -> <%s> ?" ),
+ msg.Printf( _( "Change modules %s -> %s ?" ),
GetChars( lib_reference ), GetChars( newmodulename ) );
}
@@ -462,7 +462,7 @@ bool DIALOG_EXCHANGE_MODULE::Change_1_Module( MODULE* Module,
namecmp = new_module;
/* Load module. */
- line.Printf( _( "Change module %s (%s) " ),
+ line.Printf( _( "Change module %s (from %s) " ),
GetChars( Module->GetReference() ),
GetChars( oldnamecmp ) );
m_WinMessages->AppendText( line );
@@ -480,7 +480,7 @@ bool DIALOG_EXCHANGE_MODULE::Change_1_Module( MODULE* Module,
if( Module == m_CurrentModule )
m_CurrentModule = NewModule;
- m_WinMessages->AppendText( wxT( "Ok\n" ) );
+ m_WinMessages->AppendText( wxT( "OK\n" ) );
m_Parent->Exchange_Module( Module, NewModule, aUndoPickList );