diff --git a/mscore/musescore.cpp b/mscore/musescore.cpp index 7d5da021ddae..7ea9ccdf7482 100644 --- a/mscore/musescore.cpp +++ b/mscore/musescore.cpp @@ -2083,8 +2083,12 @@ void loadTranslation(QString filename, QString localeName) // qDebug() << userFi.exists(); // qDebug() << userFi.lastModified() << defaultFi.lastModified(); - if (userFi.exists() && userFi.lastModified() > defaultFi.lastModified()) - lp = userlp; + if (userFi.exists()) { + if (userFi.lastModified() > defaultFi.lastModified()) + lp = userlp; + else + QFile::remove(userlp + ".qm"); + } if (MScore::debugMode) qDebug("load translator <%s>", qPrintable(lp)); bool success = translator->load(lp); diff --git a/mscore/resourceManager.cpp b/mscore/resourceManager.cpp index c8283b2e1241..bcfd7f504261 100644 --- a/mscore/resourceManager.cpp +++ b/mscore/resourceManager.cpp @@ -120,11 +120,13 @@ void ResourceManager::displayLanguages() bool ResourceManager::verifyLanguageFile(QString filename, QString hash) { QString local = dataPath + "/locale/" + filename; + QString global = mscoreGlobalShare + "locale/" + filename; QFileInfo fileLocal(local); - if(!fileLocal.exists()) - local = mscoreGlobalShare + "locale/" + filename;; + QFileInfo fileGlobal(global); + if(!fileLocal.exists() || (fileLocal.lastModified() <= fileGlobal.lastModified()) ) + local = mscoreGlobalShare + "locale/" + filename; - return verifyFile(local, hash); + return verifyFile(local, hash); } void ResourceManager::download() @@ -146,7 +148,7 @@ void ResourceManager::download() button->setEnabled(1); } else { - // unzip and delete + // unzip and delete MQZipReader zipFile(localPath); QFileInfo zfi(localPath); QString destinationDir(zfi.absolutePath());