diff --git a/src/qt/main.cpp b/src/qt/main.cpp index 969c197..a630110 100644 --- a/src/qt/main.cpp +++ b/src/qt/main.cpp @@ -1,5 +1,5 @@ /* This file is part of whyblocked. - * Copyright © 2019 tastytea + * Copyright © 2019, 2020 tastytea * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,21 +14,24 @@ * along with this program. If not, see . */ -#include -#include #include "mainwindow.hpp" +#include +#include +#include + int main(int argc, char *argv[]) { QApplication app(argc, argv); QCoreApplication::setApplicationName("Whyblocked"); - + QTranslator qtTranslator; - qtTranslator.load("qt_" + QLocale::system().name(), + qtTranslator.load(QLocale(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + app.installTranslator(&qtTranslator); QTranslator appTranslator; - appTranslator.load("whyblocked_" + QLocale::system().name(), + appTranslator.load(QLocale(), "whyblocked", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath)); app.installTranslator(&appTranslator);