@@ -1,5 +1,5 @@
11/*
2− * Copyright 2013 Canonical Ltd.
2+ * Copyright 2013-2016 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
@@ -26,6 +26,9 @@
2626#include <QQmlContext>
2727#include <QQmlEngine>
2828#include <QDebug>
29+#include <QTranslator>
30+#include <QLibraryInfo>
31+#include <QLocale>
2932
3033IndicatorsClient::IndicatorsClient(int &argc, char **argv)
3134 : QObject(0),
@@ -33,6 +36,11 @@ IndicatorsClient::IndicatorsClient(int &argc, char **argv)
3336{
3437 m_application = new QApplication(argc, argv);
3538
39+ QTranslator qtTranslator;
40+ if (qtTranslator.load(QLocale(), QStringLiteral("qt_"), qgetenv("SNAP"), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
41+ m_application->installTranslator(&qtTranslator);
42+ }
43+
3644 QStringList args = m_application->arguments();
3745
3846 m_view = new QQuickView;
@@ -53,8 +61,7 @@ IndicatorsClient::IndicatorsClient(int &argc, char **argv)
5361 if (geometryArg.size() == 2) {
5462 m_view->resize(geometryArg.at(0).toInt(), geometryArg.at(1).toInt());
5563 }
56− }
57− else {
64+ } else {
5865 //Usable size on desktop
5966 m_view->setMinimumSize(QSize(480, 720));
6067 }
@@ -69,11 +76,6 @@ IndicatorsClient::~IndicatorsClient()
6976 delete m_application;
7077}
7178
72−void IndicatorsClient::setupUI()
73−{
74−
75−}
76−
7779int IndicatorsClient::run()
7880{
7981 m_view->show();