kcms/region_language: re-add logic to distinguish pt from pt_BR

The Old KCM had this, but it was mistakenly left commented out in
the new one.

BUG: 456692
wilder-5.26
Han Young 4 years ago committed by Nate Graham
parent 8e52e330dd
commit 2e23093349
  1. 14
      kcms/region_language/languagelistmodel.cpp

@ -72,15 +72,11 @@ QString LanguageListModel::languageCodeToName(const QString &languageCode)
return i18nc("%1 is language name, %2 is language code name", "%1 (%2)", languageName, languageCode);
}
// if (locale.name() != languageCode && m_availableLanguages.contains(locale.name())) {
// // KDE languageCode got translated by QLocale to a locale code we also have on
// // the list. Currently this only happens with pt that gets translated to pt_BR.
// if (languageCode == QLatin1String("pt")) {
// return QLocale(QStringLiteral("pt_PT")).nativeLanguageName();
// }
// return i18nc("%1 is language name, %2 is language code name", "%1 (%2)", languageName, languageCode);
// }
// KDE languageCode got translated by QLocale to a locale code we also have on
// the list. Currently this only happens with pt that gets translated to pt_BR.
if (languageCode == QStringLiteral("pt_BR")) {
return i18nc("%1 is português in system locale name, Brazil is to distinguish European português and Brazilian português", "%1 (Brazil)", languageName);
}
return languageName;
}

Loading…
Cancel
Save