Use translated strings for property display

This commit is contained in:
Jon Evans 2022-12-21 18:03:15 -05:00
parent 47dc2379d8
commit 1590e48ec1
5 changed files with 11 additions and 2 deletions

View File

@ -159,7 +159,7 @@ wxPGProperty* PGPropertyFactory( const PROPERTY_BASE* aProperty )
if( ret ) if( ret )
{ {
ret->SetLabel( aProperty->Name() ); ret->SetLabel( wxGetTranslation( aProperty->Name() ) );
ret->SetName( aProperty->Name() ); ret->SetName( aProperty->Name() );
ret->Enable( !aProperty->IsReadOnly() ); ret->Enable( !aProperty->IsReadOnly() );
ret->SetHelpString( aProperty->Name() ); ret->SetHelpString( aProperty->Name() );

View File

@ -122,6 +122,12 @@ PROPERTIES_PANEL::PROPERTIES_PANEL( wxWindow* aParent, EDA_BASE_FRAME* aFrame )
} }
void PROPERTIES_PANEL::OnLanguageChanged()
{
UpdateData();
}
void PROPERTIES_PANEL::update( const SELECTION& aSelection ) void PROPERTIES_PANEL::update( const SELECTION& aSelection )
{ {
if( m_skipNextUpdate ) if( m_skipNextUpdate )

View File

@ -65,6 +65,8 @@ public:
void SetSplitterProportion( float aProportion ); void SetSplitterProportion( float aProportion );
float SplitterProportion() const { return m_splitter_key_proportion; } float SplitterProportion() const { return m_splitter_key_proportion; }
void OnLanguageChanged();
protected: protected:
virtual void update( const SELECTION& aSelection ); virtual void update( const SELECTION& aSelection );
virtual wxPGProperty* createPGProperty( const PROPERTY_BASE* aProperty ) const = 0; virtual wxPGProperty* createPGProperty( const PROPERTY_BASE* aProperty ) const = 0;

View File

@ -1438,6 +1438,7 @@ void PCB_EDIT_FRAME::ShowChangedLanguage()
m_appearancePanel->OnLanguageChanged(); m_appearancePanel->OnLanguageChanged();
m_selectionFilterPanel->OnLanguageChanged(); m_selectionFilterPanel->OnLanguageChanged();
m_propertiesPanel->OnLanguageChanged();
UpdateTitle(); UpdateTitle();
} }

View File

@ -98,7 +98,7 @@ wxPGProperty* PCB_PROPERTIES_PANEL::createPGProperty( const PROPERTY_BASE* aProp
return m_frame->GetColorSettings()->GetColor( l ).ToColour(); return m_frame->GetColorSettings()->GetColor( l ).ToColour();
} ); } );
ret->SetLabel( aProperty->Name() ); ret->SetLabel( wxGetTranslation( aProperty->Name() ) );
ret->SetName( aProperty->Name() ); ret->SetName( aProperty->Name() );
ret->Enable( !aProperty->IsReadOnly() ); ret->Enable( !aProperty->IsReadOnly() );
ret->SetClientData( const_cast<PROPERTY_BASE*>( aProperty ) ); ret->SetClientData( const_cast<PROPERTY_BASE*>( aProperty ) );