pcbnew: Update strings
Moving pcbnew error strings that may be seen by the user to translated strings. Strings that denote unexpected cases are moved to debug logs as they are essentially asserts that should never be shown. The exceptions are the messages shown when files are loaded. All unknown items should show an error here.
This commit is contained in:
parent
5c055f3f80
commit
aeedb3543b
|
@ -1080,7 +1080,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
|||
}
|
||||
|
||||
default:
|
||||
wxMessageBox( wxT( "DRC::checkClearancePadToPad: unknown pad shape" ) );
|
||||
wxLogDebug( wxT( "DRC::checkClearancePadToPad: unknown pad shape" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Edge_Module( EDGE_MODULE* aEdge )
|
|||
|
||||
if( aEdge->Type() != PCB_MODULE_EDGE_T )
|
||||
{
|
||||
DisplayError( this, wxT( "StructType error: PCB_MODULE_EDGE_T expected" ) );
|
||||
wxLogDebug( wxT( "StructType error: PCB_MODULE_EDGE_T expected" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,7 @@ EDGE_MODULE* FOOTPRINT_EDIT_FRAME::Begin_Edge_Module( EDGE_MODULE* aEdge,
|
|||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox( wxT( "Begin_Edge() error" ) );
|
||||
wxLogDebug( wxT( "Begin_Edge() error" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1249,9 +1249,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
|
||||
|
||||
default:
|
||||
wxString msg;
|
||||
msg.Printf( wxT( "PCB_EDIT_FRAME::Process_Special_Functions() unknown event id %d" ), id );
|
||||
DisplayError( this, msg );
|
||||
wxLogDebug( wxT( "PCB_EDIT_FRAME::Process_Special_Functions() unknown event id %d" ), id );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1327,11 +1325,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
|
|||
case TYPE_NOT_INIT:
|
||||
case PCB_T:
|
||||
default:
|
||||
{
|
||||
wxString msg = wxString::Format(
|
||||
wxT( "Remove: item type %d unknown." ), Item->Type() );
|
||||
DisplayError( this, msg );
|
||||
}
|
||||
wxLogDebug( wxT( "Remove: item type %d unknown." ), Item->Type() );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -175,12 +175,8 @@ void PCB_EDIT_FRAME::Delete_Drawings_All_Layer( PCB_LAYER_ID aLayer )
|
|||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
msg.Printf( wxT("Delete_Drawings_All_Layer() error: unknown type %d"),
|
||||
item->Type() );
|
||||
wxMessageBox( msg );
|
||||
break;
|
||||
}
|
||||
wxLogDebug( wxT( "Delete_Drawings_All_Layer() error: unknown type %d" ), item->Type() );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxMessageBox( wxT( "PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event() error") );
|
||||
wxLogDebug( wxT( "PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event() error") );
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -357,7 +357,7 @@ bool PCB_EDIT_FRAME::Files_io_from_id( int id )
|
|||
}
|
||||
|
||||
default:
|
||||
DisplayError( this, wxT( "File_io Internal Error" ) );
|
||||
wxLogDebug( wxT( "File_io Internal Error" ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,14 +71,9 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
|
|||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( wxT( "WinEDA_ModEditFrame::OnLeftClick err:Struct %d, m_Flag %X" ),
|
||||
wxLogDebug( wxT( "WinEDA_ModEditFrame::OnLeftClick err:Struct %d, m_Flag %X" ),
|
||||
item->Type(), item->GetFlags() );
|
||||
DisplayError( this, msg );
|
||||
item->ClearFlags();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,9 +129,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
|
|||
SetCurItem( Begin_Edge_Module( (EDGE_MODULE*) item, DC, S_SEGMENT ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox( wxT( "ProcessCommand error: unknown shape" ) );
|
||||
}
|
||||
wxLogDebug( wxT( "ProcessCommand error: unknown shape" ) );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -202,12 +195,12 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
|
|||
break;
|
||||
|
||||
case ID_MODEDIT_MEASUREMENT_TOOL:
|
||||
DisplayError( this, wxT( "Measurement Tool not available in Legacy Toolset" ) );
|
||||
DisplayError( this, _( "Measurement Tool not available in Legacy Toolset" ) );
|
||||
SetNoToolSelected();
|
||||
break;
|
||||
|
||||
default:
|
||||
DisplayError( this, wxT( "FOOTPRINT_EDIT_FRAME::ProcessCommand error" ) );
|
||||
wxLogDebug( wxT( "FOOTPRINT_EDIT_FRAME::ProcessCommand error" ) );
|
||||
SetNoToolSelected();
|
||||
}
|
||||
|
||||
|
@ -448,23 +441,20 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen
|
|||
case PCB_MARKER_T:
|
||||
case PCB_DIMENSION_T:
|
||||
case PCB_TARGET_T:
|
||||
msg.Printf( wxT( "FOOTPRINT_EDIT_FRAME::OnRightClick Error: Unexpected DrawType %d" ),
|
||||
wxLogDebug( wxT( "FOOTPRINT_EDIT_FRAME::OnRightClick Error: Unexpected DrawType %d" ),
|
||||
item->Type() );
|
||||
DisplayError( this, msg );
|
||||
break;
|
||||
|
||||
case SCREEN_T:
|
||||
case TYPE_NOT_INIT:
|
||||
case PCB_T:
|
||||
msg.Printf( wxT( "FOOTPRINT_EDIT_FRAME::OnRightClick Error: illegal DrawType %d" ),
|
||||
wxLogDebug( wxT( "FOOTPRINT_EDIT_FRAME::OnRightClick Error: illegal DrawType %d" ),
|
||||
item->Type() );
|
||||
DisplayError( this, msg );
|
||||
break;
|
||||
|
||||
default:
|
||||
msg.Printf( wxT( "FOOTPRINT_EDIT_FRAME::OnRightClick Error: unknown DrawType %d" ),
|
||||
wxLogDebug( wxT( "FOOTPRINT_EDIT_FRAME::OnRightClick Error: unknown DrawType %d" ),
|
||||
item->Type() );
|
||||
DisplayError( this, msg );
|
||||
break;
|
||||
}
|
||||
PopMenu->AppendSeparator();
|
||||
|
|
|
@ -74,7 +74,7 @@ void FOOTPRINT_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxMessageBox( wxT( "FOOTPRINT_EDIT_FRAME::OnSelectOptionToolbar error" ) );
|
||||
wxLogDebug( wxT( "FOOTPRINT_EDIT_FRAME::OnSelectOptionToolbar error" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -805,8 +805,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
default:
|
||||
DisplayError( this,
|
||||
wxT( "FOOTPRINT_EDIT_FRAME::Process_Special_Functions error" ) );
|
||||
wxLogDebug( wxT( "FOOTPRINT_EDIT_FRAME::Process_Special_Functions error" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,9 +68,8 @@ void FOOTPRINT_WIZARD_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
default:
|
||||
msg << wxT( "FOOTPRINT_WIZARD_FRAME::Process_Special_Functions error: id = " )
|
||||
<< event.GetId();
|
||||
wxMessageBox( msg );
|
||||
wxLogDebug( wxT( "FOOTPRINT_WIZARD_FRAME::Process_Special_Functions error: id = %d" ),
|
||||
event.GetId() );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,8 +77,7 @@ void PCB_EDIT_FRAME::ProcessMuWaveFunctions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
default:
|
||||
DisplayError( this,
|
||||
wxT( "PCB_EDIT_FRAME::ProcessMuWaveFunctions() id error" ) );
|
||||
wxLogDebug( wxT( "id %d error" ), id );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +111,7 @@ void PCB_EDIT_FRAME::MuWaveCommand( wxDC* DC, const wxPoint& MousePos )
|
|||
|
||||
default:
|
||||
m_canvas->SetCursor( wxCURSOR_ARROW );
|
||||
DisplayError( this, wxT( "PCB_EDIT_FRAME::MuWaveCommand() id error" ) );
|
||||
wxLogDebug( wxT( "id %d error" ), GetToolId() );
|
||||
SetNoToolSelected();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
}
|
||||
else
|
||||
{
|
||||
DisplayError( this, wxT( "OnLeftClick err: not a PCB_TARGET_T" ) );
|
||||
wxLogDebug( wxT( "OnLeftClick err: not a PCB_TARGET_T" ) );
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -327,7 +327,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
}
|
||||
else
|
||||
{
|
||||
DisplayError( this, wxT( "PCB_EDIT_FRAME::OnLeftClick() zone internal error" ) );
|
||||
wxLogDebug( wxT( "PCB_EDIT_FRAME::OnLeftClick() zone internal error" ) );
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -353,7 +353,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
}
|
||||
else
|
||||
{
|
||||
DisplayError( this, wxT( "OnLeftClick err: not a PCB_TEXT_T" ) );
|
||||
wxLogDebug( wxT( "OnLeftClick err: not a PCB_TEXT_T" ) );
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -385,7 +385,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
}
|
||||
else
|
||||
{
|
||||
DisplayError( this, wxT( "Internal err: Struct not PCB_MODULE_T" ) );
|
||||
wxLogDebug( wxT( "Internal err: Struct not PCB_MODULE_T" ) );
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -411,8 +411,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
}
|
||||
else
|
||||
{
|
||||
DisplayError( this,
|
||||
wxT( "PCB_EDIT_FRAME::OnLeftClick() error item is not a DIMENSION" ) );
|
||||
wxLogDebug( wxT( "PCB_EDIT_FRAME::OnLeftClick() error item is not a DIMENSION" ) );
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -456,7 +455,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
break;
|
||||
|
||||
default:
|
||||
DisplayError( this, wxT( "PCB_EDIT_FRAME::OnLeftClick() id error" ) );
|
||||
wxLogDebug( wxT( "PCB_EDIT_FRAME::OnLeftClick() id error" ) );
|
||||
SetNoToolSelected();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -293,16 +293,14 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
|||
case SCREEN_T:
|
||||
case TYPE_NOT_INIT:
|
||||
case PCB_T:
|
||||
msg.Printf( wxT( "PCB_EDIT_FRAME::OnRightClick() Error: unexpected DrawType %d" ),
|
||||
wxLogDebug( wxT( "PCB_EDIT_FRAME::OnRightClick() Error: unexpected DrawType %d" ),
|
||||
item->Type() );
|
||||
wxMessageBox( msg );
|
||||
SetCurItem( NULL );
|
||||
break;
|
||||
|
||||
default:
|
||||
msg.Printf( wxT( "PCB_EDIT_FRAME::OnRightClick() Error: unknown DrawType %d" ),
|
||||
wxLogDebug( wxT( "PCB_EDIT_FRAME::OnRightClick() Error: unknown DrawType %d" ),
|
||||
item->Type() );
|
||||
wxMessageBox( msg );
|
||||
|
||||
// Attempt to clear error (but should no occurs )
|
||||
if( item->Type() >= MAX_STRUCT_TYPE_ID )
|
||||
|
|
|
@ -68,10 +68,10 @@ void PCB_BASE_FRAME::Compile_Ratsnest( wxDC* aDC, bool aDisplayStatus )
|
|||
std::shared_ptr<CONNECTIVITY_DATA> conn = m_Pcb->GetConnectivity();
|
||||
|
||||
msg.Printf( wxT( " %d" ), conn->GetPadCount() );
|
||||
AppendMsgPanel( wxT( "Pads" ), msg, RED );
|
||||
AppendMsgPanel( _( "Pads" ), msg, RED );
|
||||
|
||||
msg.Printf( wxT( " %d" ), conn->GetNetCount() - 1 /* Don't include "No Net" in count */ );
|
||||
AppendMsgPanel( wxT( "Nets" ), msg, CYAN );
|
||||
AppendMsgPanel( _( "Nets" ), msg, CYAN );
|
||||
|
||||
SetMsgPanel( m_Pcb );
|
||||
}
|
||||
|
|
|
@ -234,7 +234,7 @@ bool EDIT_TOOL::Init()
|
|||
|
||||
if( !m_selectionTool )
|
||||
{
|
||||
DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) );
|
||||
DisplayError( NULL, _( "pcbnew.InteractiveSelection tool is not available" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ bool ALIGN_DISTRIBUTE_TOOL::Init()
|
|||
|
||||
if( !m_selectionTool )
|
||||
{
|
||||
DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) );
|
||||
DisplayError( NULL, _( "pcbnew.InteractiveSelection tool is not available" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ bool POINT_EDITOR::Init()
|
|||
|
||||
if( !m_selectionTool )
|
||||
{
|
||||
DisplayError( NULL, wxT( "pcbnew.InteractiveSelection tool is not available" ) );
|
||||
DisplayError( NULL, _( "pcbnew.InteractiveSelection tool is not available" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -322,9 +322,7 @@ void PCB_BASE_EDIT_FRAME::SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsLis
|
|||
|
||||
default:
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( wxT( "SaveCopyInUndoList() error (unknown code %X)" ), command );
|
||||
wxMessageBox( msg );
|
||||
wxLogDebug( wxT( "SaveCopyInUndoList() error (unknown code %X)" ), command );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -570,17 +568,15 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool
|
|||
|
||||
default:
|
||||
{
|
||||
wxString msg;
|
||||
msg.Printf( wxT( "PutDataInPreviousState() error (unknown code %X)" ),
|
||||
wxLogDebug( wxT( "PutDataInPreviousState() error (unknown code %X)" ),
|
||||
aList->GetPickedItemStatus( ii ) );
|
||||
wxMessageBox( msg );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( not_found )
|
||||
wxMessageBox( wxT( "Incomplete undo/redo operation: some items not found" ) );
|
||||
wxMessageBox( _( "Incomplete undo/redo operation: some items not found" ) );
|
||||
|
||||
// Rebuild pointers and connectivity that can be changed.
|
||||
// connectivity can be rebuilt only in the board editor frame
|
||||
|
|
Loading…
Reference in New Issue