Remove translated null strings

Also improves translatability by separating clauses
This commit is contained in:
Seth Hillbrand 2020-09-15 08:35:09 -07:00
parent 1b56e2e95d
commit aa7e021bfc
1 changed files with 17 additions and 9 deletions

View File

@ -476,26 +476,34 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRulesForItems( DRC_CONSTRAINT_TYPE_T aConstraintI
// Last matching rule wins, so process in reverse order // Last matching rule wins, so process in reverse order
for( int ii = (int) ruleset->size() - 1; ii >= 0; --ii ) for( int ii = (int) ruleset->size() - 1; ii >= 0; --ii )
{ {
wxString msg;
const CONSTRAINT_WITH_CONDITIONS* rcons = ruleset->at( ii ); const CONSTRAINT_WITH_CONDITIONS* rcons = ruleset->at( ii );
implicit = rcons->parentRule && rcons->parentRule->m_Implicit; implicit = rcons->parentRule && rcons->parentRule->m_Implicit;
REPORT( "" ) REPORT( "" )
if( aConstraintId == DRC_CONSTRAINT_TYPE_CLEARANCE ) if( implicit )
{ {
int clearance = rcons->constraint.m_Value.Min(); msg = wxString::Format( _( "Checking %s;" ),
REPORT( wxString::Format( _( "Checking %s %s; clearance: %s." ), rcons->parentRule->m_Name );
implicit ? _( "" ) : _( "rule" ),
rcons->parentRule->m_Name,
MessageTextFromValue( UNITS, clearance, true ) ) )
} }
else else
{ {
REPORT( wxString::Format( _( "Checking %s %s." ), msg = wxString::Format( _( "Checking rule %s;"),
implicit ? _( "" ) : _( "rule" ), rcons->parentRule->m_Name );
rcons->parentRule->m_Name ) )
} }
if( aConstraintId == DRC_CONSTRAINT_TYPE_CLEARANCE )
{
int clearance = rcons->constraint.m_Value.Min();
msg += " ";
msg += wxString::Format( _( "clearance: %s." ),
MessageTextFromValue( UNITS, clearance, true ) );
}
REPORT( msg );
if( aLayer != UNDEFINED_LAYER && !rcons->layerTest.test( aLayer ) ) if( aLayer != UNDEFINED_LAYER && !rcons->layerTest.test( aLayer ) )
{ {
REPORT( wxString::Format( _( "Rule layer \"%s\" not matched." ), REPORT( wxString::Format( _( "Rule layer \"%s\" not matched." ),