mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 09:55:37 -04:00
[welcome] Fix display of unsupported locales
- Some locales have no nativeLanguageName(), so instead display the locale id (e.g. "eo") and the resulting language in English (which, if it is really unsupported, will be "C").
This commit is contained in:
parent
b0e5e13221
commit
39bf2eb9aa
1 changed files with 3 additions and 0 deletions
|
@ -141,6 +141,9 @@ struct LocaleLabel
|
|||
QString sortKey = QLocale::languageToString( m_locale.language() );
|
||||
QString label = m_locale.nativeLanguageName();
|
||||
|
||||
if ( label.isEmpty() )
|
||||
label = QString( QLatin1Literal( "* %1 (%2)" ) ).arg( locale, sortKey );
|
||||
|
||||
if ( locale.contains( '_' ) && QLocale::countriesForLanguage( m_locale.language() ).count() > 2 )
|
||||
{
|
||||
QLatin1Literal countrySuffix( " (%1)" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue