summaryrefslogtreecommitdiffstats
path: root/app/HVAC.qml
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qt.io>2017-12-27 20:34:03 +0900
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-29 17:26:33 +0100
commit4b7d58e71e8864a90d3b567f21029968d6e8edef (patch)
tree9f25bb4a64713bef08b020d090075c5f06cc7924 /app/HVAC.qml
parentd084bc1f764833566f3e8eafc9fc297c3fa9ee08 (diff)
Add basic translation support
Added French and Japanese translations Change-Id: I58eca5ffaad2367a4dd26b6472bdbcd45c957061 Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'app/HVAC.qml')
-rw-r--r--app/HVAC.qml12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/HVAC.qml b/app/HVAC.qml
index b3be443..c375f2f 100644
--- a/app/HVAC.qml
+++ b/app/HVAC.qml
@@ -18,11 +18,17 @@ import QtQuick 2.6
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import AGL.Demo.Controls 1.0
+import Translator 1.0
import 'api' as API
ApplicationWindow {
id: root
+ Translator {
+ id: translator
+// language: 'ja_JP'
+ }
+
API.Binding {
id: binding
url: bindingAddress
@@ -57,7 +63,7 @@ ApplicationWindow {
anchors.left: fanSpeedSlider.left
anchors.top: fanSpeedSlider.bottom
font.pixelSize: 32
- text: 'FAN SPEED'
+ text: translator.translate(qsTr('FAN SPEED'), translator.language)
}
}
}
@@ -89,7 +95,7 @@ ApplicationWindow {
Label {
anchors.centerIn: parent
color: parent.checked ? '#00ADDC' : '#848286'
- text: 'A/C'
+ text: translator.translate(qsTr('A/C'), translator.language)
font.pixelSize: parent.height / 3
}
onCheckedChanged: {
@@ -102,7 +108,7 @@ ApplicationWindow {
Label {
anchors.centerIn: parent
color: parent.checked ? '#00ADDC' : '#848286'
- text: 'AUTO'
+ text: translator.translate(qsTr('AUTO'), translator.language)
font.pixelSize: parent.height / 3
}
onCheckedChanged: {