summaryrefslogtreecommitdiffstats
path: root/app/HeatDegree.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/HeatDegree.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/HeatDegree.qml')
-rw-r--r--app/HeatDegree.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/HeatDegree.qml b/app/HeatDegree.qml
index aa5770a..a9bc83c 100644
--- a/app/HeatDegree.qml
+++ b/app/HeatDegree.qml
@@ -28,11 +28,11 @@ ListView {
property int degree: currentIndex > -1 ? model.get(currentIndex).value : -1
model: ListModel {
Component.onCompleted: {
- append({value: 15, modelData: 'LO'})
+ append({value: 15, modelData: translator.translate(qsTr('LO'), translator.language)})
for (var d = 16; d < 30; d++) {
- append({value: d, modelData: d.toFixed(0) + '\u00b0'})
+ append({value: d, modelData: translator.translate(qsTr('%1\u00b0'), translator.language).arg(d.toFixed(0))})
}
- append({value: 30, modelData: 'HI'})
+ append({value: 30, modelData: translator.translate(qsTr('HI'), translator.language)})
}
}
delegate: Label {
@@ -41,7 +41,7 @@ ListView {
horizontalAlignment: Label.AlignHCenter
verticalAlignment: Label.AlignVCenter
text: model.modelData
- font.pixelSize: height * 0.8
+ font.pixelSize: height * 0.7
color: (ListView.view.enabled && ListView.isCurrentItem) ? '#00ADDC' : 'white'
}