diff --git a/src/kcatalog.cpp b/src/kcatalog.cpp --- a/src/kcatalog.cpp +++ b/src/kcatalog.cpp @@ -136,19 +136,23 @@ } } - QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, - QStringLiteral("locale/") + relpath); - QString localeDir; - if (!file.isEmpty()) { #if defined(Q_OS_ANDROID) - // The exact file name must be returned on Android because libintl-lite loads a catalog by filename with bindtextdomain() - localeDir = file; +// The exact file name must be returned on Android because libintl-lite loads a catalog by filename with bindtextdomain() + QString file = QDir::homePath()+QStringLiteral("/../qt-reserved-files/share/locale/") + relpath; + if (!QFile::exists(file)) { + file.clear(); + } + return file; #else + const QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("locale/") + relpath); + + QString localeDir; + if (!file.isEmpty()) { // Path of the locale/ directory must be returned. localeDir = QFileInfo(file.left(file.size() - relpath.size())).absolutePath(); -#endif } return localeDir; +#endif } QSet KCatalog::availableCatalogLanguages(const QByteArray &domain_)