Merge pull request #220 from crumblingstatue/lang_embed_fallback
gui: Only load embedded translation if it doesn't exist in lang/
This commit is contained in:
commit
45c9a63157
|
@ -97,7 +97,12 @@ bool TranslationHandler::SetLanguage(const QString &code)
|
|||
mTranslator = new QTranslator(this);
|
||||
|
||||
//Load the new language
|
||||
QString translationFile = ":/" + mTranslations[index].mFilename;
|
||||
QString translationFile = "lang/" + mTranslations[index].mFilename;
|
||||
|
||||
if (!QFile::exists(translationFile + ".qm")) {
|
||||
translationFile = ":/" + mTranslations[index].mFilename;
|
||||
}
|
||||
|
||||
if (!mTranslator->load(translationFile) && !failure) {
|
||||
translationFile += ".qm";
|
||||
//If it failed, lets check if the default file exists
|
||||
|
|
Loading…
Reference in New Issue