1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Don't try to load translations for C locale

This commit is contained in:
David Rosca 2014-12-27 12:32:16 +01:00
parent 3511e0401b
commit c1901cd81d

View File

@ -970,9 +970,12 @@ void MainApplication::translateApp()
{ {
QString file = Settings().value(QSL("Language/language"), QLocale::system().name()).toString(); QString file = Settings().value(QSL("Language/language"), QLocale::system().name()).toString();
if (!file.isEmpty() && !file.endsWith(QL1S(".qm"))) { // It can only be "C" locale, for which we will use default English language
if (file.size() < 2)
file.clear();
if (!file.isEmpty() && !file.endsWith(QL1S(".qm")))
file.append(QL1S(".qm")); file.append(QL1S(".qm"));
}
// Either we load default language (with empty file), or we attempt to load xx.qm (xx_yy.qm) // Either we load default language (with empty file), or we attempt to load xx.qm (xx_yy.qm)
Q_ASSERT(file.isEmpty() || file.size() >= 5); Q_ASSERT(file.isEmpty() || file.size() >= 5);