2023-01-07 12:44:45 +01:00
|
|
|
#include "mainwindow.h"
|
2023-01-23 10:04:54 +01:00
|
|
|
|
2023-01-22 14:33:23 +01:00
|
|
|
#include <QTranslator>
|
|
|
|
|
2023-01-07 12:44:45 +01:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QApplication a(argc, argv);
|
2023-01-18 23:12:21 +01:00
|
|
|
QTranslator myappTranslator;
|
2023-01-22 14:33:23 +01:00
|
|
|
|
2023-01-23 23:42:20 +01:00
|
|
|
QCoreApplication::setOrganizationName("RsyncUI");
|
|
|
|
QCoreApplication::setApplicationName("RsyncUI");
|
2023-02-10 23:27:44 +01:00
|
|
|
|
2023-01-23 23:42:20 +01:00
|
|
|
// Initialization of localization
|
2023-01-18 23:12:21 +01:00
|
|
|
QLocale localeName = QLocale::system();
|
2023-02-12 19:11:06 +01:00
|
|
|
QString localeDir = "/usr/share/locale/" + localeName.name() + "/LC_MESSAGES/"; //RsyncUI_" + localeName.name() + ".qm";
|
|
|
|
QString localeFilename = QCoreApplication::applicationName() + "_" + localeName.name();
|
|
|
|
QLocale locale = QLocale();
|
|
|
|
|
|
|
|
if (myappTranslator.load(localeFilename, localeDir))
|
2023-01-18 23:12:21 +01:00
|
|
|
{
|
|
|
|
a.installTranslator(&myappTranslator);
|
|
|
|
}
|
|
|
|
|
2023-01-07 12:44:45 +01:00
|
|
|
MainWindow w;
|
|
|
|
w.show();
|
2023-02-15 13:49:31 +01:00
|
|
|
w.init();
|
2023-01-07 12:44:45 +01:00
|
|
|
return a.exec();
|
|
|
|
}
|