diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-07-13 01:10:09 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-07-13 01:10:55 +0200 |
commit | 4fa2a6e9aa8d4c689f04ab65df264f65b61ef858 (patch) | |
tree | 880c8e90bcf3d974f2714e7552ad507e06438d08 /src | |
parent | Translated using Weblate (Indonesian) (diff) | |
download | nheko-4fa2a6e9aa8d4c689f04ab65df264f65b61ef858.tar.xz |
Fix qml translations
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 07397d62..3984f4ba 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -334,10 +334,21 @@ main(int argc, char *argv[]) QTranslator qtTranslator; if (qtTranslator.load(QLocale(), - QStringLiteral("qt"), + QStringLiteral("qtbase"), QStringLiteral("_"), - QLibraryInfo::path(QLibraryInfo::TranslationsPath))) + QLibraryInfo::path(QLibraryInfo::TranslationsPath))) { app.installTranslator(&qtTranslator); + } else + qDebug() << "Failed to load qtbase translations: " + << QLibraryInfo::path(QLibraryInfo::TranslationsPath); + QTranslator qmlTranslator; + if (qmlTranslator.load(QLocale(), + QStringLiteral("qtdeclarative"), + QStringLiteral("_"), + QLibraryInfo::path(QLibraryInfo::TranslationsPath))) { + app.installTranslator(&qmlTranslator); + } else + qDebug() << "Failed to load qtdeclarative translations"; QTranslator appTranslator; if (appTranslator.load(QLocale(), @@ -345,6 +356,8 @@ main(int argc, char *argv[]) QStringLiteral("_"), QStringLiteral(":/translations"))) app.installTranslator(&appTranslator); + else + qDebug() << "Failed to load nheko translations"; MainWindow w(nullptr); // QQuickView w; |