mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 18:05:36 -04:00
[libcalamares] Add convenience accessor for translations
- Which translations are available is a global property of Calamares itself, not of the plugins, so getting the model of available translations should live there. Move the relevant code (which is simple) from the Welcome module.
This commit is contained in:
parent
76b45a2740
commit
1857952431
3 changed files with 22 additions and 2 deletions
|
@ -131,7 +131,7 @@ WelcomePage::initLanguages()
|
|||
ui->languageWidget->clear();
|
||||
ui->languageWidget->setInsertPolicy( QComboBox::InsertAtBottom );
|
||||
|
||||
m_languages = new CalamaresUtils::Locale::LabelModel( QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';') );
|
||||
m_languages = CalamaresUtils::Locale::availableTranslations();
|
||||
ui->languageWidget->setModel( m_languages );
|
||||
ui->languageWidget->setItemDelegate( new LocaleTwoColumnDelegate( ui->languageWidget ) );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue