From 7c944760fc73772c1d117670269c1066149ad230 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 19 Apr 2018 07:19:10 -0400 Subject: [PATCH] [welcome] Only show (country) in list if the locale suggests it - A locale suggests it is country-specific by having the form _ - This mostly fixes locale "ar" being presented as "Arabiy (Misr)" when there is no need to (and the RTL is messed up then, too). --- src/modules/welcome/WelcomePage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp index eff0aeb47..46041e063 100644 --- a/src/modules/welcome/WelcomePage.cpp +++ b/src/modules/welcome/WelcomePage.cpp @@ -141,7 +141,7 @@ struct LocaleLabel QString sortKey = QLocale::languageToString( thisLocale.language() ); QString label = thisLocale.nativeLanguageName(); - if ( QLocale::countriesForLanguage( thisLocale.language() ).count() > 2 ) + if ( locale.contains( '_' ) && QLocale::countriesForLanguage( thisLocale.language() ).count() > 2 ) { sortKey.append( QString( " (%1)" ) .arg( QLocale::countryToString( thisLocale.country() ) ) );