mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-05-12 16:19:44 -06:00
Qt: use code.contains('_') instead of territory.isEmpty()
QLocale("en") resolves territory to UnitedStates not AnyTerritory,
so territory.isEmpty() is never true. Check the locale code string
itself for an underscore to distinguish pt_BR from en/ja.
This commit is contained in:
parent
b6761dfbc0
commit
ac15bbf514
@ -2299,7 +2299,7 @@ void main_window::UpdateLanguageActions(const QStringList& language_codes, const
|
||||
const QLocale locale = QLocale(code);
|
||||
const QString locale_name = QLocale::languageToString(locale.language());
|
||||
const QString territory = QLocale::territoryToString(locale.territory());
|
||||
const QString display_name = territory.isEmpty() ? locale_name : QString("%1 (%2)").arg(locale_name, territory);
|
||||
const QString display_name = code.contains('_') ? QString("%1 (%2)").arg(locale_name, territory) : locale_name;
|
||||
|
||||
// create new action
|
||||
QAction* act = new QAction(display_name, this);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user