From e927708f78f3fdcfdafba01e09f28b8c8be0c718 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sat, 26 Aug 2023 23:39:34 +0800 Subject: [PATCH] i18n: better approach to load translations --- app/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.cpp b/app/main.cpp index e1b38d0..5fcd4dd 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) #else qmDir = QT_STRINGIFY(QM_FILE_INSTALL_DIR); #endif - if (translator.load(QString("PineapplePictures_%1").arg(QLocale::system().name()), qmDir)) { + if (translator.load(QLocale(), QLatin1String("PineapplePictures"), QLatin1String("_"), qmDir)) { a.installTranslator(&translator); } a.setApplicationName("Pineapple Pictures");