Fix some I18n issues.

Strings used for debug and strings containing only a print format like "%i"
are not translated
This commit is contained in:
jean-pierre charras 2020-08-15 17:46:52 +02:00
parent 78ac675316
commit e4021a9ffa
4 changed files with 17 additions and 17 deletions

View File

@ -264,7 +264,8 @@ wxString PCB_GROUP::GetSelectMenuText( EDA_UNITS aUnits ) const
{
if( m_name.empty() )
{
return wxString::Format( _( "Anonymous group %s with %ld members" ), m_Uuid.AsString(), m_items.size() );
return wxString::Format( _( "Anonymous group %s with %ld members" ),
m_Uuid.AsString(), m_items.size() );
}
return wxString::Format( _( "Group \"%s\" with %ld members" ), m_name, m_items.size() );
}
@ -279,8 +280,8 @@ BITMAP_DEF PCB_GROUP::GetMenuImage() const
void PCB_GROUP::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
{
aList.emplace_back( _( "Group" ), m_name.empty() ? _( "Anonymous" ) :
wxString::Format( _( "\"%s\"" ), m_name ), DARKCYAN );
aList.emplace_back( _( "Members" ), wxString::Format( _( "%ld" ), m_items.size() ), BROWN );
wxString::Format( "\"%s\"", m_name ), DARKCYAN );
aList.emplace_back( _( "Members" ), wxString::Format( "%ld", m_items.size() ), BROWN );
}

View File

@ -519,10 +519,9 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
int i = 1;
wxString message;
message.Printf( _( "\n\nThere are %i "
" types of reference designations\n"
message.Printf( _( "\n\nThere are %i types of reference designations\n"
"**********************************************************\n" ),
(int) m_RefDesTypes.size() );
(int) m_RefDesTypes.size() );
for( RefDesTypeStr Type : m_RefDesTypes ) //Show all the types of refdes
message += Type.RefDesType + ( 0 == ( i++ % 16 ) ? "\n" : " " );
@ -530,7 +529,7 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
if( !m_ExcludeArray.empty() )
{
message += _( "\nExcluding: " );
for( wxString Exclude : m_ExcludeArray ) //Show the refdes we are excluding
for( wxString& Exclude : m_ExcludeArray ) //Show the refdes we are excluding
message += Exclude + " ";
message += _( " from reannotation\n\n" );
}
@ -541,7 +540,7 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
{
message += wxString::Format( "%s -> %s %s %s\n", Change.OldRefDesString, Change.NewRefDes,
ActionMessage[Change.Action],
( std::string )( UpdateRefDes != Change.Action ? _( " will be ignored" ) : "" ) );
UpdateRefDes != Change.Action ? _( " will be ignored" ) : wxString("") );
}
ShowReport( message, RPT_SEVERITY_INFO );

View File

@ -1102,7 +1102,7 @@ int PCB_EDITOR_CONTROL::GroupMergeSelected( const TOOL_EVENT& aEvent )
}
}
commit.Push( _( "GroupMerge" ) );
commit.Push( "GroupMerge" );
wxString check = board->GroupsSanityCheck();
wxCHECK_MSG( check == wxEmptyString, 0, _( "Group merge resulted in inconsistent state: " ) + check );
@ -1145,7 +1145,7 @@ int PCB_EDITOR_CONTROL::UngroupSelected( const TOOL_EVENT& aEvent )
}
}
commit.Push( _( "GroupUngroup" ) );
commit.Push( "GroupUngroup" );
wxString check = board->GroupsSanityCheck();
wxCHECK_MSG( check == wxEmptyString, 0, _( "Group merge resulted in inconsistent state: " ) + check );
@ -1180,7 +1180,7 @@ int PCB_EDITOR_CONTROL::GroupRemoveItemsSelected( const TOOL_EVENT& aEvent )
board->GroupRemoveItems( selection, &commit );
commit.Push( _( "GroupRemoveItems" ) );
commit.Push( "GroupRemoveItems" );
wxString check = board->GroupsSanityCheck();
wxCHECK_MSG( check == wxEmptyString, 0, _( "Group removeItems resulted in inconsistent state: " ) + check );
@ -1212,7 +1212,7 @@ int PCB_EDITOR_CONTROL::GroupFlattenSelected( const TOOL_EVENT& aEvent )
{
BOARD_ITEM* board_item = static_cast<BOARD_ITEM*>( item );
wxCHECK_MSG( board_item->Type() == PCB_GROUP_T, 0,
_( "Selection for ungroup should only have groups in it - was checked." ) );
"Selection for ungroup should only have groups in it - was checked." );
std::queue<PCB_GROUP*> groupsToFlatten;
groupsToFlatten.push( static_cast<PCB_GROUP*>( board_item ) );
PCB_GROUP* topGroup = groupsToFlatten.front();
@ -1250,7 +1250,7 @@ int PCB_EDITOR_CONTROL::GroupFlattenSelected( const TOOL_EVENT& aEvent )
}
}
commit.Push( _( "GroupFlatten" ) );
commit.Push( "GroupFlatten" );
wxString check = board->GroupsSanityCheck();
wxCHECK_MSG( check == wxEmptyString, 0, _( "Group flatten resulted in inconsistent state: " ) + check );
@ -1358,7 +1358,7 @@ int PCB_EDITOR_CONTROL::PlaceTarget( const TOOL_EVENT& aEvent )
BOARD_COMMIT commit( m_frame );
commit.Add( target );
commit.Push( _( "Place a layer alignment target" ) );
commit.Push( "Place a layer alignment target" );
preview.Remove( target );
@ -1475,7 +1475,7 @@ int PCB_EDITOR_CONTROL::ZoneMerge( const TOOL_EVENT& aEvent )
if( mergeZones( commit, toMerge, merged ) )
{
commit.Push( _( "Merge zones" ) );
commit.Push( "Merge zones" );
for( auto item : merged )
m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, item );

View File

@ -2010,7 +2010,7 @@ void SELECTION_TOOL::highlight( BOARD_ITEM* aItem, int aMode, PCBNEW_SELECTION*
void SELECTION_TOOL::highlightInternal( BOARD_ITEM* aItem, int aMode, PCBNEW_SELECTION* aGroup, bool isChild )
{
wxLogTrace( "GRP", wxString::Format( _( "highlight() of %s %p" ),
wxLogTrace( "GRP", wxString::Format( "highlight() of %s %p",
aItem->GetSelectMenuText( m_frame->GetUserUnits() ) ), aItem );
if( aMode == SELECTED )
aItem->SetSelected();
@ -2056,7 +2056,7 @@ void SELECTION_TOOL::unhighlight( BOARD_ITEM* aItem, int aMode, PCBNEW_SELECTION
void SELECTION_TOOL::unhighlightInternal( BOARD_ITEM* aItem, int aMode, PCBNEW_SELECTION* aGroup, bool isChild )
{
wxLogTrace( "GRP", wxString::Format( _( "unhighlight() of %s %p" ),
wxLogTrace( "GRP", wxString::Format( "unhighlight() of %s %p",
aItem->GetSelectMenuText( m_frame->GetUserUnits() ) ), aItem );
if( aMode == SELECTED )
aItem->ClearSelected();