From f08dc187499d2895f50f7e2e7e99bf698b0c0738 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 4 Nov 2016 18:40:24 +0100 Subject: cmake, main: add translation support --- gui/main-window.ui | 4 ++-- gui/main.cpp | 9 +++++++++ gui/options-dialog.ui | 47 +++++++++++++++++++++++++++++++++++++---------- 3 files changed, 48 insertions(+), 12 deletions(-) (limited to 'gui') diff --git a/gui/main-window.ui b/gui/main-window.ui index 3340aca0..e726d4d6 100644 --- a/gui/main-window.ui +++ b/gui/main-window.ui @@ -275,7 +275,7 @@ - Raw tracker data + Raw tracker data @@ -599,7 +599,7 @@ - Game data + Game data diff --git a/gui/main.cpp b/gui/main.cpp index 763f1cb5..de904f94 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -5,6 +5,8 @@ # include # include # include +# include +# include #endif #include "migration/migration.hpp" @@ -128,6 +130,8 @@ main(int argc, char** argv) QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif QApplication::setAttribute(Qt::AA_X11InitThreads, true); + + QTranslator t; QApplication app(argc, argv); set_qt_style(); @@ -137,6 +141,11 @@ main(int argc, char** argv) add_win32_path(); #endif + // QLocale::setDefault(QLocale("pl_PL")); // force i18n for testing + + (void) t.load(QLocale(), "", "", QCoreApplication::applicationDirPath() + "/i18n", ".qm"); + (void) QCoreApplication::installTranslator(&t); + do { mem w = std::make_shared(); diff --git a/gui/options-dialog.ui b/gui/options-dialog.ui index fba5e1a2..6606e28c 100644 --- a/gui/options-dialog.ui +++ b/gui/options-dialog.ui @@ -7,7 +7,7 @@ 0 0 459 - 616 + 615 @@ -40,6 +40,9 @@ Shortcuts + + 2 + @@ -68,6 +71,12 @@ QGroupBox { border: 0; } + + 4 + + + 0 + 20 @@ -201,6 +210,12 @@ + + + 3 + 0 + + @@ -218,6 +233,12 @@ + + + 7 + 0 + + Center @@ -333,7 +354,7 @@ - Enable + Enable tray @@ -538,10 +559,10 @@ - deg. + ° - 3 + 2 -180.000000000000000 @@ -607,10 +628,10 @@ - deg. + ° - 3 + 2 -180.000000000000000 @@ -660,10 +681,10 @@ - deg. + ° - 3 + 2 -180.000000000000000 @@ -1384,12 +1405,18 @@ CSV Data Logging - + - 0 + 11 + + + 0 + 1 + + Enable - You will be asked for a filename whenever tracking starts -- cgit v1.2.3