set( _tx_good as be ca@valencia cs_CZ da fr fur it_IT ml nl pt_PT
ru sk tg tr_TR vi zh_CN )
set( _tx_ok ar ast bg bn el en_GB es es_MX es_PR et eu fa gl hu id
- is mr nb pl ro si sl sr sr@latin th zh_HK )
+ is mr nb pl ro si sl sr sr@latin th )
set( _tx_incomplete eo es_PE fr_CH gu id_ID ie kk kn ko_KR lo lv mk
- ne ne_NP ru_RU te ur uz zh )
+ ne ne_NP ru_RU te ur uz )
### Required versions
#
static QString name = QStringLiteral( "Català (València)" );
return { nullptr, &name };
}
+ if ( localeName == "zh_CN" )
+ {
+ // Simplified Chinese, but drop the (China) from the name
+ static QString name = QStringLiteral( "简体中文" );
+ return { nullptr, &name };
+ }
+ if ( localeName == "zh_TW" )
+ {
+ // Traditional Chinese, but drop (Taiwan) from the name
+ static QString name = QStringLiteral( "繁體中文" );
+ return { nullptr, &name };
+ }
return { nullptr, nullptr };
}
}
bool needsCountryName = ( format == LabelFormat::AlwaysWithCountry )
- || ( localeId.name.contains( '_' ) && QLocale::countriesForLanguage( m_locale.language() ).count() > 1 );
- QString countryName = ( needsCountryName ?
-
- m_locale.nativeCountryName()
- : QString() );
+ || ( !name && localeId.name.contains( '_' )
+ && QLocale::countriesForLanguage( m_locale.language() ).count() > 1 );
+ QString countryName = needsCountryName ? m_locale.nativeCountryName() : QString();
m_label = needsCountryName ? longFormat.arg( languageName, countryName ) : languageName;
m_englishLabel = needsCountryName ? longFormat.arg( englishName, QLocale::countryToString( m_locale.country() ) )
: englishName;