[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").
main
Adriaan de Groot 7 years ago
parent b0e5e13221
commit 39bf2eb9aa

@ -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…
Cancel
Save