mirror of
https://github.com/QuasarApp/QuasarAppLib.git
synced 2025-05-04 21:49:42 +00:00
fix load languags
This commit is contained in:
parent
3cf69bb5a3
commit
79d2a8ccb3
@ -21,11 +21,9 @@ using namespace QuasarAppUtils;
|
||||
bool QuasarAppUtils::Locales::findQm(const QString& localePrefix,
|
||||
QFileInfoList &qmFiles) {
|
||||
|
||||
if (localePrefix.isEmpty())
|
||||
if (localePrefix.size() < 2)
|
||||
return false;
|
||||
|
||||
qDebug() << "Search for " << localePrefix;
|
||||
|
||||
const auto prefixes = localePrefix.split(QRegularExpression("[_-]"));
|
||||
|
||||
auto prefixIt = prefixes.begin();
|
||||
@ -34,8 +32,6 @@ bool QuasarAppUtils::Locales::findQm(const QString& localePrefix,
|
||||
qmFiles += QDir(location).entryInfoList({"*" + (*prefixIt).toLower() + "*.qm"}, QDir::Files);
|
||||
}
|
||||
|
||||
qDebug() << "Found" << qmFiles;
|
||||
|
||||
return qmFiles.size();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user