A bit of wxT().

This commit is contained in:
Jeff Young 2022-03-13 16:09:06 +00:00
parent 1890a1aa06
commit ced1e68ea1
3 changed files with 21 additions and 19 deletions

View File

@ -360,7 +360,7 @@ std::shared_ptr<DRC_ITEM> DRC_ITEM::Create( int aErrorCode )
case DRCE_FOOTPRINT_TYPE_MISMATCH: return std::make_shared<DRC_ITEM>( footprintTypeMismatch );
case DRCE_PAD_TH_WITH_NO_HOLE: return std::make_shared<DRC_ITEM>( footprintTHPadhasNoHole );
default:
wxFAIL_MSG( "Unknown DRC error code" );
wxFAIL_MSG( wxT( "Unknown DRC error code" ) );
return nullptr;
}
}

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020-2021 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2020-2022 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -155,7 +155,7 @@ void DRC_RULES_PARSER::Parse( std::vector<std::shared_ptr<DRC_RULE>>& aRules, RE
default:
msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), FromUTF8(),
"'rule', 'version'" );
wxT( "rule or version" ) );
reportError( msg );
parseUnknown();
}
@ -237,7 +237,7 @@ std::shared_ptr<DRC_RULE> DRC_RULES_PARSER::parseDRC_RULE()
default:
msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), FromUTF8(),
"constraint, condition or disallow" );
wxT( "constraint, condition, or disallow" ) );
reportError( msg );
parseUnknown();
}
@ -261,11 +261,12 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule )
if( (int) token == DSN_RIGHT || token == T_EOF )
{
msg.Printf( _( "Missing constraint type.| Expected %s." ),
"assertion, clearance, hole_clearance, edge_clearance, mechanical_clearance, "
"mechanical_hole_clearance, courtyard_clearance, silk_clearance, hole_size, "
"hole_to_hole, track_width, annular_width, via_diameter, disallow, "
"zone_connection, thermal_relief_gap, thermal_spoke_width, min_resolved_spokes, "
"length, skew, via_count, diff_pair_gap or diff_pair_uncoupled" );
wxT( "assertion, clearance, hole_clearance, edge_clearance, "
"mechanical_clearance, mechanical_hole_clearance, courtyard_clearance, "
"silk_clearance, hole_size, hole_to_hole, track_width, annular_width, "
"via_diameter, disallow, zone_connection, thermal_relief_gap, "
"thermal_spoke_width, min_resolved_spokes, length, skew, via_count, "
"diff_pair_gap or diff_pair_uncoupled" ) );
reportError( msg );
return;
}
@ -300,11 +301,12 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule )
case T_mechanical_hole_clearance: c.m_Type = MECHANICAL_HOLE_CLEARANCE_CONSTRAINT; break;
default:
msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), FromUTF8(),
"assertion, clearance, hole_clearance, edge_clearance, mechanical_clearance, "
"mechanical_hole_clearance, courtyard_clearance, silk_clearance, hole_size, "
"hole_to_hole, track_width, annular_width, disallow, zone_connection, "
"thermal_relief_gap, thermal_spoke_width, min_resolved_spokes, length, skew, "
"via_count, via_diameter, diff_pair_gap or diff_pair_uncoupled" );
wxT( "assertion, clearance, hole_clearance, edge_clearance, "
"mechanical_clearance, mechanical_hole_clearance, courtyard_clearance, "
"silk_clearance, hole_size, hole_to_hole, track_width, annular_width, "
"disallow, zone_connection, thermal_relief_gap, thermal_spoke_width, "
"min_resolved_spokes, length, skew, via_count, via_diameter, "
"diff_pair_gap or diff_pair_uncoupled" ) );
reportError( msg );
}
@ -340,8 +342,8 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule )
default:
msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), FromUTF8(),
"track, via, micro_via, buried_via, pad, zone, text, graphic, hole "
"or footprint." );
wxT( "track, via, micro_via, buried_via, pad, zone, text, graphic, "
"hole, or footprint." ) );
reportError( msg );
break;
}
@ -518,7 +520,7 @@ void DRC_RULES_PARSER::parseConstraint( DRC_RULE* aRule )
default:
msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ),
FromUTF8(),
"min, max or opt" );
wxT( "min, max, or opt" ) );
reportError( msg );
parseUnknown();
}
@ -633,7 +635,7 @@ SEVERITY DRC_RULES_PARSER::parseSeverity()
default:
msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ),
FromUTF8(),
"ignore, warning, error or exclusion" );
wxT( "ignore, warning, error, or exclusion" ) );
reportError( msg );
parseUnknown();
}

View File

@ -68,7 +68,7 @@ void DRC_TEST_PROVIDER::Init()
const wxString DRC_TEST_PROVIDER::GetName() const { return wxT( "<no name test>" ); }
const wxString DRC_TEST_PROVIDER::GetDescription() const { return ""; }
const wxString DRC_TEST_PROVIDER::GetDescription() const { return wxEmptyString; }
void DRC_TEST_PROVIDER::reportViolation( std::shared_ptr<DRC_ITEM>& item,