Fix some issues in ERC error messages.

1) use consistent punctuation
2) make sure all are translated

Fixes https://gitlab.com/kicad/code/kicad/issues/12432
This commit is contained in:
Jeff Young 2022-09-15 23:43:00 +01:00
parent 9a4a68fb5e
commit 1e64db779c
3 changed files with 10 additions and 10 deletions

View File

@ -685,14 +685,14 @@ int SCH_REFERENCE_LIST::CheckAnnotation( ANNOTATION_ERROR_HANDLER aHandler )
if( ( flatList[ii].m_unit > 0 ) && ( flatList[ii].m_unit < 0x7FFFFFFF ) )
{
msg.Printf( _( "Item not annotated: %s%s (unit %d)\n" ),
msg.Printf( _( "Item not annotated: %s%s (unit %d)" ),
flatList[ii].GetRef(),
tmp,
flatList[ii].m_unit );
}
else
{
msg.Printf( _( "Item not annotated: %s%s\n" ), flatList[ii].GetRef(), tmp );
msg.Printf( _( "Item not annotated: %s%s" ), flatList[ii].GetRef(), tmp );
}
aHandler( ERCE_UNANNOTATED, msg, &flatList[ii], nullptr );
@ -710,7 +710,7 @@ int SCH_REFERENCE_LIST::CheckAnnotation( ANNOTATION_ERROR_HANDLER aHandler )
else
tmp = wxT( "?" );
msg.Printf( _( "Error: symbol %s%s%s (unit %d) exceeds units defined (%d)\n" ),
msg.Printf( _( "Error: symbol %s%s%s (unit %d) exceeds units defined (%d)" ),
flatList[ii].GetRef(),
tmp,
LIB_SYMBOL::SubReference( flatList[ii].m_unit ),

View File

@ -148,7 +148,7 @@ void DIALOG_ERC::UpdateAnnotationWarning()
if( !m_infoBar->IsShown() )
{
wxHyperlinkCtrl* button = new wxHyperlinkCtrl( m_infoBar, wxID_ANY,
_("Show Annotation dialog"),
_( "Show Annotation dialog" ),
wxEmptyString );
button->Bind( wxEVT_COMMAND_HYPERLINK, std::function<void( wxHyperlinkEvent& aEvent )>(

View File

@ -280,7 +280,7 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
if( text->GetShownText().Matches( wxT( "*${*}*" ) ) )
{
std::shared_ptr<ERC_ITEM> erc = ERC_ITEM::Create( ERCE_UNRESOLVED_VARIABLE );
erc->SetErrorMessage( _( "Unresolved text variable in drawing sheet." ) );
erc->SetErrorMessage( _( "Unresolved text variable in drawing sheet" ) );
SCH_MARKER* marker = new SCH_MARKER( erc, text->GetPosition() );
screen->Append( marker );
@ -435,7 +435,7 @@ int ERC_TESTER::TestNoConnectPins()
ercItem->SetItems( pair.second[0], pair.second[1],
pair.second.size() > 2 ? pair.second[2] : nullptr,
pair.second.size() > 3 ? pair.second[3] : nullptr );
ercItem->SetErrorMessage( _( "Pins with \"no connection\" type are connected" ) );
ercItem->SetErrorMessage( _( "Pins with 'no connection' type are connected" ) );
SCH_MARKER* marker = new SCH_MARKER( ercItem, pair.first );
sheet.LastScreen()->Append( marker );
@ -732,7 +732,7 @@ int ERC_TESTER::TestLibSymbolIssues()
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol );
msg.Printf( _( "The current configuration does not include the library '%s'." ),
msg.Printf( _( "The current configuration does not include the library '%s'" ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );
@ -743,7 +743,7 @@ int ERC_TESTER::TestLibSymbolIssues()
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol );
msg.Printf( _( "The library '%s' is not enabled in the current configuration." ),
msg.Printf( _( "The library '%s' is not enabled in the current configuration" ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );
@ -758,7 +758,7 @@ int ERC_TESTER::TestLibSymbolIssues()
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol );
msg.Printf( "Symbol '%s' not found in symbol library '%s'.",
msg.Printf( _( "Symbol '%s' not found in symbol library '%s'" ),
UnescapeString( symbolName ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );
@ -774,7 +774,7 @@ int ERC_TESTER::TestLibSymbolIssues()
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol );
msg.Printf( "Symbol '%s' has been modified in library '%s'.",
msg.Printf( _( "Symbol '%s' has been modified in library '%s'" ),
UnescapeString( symbolName ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );