summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-07-13 01:10:09 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-07-13 01:10:55 +0200
commit4fa2a6e9aa8d4c689f04ab65df264f65b61ef858 (patch)
tree880c8e90bcf3d974f2714e7552ad507e06438d08 /src
parentTranslated using Weblate (Indonesian) (diff)
downloadnheko-4fa2a6e9aa8d4c689f04ab65df264f65b61ef858.tar.xz
Fix qml translations
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp17
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;