mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
Fix translation loading
Explanation see here: https://www.kdab.com/fixing-a-common-antipattern-when-loading-translations-in-qt/
This commit is contained in:
parent
3421728898
commit
da2f80df60
1 changed files with 3 additions and 2 deletions
|
@ -173,11 +173,12 @@ main(int argc, char *argv[])
|
|||
QString lang = QLocale::system().name();
|
||||
|
||||
QTranslator qtTranslator;
|
||||
qtTranslator.load("qt_" + lang, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
qtTranslator.load(
|
||||
QLocale(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
app.installTranslator(&qtTranslator);
|
||||
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load("nheko_" + lang, ":/translations");
|
||||
appTranslator.load(QLocale(), "nheko", "_", ":/translations");
|
||||
app.installTranslator(&appTranslator);
|
||||
|
||||
MainWindow w;
|
||||
|
|
Loading…
Reference in a new issue