COMMON: Look for translations.dat in Theme path before using SearchMan
This commit is contained in:
parent
2b03a3a0e6
commit
b35f4d31a6
1 changed files with 5 additions and 5 deletions
|
@ -223,7 +223,11 @@ String TranslationManager::getLangById(int id) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TranslationManager::openTranslationsFile(File& inFile) {
|
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;
|
ArchiveMemberList fileList;
|
||||||
SearchMan.listMatchingMembers(fileList, "translations.dat");
|
SearchMan.listMatchingMembers(fileList, "translations.dat");
|
||||||
for (ArchiveMemberList::iterator it = fileList.begin(); it != fileList.end(); ++it) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue