From ed4c9f7ddbf49b0863a1475eb9d6bcdfcc5751d8 Mon Sep 17 00:00:00 2001 From: Simon Richter Date: Mon, 15 Apr 2019 21:52:49 +0200 Subject: [PATCH] Use format string for composed strings Some translations may need this. --- eeschema/netlist_object.cpp | 2 +- eeschema/tools/sch_editor_control.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/netlist_object.cpp b/eeschema/netlist_object.cpp index c800401210..a077956eb8 100644 --- a/eeschema/netlist_object.cpp +++ b/eeschema/netlist_object.cpp @@ -256,7 +256,7 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem else { wxCHECK_RET( conn.ParseBusGroup( m_Label, &group_name, bus_contents_vec ), - _( "Failed to parse bus group " ) + m_Label ); + wxString::Format( _( "Failed to parse bus group %s" ), m_Label ) ); } // For named bus groups, like "USB{DP DM}" diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 711e121642..eed7e5f9a7 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -137,7 +137,7 @@ static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition ) if( item->Connection( *g_CurrentSheet ) ) { netName = item->Connection( *g_CurrentSheet )->Name(); - editFrame->SetStatusText( _( "Highlighted net: " ) + UnescapeString( netName ) ); + editFrame->SetStatusText( wxString::Format( _( "Highlighted net: %s" ), UnescapeString( netName ) ) ); } } } @@ -145,7 +145,7 @@ static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition ) editFrame->SetSelectedNetName( netName ); editFrame->SendCrossProbeNetName( netName ); - editFrame->SetStatusText( _( "Selected net: " ) + UnescapeString( netName ) ); + editFrame->SetStatusText( wxString::Format( _( "Selected net: %s" ), UnescapeString( netName ) ) ); aToolMgr->RunAction( SCH_ACTIONS::highlightNetSelection, true );