diff options
author | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2017-11-20 17:19:14 +0900 |
---|---|---|
committer | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2017-11-29 09:54:57 +0000 |
commit | 464e6c7f6056cec8a1d150216338d58a827307e6 (patch) | |
tree | 30b7e6321b3bbff40dfc230c3f68248b409be261 /app/main.cpp | |
parent | 16ab0b453ac9a2341342b927c14ceb426e39ff05 (diff) |
I18N: add basic functionality and a few translations
Added very first i18n support in the simple application.
Placed language buttons at the bottom to change current language.
They should be removed once current language comes from somewhere.
Laying out issues should be fixed later.
Change-Id: Ib5d646784820cb2753edd5a588a8826ad7d20539
Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Diffstat (limited to 'app/main.cpp')
-rw-r--r-- | app/main.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/app/main.cpp b/app/main.cpp index 9649b82..d7f15b5 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -14,14 +14,17 @@ * limitations under the License. */ -#include <QUrlQuery> -#include <QQmlContext> #include <QtCore/QDebug> -#include <QCommandLineParser> +#include <QtCore/QCommandLineParser> +#include <QtCore/QUrlQuery> #include <QtGui/QGuiApplication> +#include <QtQml/QQmlContext> #include <QtQml/QQmlApplicationEngine> +#include <QtQuick/QQuickWindow> #include <QtQuickControls2/QQuickStyle> -#include <QQuickWindow> + +#include "translator.h" + #include <libhomescreen.hpp> #include <qlibwindowmanager.h> @@ -45,6 +48,8 @@ int main(int argc, char *argv[]) parser.process(app); QStringList positionalArguments = parser.positionalArguments(); + qmlRegisterType<Translator>("Translator", 1, 0, "Translator"); + QQmlApplicationEngine engine; if (positionalArguments.length() == 2) { int port = positionalArguments.takeFirst().toInt(); |