Fix translation issues and update location files

This commit is contained in:
Syping 2018-05-24 01:27:44 +02:00
parent eb505c7d8a
commit 65bc740b88
27 changed files with 532 additions and 58 deletions

View file

@ -602,7 +602,7 @@ QString TranslationClass::getCountryCode(QLocale::Country country)
country);
if (locales.isEmpty()) return QString();
QStringList localeStrList = locales.at(0).name().split("_");
if (localeStrList.length() <= 2)
if (localeStrList.length() >= 2)
{
return localeStrList.at(1).toLower();
}
@ -615,8 +615,9 @@ QString TranslationClass::getCountryCode(QLocale::Country country)
QString TranslationClass::getCountryCode(QLocale locale)
{
QStringList localeStrList = locale.name().split("_");
if (localeStrList.length() <= 2)
if (localeStrList.length() >= 2)
{
qDebug() << localeStrList;
return localeStrList.at(1).toLower();
}
else