Fix i18n mixup.

Tab names and column names are translated on the fly, but
that means they need _HKI macros to make sure they get into
the translation database.
This commit is contained in:
Jeff Young 2023-12-30 11:24:21 +00:00
parent e8cd5f938d
commit 2e9f0679fc
2 changed files with 47 additions and 47 deletions

View File

@ -125,18 +125,18 @@ void SCH_SEARCH_HANDLER::SelectItems( std::vector<long>& aItemRows )
SYMBOL_SEARCH_HANDLER::SYMBOL_SEARCH_HANDLER( SCH_EDIT_FRAME* aFrame ) :
SCH_SEARCH_HANDLER( _( "Symbols" ), aFrame )
SCH_SEARCH_HANDLER( _HKI( "Symbols" ), aFrame )
{
m_columns.emplace_back( _( "Reference" ), 2, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _( "Value" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _( "Footprint" ), 10, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _( "Page" ), 1, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( _HKI( "Reference" ), 2, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Value" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Footprint" ), 10, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Page" ), 1, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "X" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "Y" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "Excl. sim" ), 2, wxLIST_FORMAT_CENTER ); // 9.0 TODO: make this translatable
m_columns.emplace_back( wxT( "Excl. BOM" ), 2, wxLIST_FORMAT_CENTER ); // 9.0 TODO: make this translatable
m_columns.emplace_back( wxT( "Excl. board" ), 2, wxLIST_FORMAT_CENTER ); // 9.0 TODO: make this translatable
m_columns.emplace_back( _( "DNP" ), 2, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "Excl. sim" ), 2, wxLIST_FORMAT_CENTER ); // 9.0 TODO: wxT -> _HKI
m_columns.emplace_back( wxT( "Excl. BOM" ), 2, wxLIST_FORMAT_CENTER ); // 9.0 TODO: wxT -> _HKI
m_columns.emplace_back( wxT( "Excl. board" ), 2, wxLIST_FORMAT_CENTER ); // 9.0 TODO: wxT -> _HKI
m_columns.emplace_back( _HKI( "DNP" ), 2, wxLIST_FORMAT_CENTER );
}
@ -211,11 +211,11 @@ wxString SYMBOL_SEARCH_HANDLER::getResultCell( const SCH_SEARCH_HIT& aHit, int a
TEXT_SEARCH_HANDLER::TEXT_SEARCH_HANDLER( SCH_EDIT_FRAME* aFrame ) :
SCH_SEARCH_HANDLER( _( "Text" ), aFrame )
SCH_SEARCH_HANDLER( _HKI( "Text" ), aFrame )
{
m_columns.emplace_back( _( "Type" ), 2, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _( "Text" ), 12, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _( "Page" ), 1, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( _HKI( "Type" ), 2, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Text" ), 12, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Page" ), 1, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "X" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "Y" ), 3, wxLIST_FORMAT_CENTER );
}
@ -295,11 +295,11 @@ wxString TEXT_SEARCH_HANDLER::getResultCell( const SCH_SEARCH_HIT& aHit, int aCo
LABEL_SEARCH_HANDLER::LABEL_SEARCH_HANDLER( SCH_EDIT_FRAME* aFrame ) :
SCH_SEARCH_HANDLER( _( "Labels" ), aFrame )
SCH_SEARCH_HANDLER( _HKI( "Labels" ), aFrame )
{
m_columns.emplace_back( _( "Type" ), 2, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _( "Name" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _( "Page" ), 2, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( _HKI( "Type" ), 2, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Name" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Page" ), 2, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "X" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "Y" ), 3 , wxLIST_FORMAT_CENTER);
}
@ -347,7 +347,7 @@ wxString LABEL_SEARCH_HANDLER::getResultCell( const SCH_SEARCH_HIT& aHit, int aC
if (aCol == 0)
{
// 9.0 TODO: make these translatable:
// 9.0 TODO: wxS() -> _HKI():
if(lbl->Type() == SCH_LABEL_T)
return wxS( "Local" );
else if( lbl->Type() == SCH_GLOBAL_LABEL_T )

View File

@ -77,11 +77,11 @@ void PCB_SEARCH_HANDLER::SelectItems( std::vector<long>& aItemRows )
FOOTPRINT_SEARCH_HANDLER::FOOTPRINT_SEARCH_HANDLER( PCB_EDIT_FRAME* aFrame ) :
PCB_SEARCH_HANDLER( wxT( "Footprints" ), aFrame )
PCB_SEARCH_HANDLER( _HKI( "Footprints" ), aFrame )
{
m_columns.emplace_back( wxT( "Reference" ), 2, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( wxT( "Value" ), 8, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( wxT( "Layer" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( _HKI( "Reference" ), 2, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Value" ), 8, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Layer" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "X" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "Y" ), 3, wxLIST_FORMAT_CENTER );
}
@ -135,12 +135,12 @@ wxString FOOTPRINT_SEARCH_HANDLER::getResultCell( BOARD_ITEM* aItem, int aCol )
ZONE_SEARCH_HANDLER::ZONE_SEARCH_HANDLER( PCB_EDIT_FRAME* aFrame ) :
PCB_SEARCH_HANDLER( wxT( "Zones" ), aFrame )
PCB_SEARCH_HANDLER( _HKI( "Zones" ), aFrame )
{
m_columns.emplace_back( wxT( "Name" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( wxT( "Net" ), 6, wxLIST_FORMAT_LEFT);
m_columns.emplace_back( wxT( "Layer" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "Priority" ), 2, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( _HKI( "Name" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Net" ), 6, wxLIST_FORMAT_LEFT);
m_columns.emplace_back( _HKI( "Layer" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( _HKI( "Priority" ), 2, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "X" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "Y" ), 3, wxLIST_FORMAT_CENTER );
}
@ -200,11 +200,11 @@ wxString ZONE_SEARCH_HANDLER::getResultCell( BOARD_ITEM* aItem, int aCol )
TEXT_SEARCH_HANDLER::TEXT_SEARCH_HANDLER( PCB_EDIT_FRAME* aFrame ) :
PCB_SEARCH_HANDLER( wxT( "Text" ), aFrame )
PCB_SEARCH_HANDLER( _HKI( "Text" ), aFrame )
{
m_columns.emplace_back( wxT( "Type" ), 2, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( wxT( "Text" ), 12, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( wxT( "Layer" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( _HKI( "Type" ), 2, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Text" ), 12, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Layer" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "X" ), 3, wxLIST_FORMAT_CENTER );
m_columns.emplace_back( wxT( "Y" ), 3, wxLIST_FORMAT_CENTER );
}
@ -268,10 +268,10 @@ wxString TEXT_SEARCH_HANDLER::getResultCell( BOARD_ITEM* aItem, int aCol )
NETS_SEARCH_HANDLER::NETS_SEARCH_HANDLER( PCB_EDIT_FRAME* aFrame ) :
PCB_SEARCH_HANDLER( wxT( "Nets" ), aFrame )
PCB_SEARCH_HANDLER( _HKI( "Nets" ), aFrame )
{
m_columns.emplace_back( wxT( "Name" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( wxT( "Class" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Name" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( wxT( "Class" ), 6, wxLIST_FORMAT_LEFT ); // 9.0 TODO: wxT -> _HKI
}
@ -347,10 +347,10 @@ void NETS_SEARCH_HANDLER::ActivateItem( long aItemRow )
RATSNEST_SEARCH_HANDLER::RATSNEST_SEARCH_HANDLER( PCB_EDIT_FRAME* aFrame ) :
PCB_SEARCH_HANDLER( wxT( "Ratsnest" ), aFrame )
PCB_SEARCH_HANDLER( _HKI( "Ratsnest" ), aFrame )
{
m_columns.emplace_back( wxT( "Name" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( wxT( "Class" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( _HKI( "Name" ), 6, wxLIST_FORMAT_LEFT );
m_columns.emplace_back( wxT( "Class" ), 6, wxLIST_FORMAT_LEFT ); // 9.0 TODO: wxT -> _HKI
}