aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/translation.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/translation.cpp b/common/translation.cpp
index 59488c2dd5..e456f733fd 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -223,7 +223,11 @@ String TranslationManager::getLangById(int id) const {
}
bool TranslationManager::openTranslationsFile(File& inFile) {
- // First try to open it using the SearchMan.
+ // First look in the Themepath if we can find the file.
+ if (ConfMan.hasKey("themepath") && openTranslationsFile(FSNode(ConfMan.get("themepath")), inFile))
+ return true;
+
+ // Then try to open it using the SearchMan.
ArchiveMemberList fileList;
SearchMan.listMatchingMembers(fileList, "translations.dat");
for (ArchiveMemberList::iterator it = fileList.begin(); it != fileList.end(); ++it) {
@@ -235,10 +239,6 @@ bool TranslationManager::openTranslationsFile(File& inFile) {
}
}
- // Then look in the Themepath if we can find the file.
- if (ConfMan.hasKey("themepath"))
- return openTranslationsFile(FSNode(ConfMan.get("themepath")), inFile);
-
return false;
}