[partition] Factor out manual partitioning translation

- needs to be called when the button is created, too
This commit is contained in:
Adriaan de Groot 2021-08-04 01:42:00 +02:00
parent c5fa6383d7
commit 390acd41b2
2 changed files with 14 additions and 5 deletions

View File

@ -140,12 +140,8 @@ ChoicePage::retranslate()
m_previewBeforeLabel->setText( tr( "Current:" ) ); m_previewBeforeLabel->setText( tr( "Current:" ) );
m_previewAfterLabel->setText( tr( "After:" ) ); m_previewAfterLabel->setText( tr( "After:" ) );
if ( m_somethingElseButton )
{
m_somethingElseButton->setText( tr( "<strong>Manual partitioning</strong><br/>"
"You can create or resize partitions yourself." ) );
}
updateSwapChoicesTr( m_eraseSwapChoiceComboBox ); updateSwapChoicesTr( m_eraseSwapChoiceComboBox );
updateChoiceButtonsTr();
} }
@ -342,6 +338,8 @@ ChoicePage::setupChoices()
this, this,
&ChoicePage::onEraseSwapChoiceChanged ); &ChoicePage::onEraseSwapChoiceChanged );
} }
updateChoiceButtonsTr();
} }
@ -1664,6 +1662,16 @@ ChoicePage::updateSwapChoicesTr( QComboBox* box )
} }
} }
void
ChoicePage::updateChoiceButtonsTr()
{
if ( m_somethingElseButton )
{
m_somethingElseButton->setText( tr( "<strong>Manual partitioning</strong><br/>"
"You can create or resize partitions yourself." ) );
}
}
int int
ChoicePage::lastSelectedDeviceIndex() ChoicePage::lastSelectedDeviceIndex()
{ {

View File

@ -125,6 +125,7 @@ private:
// Translations support // Translations support
void updateSwapChoicesTr( QComboBox* box ); void updateSwapChoicesTr( QComboBox* box );
void updateChoiceButtonsTr();
Config* m_config; Config* m_config;
bool m_nextEnabled; bool m_nextEnabled;