[welcome] Only show (country) in list if the locale suggests it

- A locale suggests it is country-specific by having the form <lang>_<country>
 - This mostly fixes locale "ar" being presented as "Arabiy (Misr)" when
   there is no need to (and the RTL is messed up then, too).
main
Adriaan de Groot 7 years ago
parent 59537d86d6
commit 7c944760fc

@ -141,7 +141,7 @@ struct LocaleLabel
QString sortKey = QLocale::languageToString( thisLocale.language() ); QString sortKey = QLocale::languageToString( thisLocale.language() );
QString label = thisLocale.nativeLanguageName(); QString label = thisLocale.nativeLanguageName();
if ( QLocale::countriesForLanguage( thisLocale.language() ).count() > 2 ) if ( locale.contains( '_' ) && QLocale::countriesForLanguage( thisLocale.language() ).count() > 2 )
{ {
sortKey.append( QString( " (%1)" ) sortKey.append( QString( " (%1)" )
.arg( QLocale::countryToString( thisLocale.country() ) ) ); .arg( QLocale::countryToString( thisLocale.country() ) ) );

Loading…
Cancel
Save