summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-12-11 11:56:03 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-12-11 11:56:03 +0900
commit96654f594bdd56110d353cdb013fd320e1e99ddd (patch)
treec999dc2a34d788a134f2720aceabf7b04da7d621 /app
parent0afbd6791199d891fe1291eec50d6b0619bca9b6 (diff)
Diffstat (limited to 'app')
-rw-r--r--app/Dashboard.qml27
-rw-r--r--app/translations/dashboard_fr_FR.ts62
-rw-r--r--app/translations/dashboard_ja_JP.ts53
-rw-r--r--app/translations/dashboard_zh_CN.ts58
4 files changed, 131 insertions, 69 deletions
diff --git a/app/Dashboard.qml b/app/Dashboard.qml
index 36c0dc3..2388641 100644
--- a/app/Dashboard.qml
+++ b/app/Dashboard.qml
@@ -280,19 +280,34 @@ ApplicationWindow {
RowLayout {
// visible: false
- anchors.left: parent.left
anchors.bottom: parent.bottom
- anchors.right: parent.right
+ anchors.horizontalCenter: parent.horizontalCenter
Repeater {
- model: ['C', 'fr_FR', 'ja_JP', 'zh_CN']
+ model: ListModel {
+ ListElement {
+ code: 'C'
+ language: QT_TR_NOOP('English')
+ }
+ ListElement {
+ code: 'fr_FR'
+ language: QT_TR_NOOP('French')
+ }
+ ListElement {
+ code: 'ja_JP'
+ language: QT_TR_NOOP('日本語')
+ }
+ ListElement {
+ code: 'zh_CN'
+ language: QT_TR_NOOP('中文简体')
+ }
+ }
Button {
- text: model.modelData
+ text: qsTr(model.language)
onClicked: {
- translator.language = model.modelData
+ translator.language = model.code
console.log ("Scale = " + screenInfo.scale_factor())
}
- Layout.fillWidth: true
}
}
}
diff --git a/app/translations/dashboard_fr_FR.ts b/app/translations/dashboard_fr_FR.ts
index 2b7cf6e..f6ff7a2 100644
--- a/app/translations/dashboard_fr_FR.ts
+++ b/app/translations/dashboard_fr_FR.ts
@@ -4,85 +4,107 @@
<context>
<name>Dashboard</name>
<message>
- <location filename="../Dashboard.qml" line="120"/>
+ <location filename="../Dashboard.qml" line="136"/>
<source>LEFT FRONT TIRE</source>
<translation>Pneu Avant Gauche</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="121"/>
- <location filename="../Dashboard.qml" line="130"/>
- <location filename="../Dashboard.qml" line="140"/>
- <location filename="../Dashboard.qml" line="150"/>
+ <location filename="../Dashboard.qml" line="137"/>
+ <location filename="../Dashboard.qml" line="146"/>
+ <location filename="../Dashboard.qml" line="156"/>
+ <location filename="../Dashboard.qml" line="166"/>
<source>%1 PSI</source>
<translation>Pression %1</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="129"/>
+ <location filename="../Dashboard.qml" line="145"/>
<source>LEFT REAR TIRE</source>
<translation>Pneu Arrière Gauche</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="139"/>
+ <location filename="../Dashboard.qml" line="155"/>
<source>RIGHT FRONT TIRE</source>
<translation>Pneu Avant Droit</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="149"/>
+ <location filename="../Dashboard.qml" line="165"/>
<source>RIGHT REAR TIRE</source>
<translation>Pneu Arrière Droit</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="171"/>
+ <location filename="../Dashboard.qml" line="187"/>
<source>(RPM)</source>
<translation>Tr/mn</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="201"/>
+ <location filename="../Dashboard.qml" line="217"/>
<source>LEVEL:</source>
<translation>Niveau:</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="210"/>
+ <location filename="../Dashboard.qml" line="226"/>
<source>%1 GALLONS</source>
<translation>%1 Litres</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="220"/>
+ <location filename="../Dashboard.qml" line="236"/>
<source>RANGE:</source>
<translation>Autonomie:</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="229"/>
+ <location filename="../Dashboard.qml" line="245"/>
<source>%1 MI</source>
<translation>%1 Km</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="239"/>
+ <location filename="../Dashboard.qml" line="255"/>
<source>AVG:</source>
<translation>Moyenne:</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="248"/>
+ <location filename="../Dashboard.qml" line="264"/>
<source>%1 MPG</source>
<translation>%1 l/100km</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="259"/>
+ <location filename="../Dashboard.qml" line="275"/>
<source>FUEL</source>
<translation>Carburant</translation>
</message>
+ <message>
+ <location filename="../Dashboard.qml" line="289"/>
+ <source>English</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Dashboard.qml" line="293"/>
+ <source>French</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Dashboard.qml" line="297"/>
+ <source>日本語</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Dashboard.qml" line="301"/>
+ <source>中文简体</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>C</source>
+ <translation type="obsolete">English</translation>
+ </message>
</context>
<context>
<name>main</name>
<message>
- <location filename="../main.cpp" line="50"/>
<source>port for binding</source>
- <translation>Port du Binder</translation>
+ <translation type="vanished">Port du Binder</translation>
</message>
<message>
- <location filename="../main.cpp" line="51"/>
<source>secret for binding</source>
- <translation>Secret Binder</translation>
+ <translation type="vanished">Secret Binder</translation>
</message>
</context>
</TS>
diff --git a/app/translations/dashboard_ja_JP.ts b/app/translations/dashboard_ja_JP.ts
index 06b25dc..bcaf86c 100644
--- a/app/translations/dashboard_ja_JP.ts
+++ b/app/translations/dashboard_ja_JP.ts
@@ -4,84 +4,91 @@
<context>
<name>Dashboard</name>
<message>
- <location filename="../Dashboard.qml" line="115"/>
+ <location filename="../Dashboard.qml" line="136"/>
<source>LEFT FRONT TIRE</source>
<translation>左前輪</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="116"/>
- <location filename="../Dashboard.qml" line="125"/>
- <location filename="../Dashboard.qml" line="135"/>
- <location filename="../Dashboard.qml" line="145"/>
+ <location filename="../Dashboard.qml" line="137"/>
+ <location filename="../Dashboard.qml" line="146"/>
+ <location filename="../Dashboard.qml" line="156"/>
+ <location filename="../Dashboard.qml" line="166"/>
<source>%1 PSI</source>
<translation>空気圧 %1</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="124"/>
+ <location filename="../Dashboard.qml" line="145"/>
<source>LEFT REAR TIRE</source>
<translation>左後輪</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="134"/>
+ <location filename="../Dashboard.qml" line="155"/>
<source>RIGHT FRONT TIRE</source>
<translation>右前輪</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="144"/>
+ <location filename="../Dashboard.qml" line="165"/>
<source>RIGHT REAR TIRE</source>
<translation>右後輪</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="166"/>
+ <location filename="../Dashboard.qml" line="187"/>
<source>(RPM)</source>
<translation>(RPM)</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="196"/>
+ <location filename="../Dashboard.qml" line="217"/>
<source>LEVEL:</source>
<translation>レベル:</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="205"/>
+ <location filename="../Dashboard.qml" line="226"/>
<source>%1 GALLONS</source>
<translation>%1 ガロン</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="215"/>
+ <location filename="../Dashboard.qml" line="236"/>
<source>RANGE:</source>
<translation>レンジ:</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="224"/>
+ <location filename="../Dashboard.qml" line="245"/>
<source>%1 MI</source>
<translation>%1 MI</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="234"/>
+ <location filename="../Dashboard.qml" line="255"/>
<source>AVG:</source>
<translation>平均:</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="243"/>
+ <location filename="../Dashboard.qml" line="264"/>
<source>%1 MPG</source>
<translation>%1 MPG</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="254"/>
+ <location filename="../Dashboard.qml" line="275"/>
<source>FUEL</source>
<translation>燃料</translation>
</message>
-</context>
-<context>
- <name>main</name>
<message>
- <location filename="../main.cpp" line="49"/>
- <source>port for binding</source>
+ <location filename="../Dashboard.qml" line="289"/>
+ <source>English</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Dashboard.qml" line="293"/>
+ <source>French</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Dashboard.qml" line="297"/>
+ <source>日本語</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../main.cpp" line="50"/>
- <source>secret for binding</source>
+ <location filename="../Dashboard.qml" line="301"/>
+ <source>中文简体</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/app/translations/dashboard_zh_CN.ts b/app/translations/dashboard_zh_CN.ts
index ece07f9..bead198 100644
--- a/app/translations/dashboard_zh_CN.ts
+++ b/app/translations/dashboard_zh_CN.ts
@@ -4,85 +4,103 @@
<context>
<name>Dashboard</name>
<message>
- <location filename="../Dashboard.qml" line="120"/>
+ <location filename="../Dashboard.qml" line="136"/>
<source>LEFT FRONT TIRE</source>
<translation>左前车胎</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="121"/>
- <location filename="../Dashboard.qml" line="130"/>
- <location filename="../Dashboard.qml" line="140"/>
- <location filename="../Dashboard.qml" line="150"/>
+ <location filename="../Dashboard.qml" line="137"/>
+ <location filename="../Dashboard.qml" line="146"/>
+ <location filename="../Dashboard.qml" line="156"/>
+ <location filename="../Dashboard.qml" line="166"/>
<source>%1 PSI</source>
<translation>%1 磅每平方英寸(PSI)</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="129"/>
+ <location filename="../Dashboard.qml" line="145"/>
<source>LEFT REAR TIRE</source>
<translation>左后车胎</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="139"/>
+ <location filename="../Dashboard.qml" line="155"/>
<source>RIGHT FRONT TIRE</source>
<translation>右前车胎</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="149"/>
+ <location filename="../Dashboard.qml" line="165"/>
<source>RIGHT REAR TIRE</source>
<translation>右后车胎</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="171"/>
+ <location filename="../Dashboard.qml" line="187"/>
<source>(RPM)</source>
<translation>引擎转速</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="201"/>
+ <location filename="../Dashboard.qml" line="217"/>
<source>LEVEL:</source>
<translation>剩余油量:</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="210"/>
+ <location filename="../Dashboard.qml" line="226"/>
<source>%1 GALLONS</source>
<translation>%1 加仑</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="220"/>
+ <location filename="../Dashboard.qml" line="236"/>
<source>RANGE:</source>
<translation>续航里程:</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="229"/>
+ <location filename="../Dashboard.qml" line="245"/>
<source>%1 MI</source>
<translation>%1 英里</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="239"/>
+ <location filename="../Dashboard.qml" line="255"/>
<source>AVG:</source>
<translation type="unfinished">平均油耗:</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="248"/>
+ <location filename="../Dashboard.qml" line="264"/>
<source>%1 MPG</source>
<translation type="unfinished">%1 英里每加仑(MPG)</translation>
</message>
<message>
- <location filename="../Dashboard.qml" line="259"/>
+ <location filename="../Dashboard.qml" line="275"/>
<source>FUEL</source>
<translation>燃油</translation>
</message>
+ <message>
+ <location filename="../Dashboard.qml" line="289"/>
+ <source>English</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Dashboard.qml" line="293"/>
+ <source>French</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Dashboard.qml" line="297"/>
+ <source>日本語</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../Dashboard.qml" line="301"/>
+ <source>中文简体</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>main</name>
<message>
- <location filename="../main.cpp" line="50"/>
<source>port for binding</source>
- <translation>Binder端口</translation>
+ <translation type="vanished">Binder端口</translation>
</message>
<message>
- <location filename="../main.cpp" line="51"/>
<source>secret for binding</source>
- <translation>Binder令牌</translation>
+ <translation type="vanished">Binder令牌</translation>
</message>
</context>
</TS>