diff --git a/pcbnew/dialogs/dialog_board_reannotate.cpp b/pcbnew/dialogs/dialog_board_reannotate.cpp index 9bb9bb2ffc..0560824c55 100644 --- a/pcbnew/dialogs/dialog_board_reannotate.cpp +++ b/pcbnew/dialogs/dialog_board_reannotate.cpp @@ -5,7 +5,7 @@ * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors. * @author Brian Piccioni * - * This program is free software; you can redistribute it and/or + * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. @@ -87,7 +87,7 @@ wxString AnnotateString[] = { wxString ActionMessage[] = { - _( "" ), //UpdateRefDes + "", //UpdateRefDes _( "Empty" ), //EmptyRefDes _( "Invalid" ), //InvalidRefDes _( "Excluded" ) //Exclude @@ -144,7 +144,7 @@ DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE( PCB_EDIT_FRAME* aParentFrame ) for( wxRadioButton* button : AnnotateWhat ) button->SetValue( false ); - + m_AnnotationChoice = ( m_SortCode >= (int) AnnotateWhat.size() ) ? AnnotationChoice::AnnotateAll : m_AnnotationChoice; @@ -171,7 +171,7 @@ DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE( PCB_EDIT_FRAME* aParentFrame ) wxString fullname = fn.GetFullPath(); m_MessageWindow->SetFileName( fullname ); } - + m_MessageWindow->SetPrintInfo( false ); //Suppress the "Info: " prefix } @@ -369,7 +369,7 @@ void DIALOG_BOARD_REANNOTATE::GetParameters() { if( sortbuttons->GetValue() ) break; - + m_SortCode++; } @@ -405,7 +405,7 @@ void DIALOG_BOARD_REANNOTATE::GetParameters() else i++; } - + m_AnnotationChoice = ( i >= (int) AnnotateWhat.size() ) ? AnnotationChoice::AnnotateAll : i; m_MessageWindow->SetLazyUpdate( true ); diff --git a/pcbnew/drc/drc_rule_parser.cpp b/pcbnew/drc/drc_rule_parser.cpp index c5992e1baf..b27d9a4adf 100644 --- a/pcbnew/drc/drc_rule_parser.cpp +++ b/pcbnew/drc/drc_rule_parser.cpp @@ -145,7 +145,8 @@ void DRC_RULES_PARSER::Parse( std::vector& aRules, REPORTER* aReporte break; default: - msg.Printf( _( "Unrecognized item '%s'.| Expected 'rule' or 'version'." ), FromUTF8() ); + msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), + FromUTF8(), "'rule', 'version'" ); reportError( msg ); parseUnknown(); } @@ -216,9 +217,9 @@ DRC_RULE* DRC_RULES_PARSER::parseDRC_RULE() break; default: - msg.Printf( _( "Unrecognized item '%s'.| Expected 'constraint', 'condition' or " - "'disallow'." ), - FromUTF8() ); + msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), + FromUTF8(), + "'constraint', 'condition', 'disallow'" ); reportError( msg ); parseUnknown(); } @@ -240,8 +241,9 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule ) if( (int) token == DSN_RIGHT ) { - reportError( _( "Missing constraint type.| Expected 'clearance', 'track_width', " - "'annulus_width', 'hole' or 'disallow'." ) ); + msg.Printf( _( "Missing constraint type.| Expected %s." ), + "'clearance', 'track_width', 'annulus_width', 'hole', 'disallow'" ); + reportError( msg ); return; } @@ -253,9 +255,10 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule ) case T_hole: constraint.m_Type = DRC_RULE_ID_HOLE_SIZE; break; case T_disallow: constraint.m_Type = DRC_RULE_ID_DISALLOW; break; default: - msg.Printf( _( "Unrecognized item '%s'.| Expected 'clearance', 'track_width', " - "'annulus_width', 'hole' or 'disallow'." ), - FromUTF8() ); + msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), + FromUTF8(), + "'clearance', 'track_width', 'annulus_width', 'hole', 'disallow'." + ); reportError( msg ); } @@ -279,9 +282,11 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule ) case T_hole: constraint.m_DisallowFlags |= DISALLOW_HOLES; break; case T_footprint: constraint.m_DisallowFlags |= DISALLOW_FOOTPRINTS; break; default: - msg.Printf( _( "Unrecognized item '%s'.| Expected 'track', 'via', 'micro_via', " - "'blind_via', 'pad', 'zone', 'text', 'graphic' or 'hole'." ), - FromUTF8() ); + msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), + FromUTF8(), + "'track', 'via', 'micro_via', " + "'blind_via', 'pad', 'zone', 'text', 'graphic', 'hole'." + ); reportError( msg ); parseUnknown(); } @@ -360,8 +365,8 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule ) break; default: - msg.Printf( _( "Unrecognized item '%s'.| Expected 'min', 'max' or 'opt'." ), - FromUTF8() ); + msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), + FromUTF8(), "'min', 'max', 'opt'" ); reportError( msg ); parseUnknown(); }