qt in german
This commit is contained in:
parent
454c7881ec
commit
e13339a432
1 changed files with 17 additions and 2 deletions
|
@ -1,9 +1,11 @@
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
#include "settingsdialog.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include "settingsdialog.h"
|
#include <QTranslator>
|
||||||
|
#include <QLibraryInfo>
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
@ -20,12 +22,25 @@ int main(int argc, char* argv[])
|
||||||
QCoreApplication::setOrganizationDomain("rustysoft.de");
|
QCoreApplication::setOrganizationDomain("rustysoft.de");
|
||||||
QCoreApplication::setApplicationName("KIMA2");
|
QCoreApplication::setApplicationName("KIMA2");
|
||||||
|
|
||||||
|
QTranslator qTranslator;
|
||||||
|
QLocale german(QLocale::German);
|
||||||
|
#ifdef __linux__
|
||||||
|
qTranslator.load("qt_" + german.name(),
|
||||||
|
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||||
|
#endif
|
||||||
|
#ifdef _WIN32
|
||||||
|
qtTranslator.load("qt_" + german.name(),
|
||||||
|
QApplication::applicationDirPath() + QDir::separator() + "translations");
|
||||||
|
#endif
|
||||||
|
kimaApp.installTranslator(&qTranslator);
|
||||||
|
|
||||||
QSettings settings{};
|
QSettings settings{};
|
||||||
while (!settings.contains("global/cashPointNo")) {
|
while (!settings.contains("global/cashPointNo")) {
|
||||||
QMessageBox(QMessageBox::Icon::Information, "Erster Start von KIMA2",
|
QMessageBox(QMessageBox::Icon::Information, "Erster Start von KIMA2",
|
||||||
"Es wurden keine Einstellungen gefunden. Vermutlich starteten Sie KIMA2 zum "
|
"Es wurden keine Einstellungen gefunden. Vermutlich starteten Sie KIMA2 zum "
|
||||||
"ersten Mal. Bitte legen Sie nun die Einstellungen fest.",
|
"ersten Mal. Bitte legen Sie nun die Einstellungen fest.",
|
||||||
QMessageBox::StandardButton::Ok).exec();
|
QMessageBox::StandardButton::Ok)
|
||||||
|
.exec();
|
||||||
SettingsDialog().exec();
|
SettingsDialog().exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue