diff --git a/3d-viewer/3d_canvas/board_adapter.cpp b/3d-viewer/3d_canvas/board_adapter.cpp index 11a7e2d2e9..3adf4ee0ee 100644 --- a/3d-viewer/3d_canvas/board_adapter.cpp +++ b/3d-viewer/3d_canvas/board_adapter.cpp @@ -472,7 +472,7 @@ bool BOARD_ADAPTER::createBoardPolygon( wxString* aErrorMsg ) success = m_board->GetBoardPolygonOutlines( m_board_poly, &msg ); if( aErrorMsg ) - *aErrorMsg = _( "Board outline is not closed: " ) + msg; + *aErrorMsg = _( "Board outline is not closed:" ) + wxS( " " )+ msg; } return success; diff --git a/bitmap2component/bitmap2cmp_gui.cpp b/bitmap2component/bitmap2cmp_gui.cpp index cc0c95f863..5c5c13f538 100644 --- a/bitmap2component/bitmap2cmp_gui.cpp +++ b/bitmap2component/bitmap2cmp_gui.cpp @@ -328,7 +328,7 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) path = m_mruPath; wxFileDialog fileDlg( this, _( "Choose Image" ), path, wxEmptyString, - _( "Image Files " ) + wxImage::GetImageExtWildcard(), + _( "Image Files" ) + wxS( " " )+ wxImage::GetImageExtWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST ); int diag = fileDlg.ShowModal(); diff --git a/common/dialogs/panel_color_settings.cpp b/common/dialogs/panel_color_settings.cpp index 3702774835..9cb76ac55b 100644 --- a/common/dialogs/panel_color_settings.cpp +++ b/common/dialogs/panel_color_settings.cpp @@ -210,7 +210,7 @@ void PANEL_COLOR_SETTINGS::createThemeList( const wxString& aCurrent ) wxString name = settings->GetName(); if( settings->IsReadOnly() ) - name += _( " (read-only)" ); + name += wxS( " " ) + _( "(read-only)" ); int pos = m_cbTheme->Append( name, static_cast( settings ) ); diff --git a/common/dialogs/wx_html_report_panel.cpp b/common/dialogs/wx_html_report_panel.cpp index d82210c470..fcd32e60f0 100644 --- a/common/dialogs/wx_html_report_panel.cpp +++ b/common/dialogs/wx_html_report_panel.cpp @@ -176,14 +176,14 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine ) switch( aLine.severity ) { case RPT_SEVERITY_ERROR: - retv = "" + _( "Error: " ) + "" + retv = "" + _( "Error:" ) + " " "" + aLine.message + "
"; break; case RPT_SEVERITY_WARNING: - retv = "" + _( "Warning: " ) + aLine.message + "
"; + retv = "" + _( "Warning:" ) + wxS( " " )+ aLine.message + "
"; break; case RPT_SEVERITY_INFO: - retv = "" + _( "Info: " ) + aLine.message + "
"; + retv = "" + _( "Info:" ) + wxS( " " )+ aLine.message + "
"; break; case RPT_SEVERITY_ACTION: retv = "" + aLine.message + "
"; @@ -201,11 +201,11 @@ wxString WX_HTML_REPORT_PANEL::generatePlainText( const REPORT_LINE& aLine ) switch( aLine.severity ) { case RPT_SEVERITY_ERROR: - return _( "Error: " ) + aLine.message + wxT( "\n" ); + return _( "Error:" ) + wxS( " " )+ aLine.message + wxT( "\n" ); case RPT_SEVERITY_WARNING: - return _( "Warning: " ) + aLine.message + wxT( "\n" ); + return _( "Warning:" ) + wxS( " " )+ aLine.message + wxT( "\n" ); case RPT_SEVERITY_INFO: - return _( "Info: " ) + aLine.message + wxT( "\n" ); + return _( "Info:" ) + wxS( " " )+ aLine.message + wxT( "\n" ); default: return aLine.message + wxT( "\n" ); } diff --git a/common/eda_size_ctrl.cpp b/common/eda_size_ctrl.cpp index 42e32b32a2..d076cbfcee 100644 --- a/common/eda_size_ctrl.cpp +++ b/common/eda_size_ctrl.cpp @@ -35,13 +35,13 @@ EDA_POSITION_CTRL::EDA_POSITION_CTRL( wxWindow* parent, const wxString& title, c { m_UserUnit = user_unit; - m_TextX = new wxStaticText( parent, -1, title + _( " X:" ) ); + m_TextX = new wxStaticText( parent, -1, title + wxS( " " ) + _( "X:" ) ); BoxSizer->Add( m_TextX, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); m_FramePosX = new wxTextCtrl( parent, -1, wxEmptyString, wxDefaultPosition ); BoxSizer->Add( m_FramePosX, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); - m_TextY = new wxStaticText( parent, -1, title + _( " Y:" ) ); + m_TextY = new wxStaticText( parent, -1, title + wxS( " " ) + _( "Y:" ) ); BoxSizer->Add( m_TextY, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); m_FramePosY = new wxTextCtrl( parent, -1, wxEmptyString ); diff --git a/common/filename_resolver.cpp b/common/filename_resolver.cpp index 1ad6a0bc2a..c8df9f9004 100644 --- a/common/filename_resolver.cpp +++ b/common/filename_resolver.cpp @@ -482,10 +482,10 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath ) wxString msg = _( "Alias: " ); msg.append( tpath.m_alias ); msg.append( wxT( "\n" ) ); - msg.append( _( "This path: " ) ); + msg.append( _( "This path:" ) + wxS( " " )); msg.append( tpath.m_pathvar ); msg.append( wxT( "\n" ) ); - msg.append( _( "Existing path: " ) ); + msg.append( _( "Existing path:" ) + wxS( " " )); msg.append( sPL->m_pathvar ); wxMessageBox( msg, _( "Bad alias (duplicate name)" ) ); diff --git a/common/settings/color_settings.cpp b/common/settings/color_settings.cpp index 88279b7a07..3c9591bfeb 100644 --- a/common/settings/color_settings.cpp +++ b/common/settings/color_settings.cpp @@ -309,7 +309,7 @@ bool COLOR_SETTINGS::migrateSchema0to1() fpsettings->erase( "fpedit" ); fpsettings->Load(); - fpsettings->SetName( fpsettings->GetName() + _( " (Footprints)" ) ); + fpsettings->SetName( fpsettings->GetName() + wxS( " " ) + _( "(Footprints)" ) ); m_manager->Save( fpsettings ); // Now we can get rid of our own copy diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 18abd308fe..04c6cd0dfd 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -310,7 +310,7 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) GetToolManager()->RunAction( EE_ACTIONS::updateNetHighlighting, true ); - SetStatusText( _( "Selected net: " ) + UnescapeString( netName ) ); + SetStatusText( _( "Selected net:" ) + wxS( " " ) + UnescapeString( netName ) ); return; } diff --git a/eeschema/dialogs/panel_eeschema_color_settings.cpp b/eeschema/dialogs/panel_eeschema_color_settings.cpp index 8defc20c10..4e6e77a820 100644 --- a/eeschema/dialogs/panel_eeschema_color_settings.cpp +++ b/eeschema/dialogs/panel_eeschema_color_settings.cpp @@ -200,7 +200,7 @@ void PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches() wxString name = LayerName( layer ); if( layer == LAYER_SCHEMATIC_GRID_AXES ) - name += _( " (symbol editor only)" ); + name += wxS( " " ) + _( "(symbol editor only)" ); createSwatch( layer, name ); } diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index a689880d49..fa74edf5bd 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1187,7 +1187,7 @@ void SCH_EDIT_FRAME::UpdateTitle() if( fn.FileExists() ) { if( !fn.IsFileWritable() ) - append = _( "[Read Only] " ); + append = _( "[Read Only]" ) + wxS( " " ); } else append = nofile; diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index bd33ffc60a..6fa52f58ef 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -169,7 +169,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) { if( m_id == SHEETFILENAME ) - text = _( "File: " ) + text; + text = _( "File:" ) + wxS( " " )+ text; } return text; diff --git a/eeschema/symbol_tree_synchronizing_adapter.cpp b/eeschema/symbol_tree_synchronizing_adapter.cpp index 7f8cbbf821..b3db89e1da 100644 --- a/eeschema/symbol_tree_synchronizing_adapter.cpp +++ b/eeschema/symbol_tree_synchronizing_adapter.cpp @@ -246,7 +246,7 @@ void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue( wxVariant& aVariant, wxDataVie if( node->m_Type == LIB_TREE_NODE::LIB ) { if( !m_libMgr->IsLibraryLoaded( node->m_Name ) ) - aVariant = _( "(failed to load) " ) + aVariant.GetString(); + aVariant = _( "(failed to load)" ) + wxS( " " ) + aVariant.GetString(); } break; diff --git a/eeschema/tools/ee_inspection_tool.cpp b/eeschema/tools/ee_inspection_tool.cpp index 26d037555b..95e72f4e10 100644 --- a/eeschema/tools/ee_inspection_tool.cpp +++ b/eeschema/tools/ee_inspection_tool.cpp @@ -151,30 +151,61 @@ void EE_INSPECTION_TOOL::checkPart( LIB_PART* aPart ) dup_error++; - /* TODO I dare someone to find a way to make happy translators on this thing! Lorenzo */ - - msg = wxString::Format( _( "Duplicate pin %s \"%s\" at location (%.3f, %.3f)" - " conflicts with pin %s \"%s\" at location (%.3f, %.3f)" ), - next->GetNumber(), - next->GetName(), - next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0, - pin->GetNumber(), - pin->GetName(), - pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 ); - - if( aPart->GetUnitCount() > 1 ) + if( aPart->HasConversion() && next->GetConvert() ) { - msg += wxString::Format( _( " in units %c and %c" ), - 'A' + next->GetUnit() - 1, - 'A' + pin->GetUnit() - 1 ); - } - - if( aPart->HasConversion() ) - { - if( next->GetConvert() ) - msg += _( " of converted" ); + if( aPart->GetUnitCount() <= 1 ) + { + msg = wxString::Format( _( "Duplicate pin %s \"%s\" at location (%.3f, %.3f)" + " conflicts with pin %s \"%s\" at location (%.3f, %.3f) of converted" ), + next->GetNumber(), + next->GetName(), + next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0, + pin->GetNumber(), + pin->GetName(), + pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 ); + } else - msg += _( " of normal" ); + { + msg = wxString::Format( _( "Duplicate pin %s \"%s\" at location (%.3f, %.3f)" + " conflicts with pin %s \"%s\" at location (%.3f, %.3f)" + " in units %c and %c of converted" ), + next->GetNumber(), + next->GetName(), + next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0, + pin->GetNumber(), + pin->GetName(), + pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0, + 'A' + next->GetUnit() - 1, + 'A' + pin->GetUnit() - 1 ); + } + } + else + { + if( aPart->GetUnitCount() <= 1 ) + { + msg = wxString::Format( _( "Duplicate pin %s \"%s\" at location (%.3f, %.3f)" + " conflicts with pin %s \"%s\" at location (%.3f, %.3f)" ), + next->GetNumber(), + next->GetName(), + next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0, + pin->GetNumber(), + pin->GetName(), + pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 ); + } + else + { + msg = wxString::Format( _( "Duplicate pin %s \"%s\" at location (%.3f, %.3f)" + " conflicts with pin %s \"%s\" at location (%.3f, %.3f)" + " in units %c and %c" ), + next->GetNumber(), + next->GetName(), + next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0, + pin->GetNumber(), + pin->GetName(), + pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0, + 'A' + next->GetUnit() - 1, + 'A' + pin->GetUnit() - 1 ); + } } msg += wxT( ".
" ); @@ -200,14 +231,14 @@ void EE_INSPECTION_TOOL::checkPart( LIB_PART* aPart ) pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 ); if( aPart->GetUnitCount() > 1 ) - msg += wxString::Format( _( " in symbol %c" ), 'A' + pin->GetUnit() - 1 ); + msg += wxString::Format( wxS( " " ) + _( "in symbol %c" ), 'A' + pin->GetUnit() - 1 ); if( aPart->HasConversion() ) { if( pin->GetConvert() ) - msg += _( " of converted" ); + msg += wxS( " " ) + _( "of converted" ); else - msg += _( " of normal" ); + msg += wxS( " " ) + _( "of normal" ); } msg += wxT( ".
" ); diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index e4db42a488..5e9b5cd288 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -379,7 +379,7 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent ) { m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true ); wxFileDialog dlg( m_frame, _( "Choose Image" ), wxEmptyString, wxEmptyString, - _( "Image Files " ) + wxImage::GetImageExtWildcard(), wxFD_OPEN ); + _( "Image Files" ) + wxS( " " ) + wxImage::GetImageExtWildcard(), wxFD_OPEN ); if( dlg.ShowModal() != wxID_OK ) continue; diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 87b8c89176..c4cb46f855 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -459,7 +459,7 @@ int SCH_EDITOR_CONTROL::FindNext( const TOOL_EVENT& aEvent ) : _( "Reached end of sheet." ); // Show the popup during the time period the user can wrap the search - m_frame->ShowFindReplaceStatus( msg + _( " Find again to wrap around to the start." ), + m_frame->ShowFindReplaceStatus( msg + wxS( " " ) + _( "Find again to wrap around to the start." ), 4000 ); wrapAroundTimer.StartOnce( 4000 ); } diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 6d34eb44b2..f2ac6f309b 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -664,7 +664,7 @@ void GERBVIEW_FRAME::UpdateTitleAndInfo() title.Printf( wxT( "%s%s \u2014 " ) + _( "GerbView" ), filename.GetFullName(), - gerber->m_IsX2_file ? _( " (with X2 attributes)" ) + gerber->m_IsX2_file ? wxS( " " ) + _( "(with X2 attributes)" ) : wxString( wxEmptyString ) ); SetTitle( title ); diff --git a/gerbview/toolbars_gerber.cpp b/gerbview/toolbars_gerber.cpp index 4793a4148a..8a83dad23f 100644 --- a/gerbview/toolbars_gerber.cpp +++ b/gerbview/toolbars_gerber.cpp @@ -116,10 +116,10 @@ void GERBVIEW_FRAME::ReCreateAuxiliaryToolbar() ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE ); if( !m_cmpText ) - m_cmpText = new wxStaticText( m_auxiliaryToolBar, wxID_ANY, _( "Cmp: ") ); + m_cmpText = new wxStaticText( m_auxiliaryToolBar, wxID_ANY, _( "Cmp:" ) + wxS( " " ) ); m_SelComponentBox->SetToolTip( _("Highlight items belonging to this component") ); - m_cmpText->SetLabel( _( "Cmp: ") ); // can change when changing the language + m_cmpText->SetLabel( _( "Cmp:" ) + wxS( " " ) ); // can change when changing the language m_auxiliaryToolBar->AddControl( m_cmpText ); m_auxiliaryToolBar->AddControl( m_SelComponentBox ); m_auxiliaryToolBar->AddSpacer( 5 ); diff --git a/kicad/kicad_manager_frame.cpp b/kicad/kicad_manager_frame.cpp index a63e5b2b2c..95bf5bcba9 100644 --- a/kicad/kicad_manager_frame.cpp +++ b/kicad/kicad_manager_frame.cpp @@ -601,7 +601,7 @@ void KICAD_MANAGER_FRAME::ProjectChanged() title += fn.GetName(); if( !fn.IsDirWritable() ) - title += _( " [Read Only]" ); + title += wxS( " " ) + _( "[Read Only]" ); title += wxS(" \u2014 "); } diff --git a/kicad/project_template.cpp b/kicad/project_template.cpp index d70acb5c16..1ff8d1b0b5 100644 --- a/kicad/project_template.cpp +++ b/kicad/project_template.cpp @@ -49,12 +49,12 @@ PROJECT_TEMPLATE::PROJECT_TEMPLATE( const wxString& aPath ) if( !wxFileName::DirExists( m_basePath.GetPath() ) ) { // Error, the path doesn't exist! - m_title = _( "Could open the template path! " ) + aPath; + m_title = _( "Could open the template path!" ) + wxS( " " ) + aPath; } else if( !wxFileName::DirExists( m_metaPath.GetPath() ) ) { // Error, the meta information directory doesn't exist! - m_title = _( "Couldn't open the meta information directory for this template! " ) + + m_title = _( "Couldn't open the meta information directory for this template!" ) + wxS( " " ) + m_metaPath.GetPath(); } else if( !wxFileName::FileExists( m_metaHtmlFile.GetFullPath() ) ) diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 71e4b838df..54df0abbf0 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -843,7 +843,7 @@ WS_DATA_ITEM* PL_EDITOR_FRAME::AddPageLayoutItem( int aType ) case WS_DATA_ITEM::WS_BITMAP: { wxFileDialog fileDlg( this, _( "Choose Image" ), wxEmptyString, wxEmptyString, - _( "Image Files " ) + wxImage::GetImageExtWildcard(), wxFD_OPEN ); + _( "Image Files" ) + wxS( " " ) + wxImage::GetImageExtWildcard(), wxFD_OPEN ); if( fileDlg.ShowModal() != wxID_OK ) return NULL; diff --git a/pcbnew/class_board_item.cpp b/pcbnew/class_board_item.cpp index 70ac8beec9..cf3cd8a97d 100644 --- a/pcbnew/class_board_item.cpp +++ b/pcbnew/class_board_item.cpp @@ -90,7 +90,7 @@ wxString BOARD_ITEM::LayerMaskDescribe() const wxString layerInfo = board->GetLayerName( static_cast( bit ) ); if( testLayers.count() > 1 ) - layerInfo << _( " and others" ); + layerInfo << wxS( " " ) + _( "and others" ); return layerInfo; } diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 23ad0a2b5a..946f182f3f 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -772,7 +772,7 @@ void MODULE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector %s %s %s\n", Change.OldRefDesString, Change.NewRefDes, ActionMessage[Change.Action], - UpdateRefDes != Change.Action ? _( " will be ignored" ) : wxString("") ); + UpdateRefDes != Change.Action ? wxS( " " ) + _( "will be ignored" ) : wxString("") ); } ShowReport( message, RPT_SEVERITY_INFO ); @@ -932,6 +934,6 @@ RefDesChange* DIALOG_BOARD_REANNOTATE::GetNewRefDes( MODULE* aMod ) if( aMod->m_Uuid == m_ChangeArray[i].Uuid ) return ( &m_ChangeArray[i] ); - ShowReport( _( "Module not found in changelist " ) + aMod->GetReference(), RPT_SEVERITY_ERROR ); + ShowReport( _( "Module not found in changelist" ) + wxS( " " )+ aMod->GetReference(), RPT_SEVERITY_ERROR ); return nullptr; //Should never happen } diff --git a/pcbnew/dialogs/dialog_board_statistics.cpp b/pcbnew/dialogs/dialog_board_statistics.cpp index 5e4004367b..44519a452c 100644 --- a/pcbnew/dialogs/dialog_board_statistics.cpp +++ b/pcbnew/dialogs/dialog_board_statistics.cpp @@ -643,35 +643,35 @@ void DIALOG_BOARD_STATISTICS::saveReportClicked( wxCommandEvent& aEvent ) } msg << _( "PCB statistics report\n=====================" ) << "\n"; - msg << _( "- Date: " ) << wxDateTime::Now().Format() << "\n"; - msg << _( "- Project: " ) << Prj().GetProjectName() << "\n"; - msg << _( "- Board name: " ) << boardName << "\n"; + msg << wxS( "- " ) << _( "Date" ) << wxS( ": " ) << wxDateTime::Now().Format() << "\n"; + msg << wxS( "- " ) << _( "Project" ) << wxS( ": " )<< Prj().GetProjectName() << "\n"; + msg << wxS( "- " ) << _( "Board name" ) << wxS( ": " )<< boardName << "\n"; msg << "\n"; - msg << _( "Board\n-----" ) << "\n"; + msg << _( "Board" ) << "\n-----\n"; if( m_hasOutline ) { - msg << _( "- Width: " ) << MessageTextFromValue( GetUserUnits(), m_boardWidth ) << "\n"; - msg << _( "- Height: " ) << MessageTextFromValue( GetUserUnits(), m_boardHeight ) << "\n"; - msg << _( "- Area: " ) << MessageTextFromValue( GetUserUnits(), m_boardArea, true, EDA_DATA_TYPE::AREA ); + msg << wxS( "- " ) << _( "Width" ) << wxS( ": " ) << MessageTextFromValue( GetUserUnits(), m_boardWidth ) << "\n"; + msg << wxS( "- " ) << _( "Height" ) << wxS( ": " )<< MessageTextFromValue( GetUserUnits(), m_boardHeight ) << "\n"; + msg << wxS( "- " ) << _( "Area" ) + wxS( ": " ) << MessageTextFromValue( GetUserUnits(), m_boardArea, true, EDA_DATA_TYPE::AREA ); msg << "\n"; } else { - msg << _( "- Width: " ) << _( "unknown" ) << "\n"; - msg << _( "- Height: " ) << _( "unknown" ) << "\n"; - msg << _( "- Area: " ) << _( "unknown" ) << "\n"; + msg << wxS( "- " ) << _( "Width" ) << wxS( ": " ) << _( "unknown" ) << "\n"; + msg << wxS( "- " ) << _( "Height" ) << wxS( ": " ) << _( "unknown" ) << "\n"; + msg << wxS( "- " ) << _( "Area" ) << wxS( ": " ) << _( "unknown" ) << "\n"; } msg << "\n"; - msg << _( "Pads\n----" ) << "\n"; + msg << _( "Pads" ) << "\n----\n"; for( auto& type : m_padsTypes ) msg << "- " << type.title << " " << type.qty << "\n"; msg << "\n"; - msg << _( "Vias\n----" ) << "\n"; + msg << _( "Vias" ) << "\n----\n"; for( auto& type : m_viasTypes ) msg << "- " << type.title << " " << type.qty << "\n"; @@ -707,13 +707,13 @@ void DIALOG_BOARD_STATISTICS::saveReportClicked( wxCommandEvent& aEvent ) //Write components amount to file msg << "\n"; - msg << _( "Components\n----------" ) << "\n"; + msg << _( "Components" ) << "\n----------\n"; msg << "\n"; printGridToStringAsTable( m_gridComponents, msg, false, false, true ); msg << "\n"; - msg << _( "Drill holes\n-----------" ) << "\n"; + msg << _( "Drill holes" ) << "\n-----------\n"; msg << "\n"; printGridToStringAsTable( m_gridDrills, msg, false, true, false ); diff --git a/pcbnew/dialogs/dialog_export_idf.cpp b/pcbnew/dialogs/dialog_export_idf.cpp index 9f1c765a83..9bc8769bdc 100644 --- a/pcbnew/dialogs/dialog_export_idf.cpp +++ b/pcbnew/dialogs/dialog_export_idf.cpp @@ -220,7 +220,7 @@ void PCB_EDIT_FRAME::OnExportIDF3( wxCommandEvent& event ) if( !Export_IDF3( GetBoard(), fullFilename, thou, aXRef, aYRef ) ) { - wxString msg = _( "Unable to create " ) + fullFilename; + wxString msg = wxString::Format( _( "Unable to create %s" ), fullFilename ); wxMessageBox( msg ); return; } diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index a92c7e8727..2d759ab256 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -703,27 +703,27 @@ void DIALOG_PAD_PROPERTIES::displayPrimitivesList() for( wxString& s : bs_info ) s.Empty(); - bs_info[4] = _( "width " ) + MessageTextFromValue( m_units, primitive->GetWidth() ); + bs_info[4] = _( "width" ) + wxS( " " )+ MessageTextFromValue( m_units, primitive->GetWidth() ); switch( primitive->GetShape() ) { case S_SEGMENT: // usual segment : line with rounded ends bs_info[0] = _( "Segment" ); - bs_info[1] = _( "from " ) + formatCoord( m_units, primitive->GetStart() ); - bs_info[2] = _( "to " ) + formatCoord( m_units, primitive->GetEnd() ); + bs_info[1] = _( "from" ) + wxS( " " )+ formatCoord( m_units, primitive->GetStart() ); + bs_info[2] = _( "to" ) + wxS( " " )+ formatCoord( m_units, primitive->GetEnd() ); break; case S_CURVE: // Bezier segment bs_info[0] = _( "Bezier" ); - bs_info[1] = _( "from " ) + formatCoord( m_units, primitive->GetStart() ); - bs_info[2] = _( "to " ) + formatCoord( m_units, primitive->GetEnd() ); + bs_info[1] = _( "from" ) + wxS( " " )+ formatCoord( m_units, primitive->GetStart() ); + bs_info[2] = _( "to" ) + wxS( " " )+ formatCoord( m_units, primitive->GetEnd() ); break; case S_ARC: // Arc with rounded ends bs_info[0] = _( "Arc" ); - bs_info[1] = _( "center " ) + formatCoord( m_units, primitive->GetCenter() ); - bs_info[2] = _( "start " ) + formatCoord( m_units, primitive->GetArcStart() ); - bs_info[3] = _( "angle " ) + FormatAngle( primitive->GetAngle() ); + bs_info[1] = _( "center" ) + wxS( " " )+ formatCoord( m_units, primitive->GetCenter() ); + bs_info[2] = _( "start" ) + wxS( " " )+ formatCoord( m_units, primitive->GetArcStart() ); + bs_info[3] = _( "angle" ) + wxS( " " )+ FormatAngle( primitive->GetAngle() ); break; case S_CIRCLE: // ring or circle @@ -733,7 +733,7 @@ void DIALOG_PAD_PROPERTIES::displayPrimitivesList() bs_info[0] = _( "circle" ); bs_info[1] = formatCoord( m_units, primitive->GetStart() ); - bs_info[2] = _( "radius " ) + MessageTextFromValue( m_units, primitive->GetRadius() ); + bs_info[2] = _( "radius" ) + wxS( " " )+ MessageTextFromValue( m_units, primitive->GetRadius() ); break; case S_POLYGON: // polygon diff --git a/pcbnew/dialogs/dialog_pns_length_tuning_settings.cpp b/pcbnew/dialogs/dialog_pns_length_tuning_settings.cpp index b9917b2648..42e02f569b 100644 --- a/pcbnew/dialogs/dialog_pns_length_tuning_settings.cpp +++ b/pcbnew/dialogs/dialog_pns_length_tuning_settings.cpp @@ -90,7 +90,7 @@ bool DIALOG_PNS_LENGTH_TUNING_SETTINGS::TransferDataToWindow() case PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW: SetTitle( _( "Differential Pair Skew Tuning" ) ); m_legend->SetBitmap( KiBitmap( tune_diff_pair_skew_legend_xpm ) ); - m_targetLengthLabel->SetLabel( _( "Target skew: " ) ); + m_targetLengthLabel->SetLabel( _( "Target skew:" ) + wxS( " " ) ); m_targetLength.SetValue( m_settings.m_targetSkew ); break; diff --git a/pcbnew/drc/drc_rule_condition.cpp b/pcbnew/drc/drc_rule_condition.cpp index e8bf33087a..328c9a77c9 100644 --- a/pcbnew/drc/drc_rule_condition.cpp +++ b/pcbnew/drc/drc_rule_condition.cpp @@ -59,7 +59,7 @@ bool DRC_RULE_CONDITION::EvaluateFor( const BOARD_ITEM* aItemA, const BOARD_ITEM [&]( const wxString& aMessage, int aOffset ) { if( aReporter ) - aReporter->Report( _( "ERROR: " ) + aMessage ); + aReporter->Report( _( "ERROR:" ) + wxS( " " )+ aMessage ); } ); BOARD_ITEM* a = const_cast( aItemA ); diff --git a/pcbnew/drc/drc_test_provider_annulus.cpp b/pcbnew/drc/drc_test_provider_annulus.cpp index b4c6571a40..4f2a5d5238 100644 --- a/pcbnew/drc/drc_test_provider_annulus.cpp +++ b/pcbnew/drc/drc_test_provider_annulus.cpp @@ -118,13 +118,13 @@ bool DRC_TEST_PROVIDER_ANNULUS::Run() std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_ANNULAR_WIDTH ); if( fail_min ) - m_msg.Printf( drcItem->GetErrorText() + _( " (%s min annular width %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s min annular width %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), v_min ), MessageTextFromValue( userUnits(), annulus ) ); if( fail_max ) - m_msg.Printf( drcItem->GetErrorText() + _( " (%s max annular width %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s max annular width %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), v_max ), MessageTextFromValue( userUnits(), annulus ) ); diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp index 1e82b2c4e3..58f64e4bcb 100644 --- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp @@ -234,7 +234,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testCopperDrawItem( BOARD_ITEM* aItem ) { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_CLEARANCE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), std::max( 0, actual ) ) ); @@ -297,7 +297,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testCopperDrawItem( BOARD_ITEM* aItem ) std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_CLEARANCE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); @@ -406,7 +406,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::doTrackDrc( TRACK* aRefSeg, PCB_LAYER_I { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_CLEARANCE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); @@ -482,7 +482,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::doTrackDrc( TRACK* aRefSeg, PCB_LAYER_I { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_CLEARANCE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); @@ -580,7 +580,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::doTrackDrc( TRACK* aRefSeg, PCB_LAYER_I actual = std::max( 0, actual - halfWidth ); std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_CLEARANCE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); @@ -684,7 +684,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::doPadToPadsDrc( int aRefPadIdx, { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_SHORTING_ITEMS ); - m_msg.Printf( drcItem->GetErrorText() + _( " (nets %s and %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(nets %s and %s)" ), pad->GetNetname(), refPad->GetNetname() ); drcItem->SetErrorMessage( m_msg ); @@ -764,7 +764,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::doPadToPadsDrc( int aRefPadIdx, { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_CLEARANCE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); @@ -950,7 +950,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZones() { drcItem = DRC_ITEM::Create( DRCE_CLEARANCE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), zone2zoneClearance ), MessageTextFromValue( userUnits(), conflict.second ) ); diff --git a/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp b/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp index 817a4bed53..c4081b3e8c 100644 --- a/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp @@ -113,7 +113,7 @@ void DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testFootprintCourtyardDefinitions() std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_MALFORMED_COURTYARD ); - m_msg.Printf( drcItem->GetErrorText() + _( " (not a closed shape)" ) ); + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(not a closed shape)" ) ); drcItem->SetErrorMessage( m_msg ); drcItem->SetItems( footprint ); diff --git a/pcbnew/drc/drc_test_provider_disallow.cpp b/pcbnew/drc/drc_test_provider_disallow.cpp index bf12eab846..1193586daf 100644 --- a/pcbnew/drc/drc_test_provider_disallow.cpp +++ b/pcbnew/drc/drc_test_provider_disallow.cpp @@ -84,7 +84,7 @@ bool DRC_TEST_PROVIDER_DISALLOW::Run() { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_ALLOWED_ITEMS ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " (%s)" ), constraint.GetName() ); drcItem->SetErrorMessage( m_msg ); diff --git a/pcbnew/drc/drc_test_provider_edge_clearance.cpp b/pcbnew/drc/drc_test_provider_edge_clearance.cpp index 6c3baffc3d..2f59d20e32 100644 --- a/pcbnew/drc/drc_test_provider_edge_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_edge_clearance.cpp @@ -187,7 +187,7 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run() { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_COPPER_EDGE_CLEARANCE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); @@ -244,7 +244,7 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run() if( minClearance > 0 ) { - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); diff --git a/pcbnew/drc/drc_test_provider_hole_clearance.cpp b/pcbnew/drc/drc_test_provider_hole_clearance.cpp index a9447d5e0e..939272dade 100644 --- a/pcbnew/drc/drc_test_provider_hole_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_hole_clearance.cpp @@ -260,7 +260,7 @@ bool DRC_TEST_PROVIDER_HOLE_CLEARANCE::doPadToPadHoleDrc( int aRefPadIdx, { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_HOLE_CLEARANCE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); @@ -294,7 +294,7 @@ bool DRC_TEST_PROVIDER_HOLE_CLEARANCE::doPadToPadHoleDrc( int aRefPadIdx, { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_HOLE_CLEARANCE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); @@ -383,7 +383,7 @@ void DRC_TEST_PROVIDER_HOLE_CLEARANCE::testHoles2Holes() { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_DRILLED_HOLES_TOO_CLOSE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); diff --git a/pcbnew/drc/drc_test_provider_hole_size.cpp b/pcbnew/drc/drc_test_provider_hole_size.cpp index 73db8af1be..dc192c2fa3 100644 --- a/pcbnew/drc/drc_test_provider_hole_size.cpp +++ b/pcbnew/drc/drc_test_provider_hole_size.cpp @@ -140,7 +140,7 @@ void DRC_TEST_PROVIDER_HOLE_SIZE::checkPad( D_PAD* aPad ) { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_TOO_SMALL_DRILL ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minHole ), MessageTextFromValue( userUnits(), holeSize ) ); @@ -182,7 +182,7 @@ void DRC_TEST_PROVIDER_HOLE_SIZE::checkVia( VIA* via, bool aExceedMicro, bool aE { std::shared_ptr drcItem = DRC_ITEM::Create( errorCode ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minHole ), MessageTextFromValue( userUnits(), via->GetDrillValue() ) ); diff --git a/pcbnew/drc/drc_test_provider_misc.cpp b/pcbnew/drc/drc_test_provider_misc.cpp index d2ce05b764..6e940c13ea 100644 --- a/pcbnew/drc/drc_test_provider_misc.cpp +++ b/pcbnew/drc/drc_test_provider_misc.cpp @@ -89,7 +89,7 @@ void DRC_TEST_PROVIDER_MISC::testOutline() std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_INVALID_OUTLINE ); - m_msg.Printf( drcItem->GetErrorText() + _( " (not a closed shape)" ) ); + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(not a closed shape)" ) ); drcItem->SetErrorMessage( m_msg ); drcItem->SetItems( m_board ); @@ -114,7 +114,7 @@ void DRC_TEST_PROVIDER_MISC::testDisabledLayers() { std::shared_ptrdrcItem = DRC_ITEM::Create( DRCE_DISABLED_LAYER_ITEM ); - m_msg.Printf( drcItem->GetErrorText() + _( " (layer %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(layer %s)" ), item->GetLayerName() ); drcItem->SetErrorMessage( m_msg ); diff --git a/pcbnew/drc/drc_test_provider_silk_clearance.cpp b/pcbnew/drc/drc_test_provider_silk_clearance.cpp index b04522b9c5..7ff6eee623 100644 --- a/pcbnew/drc/drc_test_provider_silk_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_silk_clearance.cpp @@ -168,7 +168,7 @@ bool DRC_TEST_PROVIDER_SILK_CLEARANCE::Run() if( minClearance > 0 ) { - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetParentRule()->m_Name, MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); diff --git a/pcbnew/drc/drc_test_provider_silk_to_mask.cpp b/pcbnew/drc/drc_test_provider_silk_to_mask.cpp index 61cf8a5363..78bcdaea33 100644 --- a/pcbnew/drc/drc_test_provider_silk_to_mask.cpp +++ b/pcbnew/drc/drc_test_provider_silk_to_mask.cpp @@ -150,7 +150,7 @@ bool DRC_TEST_PROVIDER_SILK_TO_MASK::Run() if( minClearance > 0 ) { - m_msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); diff --git a/pcbnew/drc/drc_test_provider_track_width.cpp b/pcbnew/drc/drc_test_provider_track_width.cpp index 07bf38d05e..3e2a744a8f 100644 --- a/pcbnew/drc/drc_test_provider_track_width.cpp +++ b/pcbnew/drc/drc_test_provider_track_width.cpp @@ -123,11 +123,20 @@ bool DRC_TEST_PROVIDER_TRACK_WIDTH::Run() { std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_TRACK_WIDTH ); - m_msg.Printf( drcItem->GetErrorText() + _( " (%s %s width %s; actual %s)" ), - constraint.GetName(), - fail_min ? _( "min" ) : _( "max" ), - MessageTextFromValue( userUnits(), constraintWidth ), - MessageTextFromValue( userUnits(), actual ) ); + if( fail_min ) + { + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s min width %s; actual %s)" ), + constraint.GetName(), + MessageTextFromValue( userUnits(), constraintWidth ), + MessageTextFromValue( userUnits(), actual ) ); + } + else + { + m_msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s max width %s; actual %s)" ), + constraint.GetName(), + MessageTextFromValue( userUnits(), constraintWidth ), + MessageTextFromValue( userUnits(), actual ) ); + } drcItem->SetErrorMessage( m_msg ); drcItem->SetItems( item ); diff --git a/pcbnew/drc/drc_test_provider_via_diameter.cpp b/pcbnew/drc/drc_test_provider_via_diameter.cpp index 3e620df839..4280e2cd5f 100644 --- a/pcbnew/drc/drc_test_provider_via_diameter.cpp +++ b/pcbnew/drc/drc_test_provider_via_diameter.cpp @@ -108,14 +108,14 @@ bool DRC_TEST_PROVIDER_VIA_DIAMETER::Run() if( fail_min ) { - m_msg.Printf( _( " (%s min diameter %s; actual %s)" ), + m_msg.Printf( wxS( " " ) + _( "(%s min diameter %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), constraintDiameter ), MessageTextFromValue( userUnits(), actual ) ); } else if( fail_max ) { - m_msg.Printf( _( " (%s max diameter %s; actual %s)" ), + m_msg.Printf( wxS( " " ) + _( "(%s max diameter %s; actual %s)" ), constraint.GetName(), MessageTextFromValue( userUnits(), constraintDiameter ), MessageTextFromValue( userUnits(), actual ) ); diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index 3369312d0b..fe48d054b7 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -712,7 +712,7 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() // Note: don't used GetLoadedFPID(); footprint name may have been edited title += wxString::Format( wxT( "%s %s\u2014 " ), FROM_UTF8( GetBoard()->GetFirstModule()->GetFPID().Format().c_str() ), - writable ? wxString( wxEmptyString ) : _( "[Read Only] " ) ); + writable ? wxString( wxEmptyString ) : _( "[Read Only]" ) + wxS( "" ) + wxS( " " )); } else if( !fpid.GetLibItemName().empty() ) { diff --git a/pcbnew/layer_widget.cpp b/pcbnew/layer_widget.cpp index 9cf2130416..6f9fc644f4 100644 --- a/pcbnew/layer_widget.cpp +++ b/pcbnew/layer_widget.cpp @@ -127,7 +127,7 @@ void LAYER_WIDGET::OnRightDownLayer( wxMouseEvent& aEvent, COLOR_SWATCH* aColorS wxMenu menu; AddMenuItem( &menu, ID_CHANGE_LAYER_COLOR, - _( "Change Layer Color for " ) + aLayerName, + _( "Change Layer Color for" ) + wxS( " " ) + aLayerName, KiBitmap( setcolor_copper_xpm ) ); menu.AppendSeparator(); @@ -177,7 +177,7 @@ void LAYER_WIDGET::OnRightDownRender( wxMouseEvent& aEvent, COLOR_SWATCH* aColor wxMenu menu; AddMenuItem( &menu, ID_CHANGE_RENDER_COLOR, - _( "Change Render Color for " ) + aRenderName, + _( "Change Render Color for" ) + wxS( " " )+ aRenderName, KiBitmap( setcolor_board_body_xpm ) ); menu.Bind( wxEVT_COMMAND_MENU_SELECTED, diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 23ede676e2..f530408173 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -1188,9 +1188,9 @@ void PCB_EDIT_FRAME::UpdateTitle() wxString fileinfo; if( fileName.IsOk() && fileName.FileExists() ) - fileinfo = fileName.IsFileWritable() ? wxString( wxEmptyString ) : _( " [Read Only]" ); + fileinfo = fileName.IsFileWritable() ? wxString( wxEmptyString ) : wxS( " " ) + _( "[Read Only]" ); else - fileinfo = _( " [Unsaved]" ); + fileinfo = wxS( " " ) + _( "[Unsaved]" ); SetTitle( wxString::Format( wxT( "%s%s \u2014 " ) + _( "Pcbnew" ), fileName.GetName(), diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 77831235ec..00894b43c9 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -335,13 +335,36 @@ protected: DIFF_PAIR_DIMENSION diffPair = bds.m_DiffPairDimensionsList[i]; wxString msg; - msg << _( "Width " ) << MessageTextFromValue( units, diffPair.m_Width ); - - if( diffPair.m_Gap > 0 ) - msg << _( ", gap " ) << MessageTextFromValue( units, diffPair.m_Gap ); - - if( diffPair.m_ViaGap > 0 ) - msg << _( ", via gap " ) << MessageTextFromValue( units, diffPair.m_ViaGap ); + if( diffPair.m_Gap <= 0 ) + { + if( diffPair.m_ViaGap <= 0 ) + { + msg.Printf( _( "Width %s" ), + MessageTextFromValue( units, diffPair.m_Width ) ); + } + else + { + msg.Printf( _( "Width %s, via gap %s " ), + MessageTextFromValue( units, diffPair.m_Width ), + MessageTextFromValue( units, diffPair.m_ViaGap ) ); + } + } + else + { + if( diffPair.m_ViaGap <= 0 ) + { + msg.Printf( _( "Width %s, gap %s" ), + MessageTextFromValue( units, diffPair.m_Width ), + MessageTextFromValue( units, diffPair.m_Gap ) ); + } + else + { + msg.Printf( _( "Width %s, gap %s, via gap %s " ), + MessageTextFromValue( units, diffPair.m_Width ), + MessageTextFromValue( units, diffPair.m_Gap ), + MessageTextFromValue( units, diffPair.m_ViaGap ) ); + } + } int menuIdx = ID_POPUP_PCB_SELECT_DIFFPAIR1 + i - 1; Append( menuIdx, msg, wxEmptyString, wxITEM_CHECK ); @@ -948,9 +971,9 @@ void ROUTER_TOOL::performRouting() if( !prepareInteractive() ) return; - auto setCursor = - [&]() - { + auto setCursor = + [&]() + { frame()->GetCanvas()->SetCurrentCursor( KICURSOR::PENCIL ); }; @@ -1135,9 +1158,9 @@ int ROUTER_TOOL::MainLoop( const TOOL_EVENT& aEvent ) if( aEvent.HasPosition() ) m_toolMgr->PrimeTool( m_startSnapPoint ); - auto setCursor = - [&]() - { + auto setCursor = + [&]() + { frame->GetCanvas()->SetCurrentCursor( KICURSOR::PENCIL ); }; @@ -1479,9 +1502,9 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent ) view()->ClearPreview(); view()->InitPreview(); - auto setCursor = - [&]() - { + auto setCursor = + [&]() + { frame()->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW ); }; diff --git a/pcbnew/tools/group_tool.cpp b/pcbnew/tools/group_tool.cpp index bcddd7d7b2..26d1595e3d 100644 --- a/pcbnew/tools/group_tool.cpp +++ b/pcbnew/tools/group_tool.cpp @@ -194,7 +194,7 @@ private: const auto& selection = selTool->GetSelection(); wxString check = board->GroupsSanityCheck(); - wxCHECK_RET( check == wxEmptyString, _( "Group is in inconsistent state: " ) + check ); + wxCHECK_RET( check == wxEmptyString, _( "Group is in inconsistent state:" ) + wxS( " " )+ check ); BOARD::GroupLegalOpsField legalOps = board->GroupLegalOps( selection ); diff --git a/pcbnew/tools/pcb_inspection_tool.cpp b/pcbnew/tools/pcb_inspection_tool.cpp index 5e51135a70..45a5b1e21f 100644 --- a/pcbnew/tools/pcb_inspection_tool.cpp +++ b/pcbnew/tools/pcb_inspection_tool.cpp @@ -294,7 +294,7 @@ int PCB_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent ) wxString s = aItem->GetSelectMenuText( r->GetUnits() ); if( auto* cItem = dynamic_cast( aItem ) ) - s += " " + wxString::Format( _( "[netclass %s]" ), cItem->GetNetClassName() ); + s += wxS( " " ) + wxString::Format( _( "[netclass %s]" ), cItem->GetNetClassName() ); return s; }; diff --git a/plugins/3d/vrml/vrml.cpp b/plugins/3d/vrml/vrml.cpp index 6929ed8524..ff7abc5f7c 100644 --- a/plugins/3d/vrml/vrml.cpp +++ b/plugins/3d/vrml/vrml.cpp @@ -216,7 +216,7 @@ SCENEGRAPH* LoadVRML( const wxString& aFileName, bool useInline ) } catch( IO_ERROR & ) { - wxLogError( _( " * [INFO] load failed: input line too long\n" ) ); + wxLogError( wxS( " * " ) + _( "[INFO] load failed: input line too long\n" ) ); return NULL; } diff --git a/qa/drc_proto/drc_test_provider_silk_to_pad.cpp b/qa/drc_proto/drc_test_provider_silk_to_pad.cpp index b2079caab0..aeddfa5e86 100644 --- a/qa/drc_proto/drc_test_provider_silk_to_pad.cpp +++ b/qa/drc_proto/drc_test_provider_silk_to_pad.cpp @@ -140,7 +140,7 @@ bool test::DRC_TEST_PROVIDER_SILK_TO_PAD::Run() std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_COPPER_EDGE_CLEARANCE ); wxString msg; - msg.Printf( drcItem->GetErrorText() + _( " (%s clearance %s; actual %s)" ), + msg.Printf( drcItem->GetErrorText() + wxS( " " ) + _( "(%s clearance %s; actual %s)" ), rule->GetName(), MessageTextFromValue( userUnits(), minClearance ), MessageTextFromValue( userUnits(), actual ) ); diff --git a/utils/kicad2step/pcb/3d_resolver.cpp b/utils/kicad2step/pcb/3d_resolver.cpp index 1d6c66f2b8..bf5ea05e53 100644 --- a/utils/kicad2step/pcb/3d_resolver.cpp +++ b/utils/kicad2step/pcb/3d_resolver.cpp @@ -573,13 +573,13 @@ bool S3D_RESOLVER::addPath( const SEARCH_PATH& aPath ) { if( !tpath.m_alias.Cmp( sPL->m_alias ) ) { - wxString msg = _( "Alias: " ); + wxString msg = _( "Alias:" ) + wxS( " " ); msg.append( tpath.m_alias ); msg.append( "\n" ); - msg.append( _( "This path: " ) ); + msg.append( _( "This path:" ) + wxS( " " ) ); msg.append( tpath.m_pathvar ); msg.append( "\n" ); - msg.append( _( "Existing path: " ) ); + msg.append( _( "Existing path:" ) + wxS( " " ) ); msg.append( sPL->m_pathvar ); wxMessageBox( msg, _( "Bad alias (duplicate name)" ) );