don't warn when loading of translation fails

This commit is contained in:
Patrick von Reth 2015-05-02 14:26:27 +02:00
parent a7b5b699de
commit db67233d2c

View File

@ -240,12 +240,12 @@ void SnoreCorePrivate::loadTranslator()
if (locale != "C") {
QTranslator *translator = new QTranslator(qApp->instance());
if (translator->load(locale, ":/lang/libsnore/")) {
snoreDebug(SNORE_INFO) << "Using system locale:" << locale;
snoreDebug(SNORE_INFO) << qApp->installTranslator(translator);
snoreDebug(SNORE_DEBUG) << "Using system locale:" << locale;
snoreDebug(SNORE_DEBUG) << qApp->installTranslator(translator);
} else {
translator->deleteLater();
QString fileName = QString(":/lang/libsnore/%1.qm").arg(locale);
snoreDebug(SNORE_WARNING) << "Failed to load translations for:" << locale << fileName << QFile::exists(fileName) ;
snoreDebug(SNORE_DEBUG) << "Failed to load translations for:" << locale << fileName << QFile::exists(fileName) ;
return false;
}
}