diff --git a/src/platform/qt/SettingsView.cpp b/src/platform/qt/SettingsView.cpp index a7be40269..a72bf0d7b 100644 --- a/src/platform/qt/SettingsView.cpp +++ b/src/platform/qt/SettingsView.cpp @@ -357,7 +357,7 @@ SettingsView::SettingsView(ConfigController* controller, InputController* inputC }); QLocale englishLocale("en"); - m_ui.languages->addItem(englishLocale.nativeLanguageName(), englishLocale); + m_ui.languages->addItem("English", englishLocale); QDir ts(":/translations/"); for (auto& name : ts.entryList()) { if (!name.endsWith(".qm") || !name.startsWith(binaryName)) { @@ -367,7 +367,17 @@ SettingsView::SettingsView(ConfigController* controller, InputController* inputC if (locale.language() == QLocale::English) { continue; } - m_ui.languages->addItem(locale.nativeLanguageName(), locale); + QString endonym = locale.nativeLanguageName(); + // Manualy handle some cases that Qt can't seem to do properly + if (locale.language() == QLocale::Spanish) { + // Qt insists this is called español de España, regardless of if we set the country + endonym = u8"Español"; + } else if (locale.language() == QLocale::Portuguese && locale.country() == QLocale::Brazil) { + // Qt insists that Brazilian Portuguese is just called Português + endonym = u8"Português brasileiro"; + } + endonym[0] = endonym[0].toUpper(); + m_ui.languages->addItem(endonym, locale); if (locale.bcp47Name() == QLocale().bcp47Name()) { m_ui.languages->setCurrentIndex(m_ui.languages->count() - 1); }