fixed en_GB, en_US, de_DE vs de_AT issues at the System Name Language

This commit is contained in:
Rafael 2016-04-19 05:46:10 +02:00
parent 45c386eb31
commit 2d28e80074

View file

@ -81,9 +81,13 @@ void OptionsDialog::setupLanguageBox()
currentLanguage = settings->value("Language","System").toString(); currentLanguage = settings->value("Language","System").toString();
settings->endGroup(); settings->endGroup();
QString cbSysStr = tr("%1 (%2 if available) [sys]", "System like PC System = %1, System Language like Deutsch = %2").arg(tr("System", QStringList langList = QLocale::system().name().split("_");
"System like PC System"), QLocale::system().nativeLanguageName()); if (langList.length() > 0)
{
QString cbSysStr = tr("%1 (%2 if available)", "System like PC System = %1, System Language like Deutsch = %2").arg(tr("System",
"System like PC System"), QLocale::languageToString(QLocale(langList.at(0)).language()));
ui->cbLanguage->addItem(cbSysStr, "System"); ui->cbLanguage->addItem(cbSysStr, "System");
}
QString cbEngStr = "English (English) [en]"; QString cbEngStr = "English (English) [en]";
ui->cbLanguage->addItem(QIcon::fromTheme("flag-us"), cbEngStr, "en"); ui->cbLanguage->addItem(QIcon::fromTheme("flag-us"), cbEngStr, "en");