Fix cover page text

This commit is contained in:
Matti Viljanen 2020-06-14 15:56:14 +03:00
parent a5a8d4fbda
commit 0bf676f0d2
No known key found for this signature in database
GPG key ID: CF32A1495158F888
6 changed files with 25 additions and 45 deletions

View file

@ -36,11 +36,11 @@ CoverBackground {
onChargeChanged: updateView() onChargeChanged: updateView()
function updateView() { function updateView() {
if(charge <= settings.lowerLimit && battery.state === "discharging") { if(charge <= settings.lowerLimit && battery.state === "discharging") {
coverText.text = qsTr("Connect\ncharger") coverText.text = qsTr("Connect charger")
} }
else if(battery.charge >= settings.upperLimit && else if(battery.charge >= settings.upperLimit &&
(battery.state === "charging" || battery.state === "idle")) { (battery.state === "charging" || battery.state === "idle")) {
coverText.text = qsTr("Disconnect\ncharger") coverText.text = qsTr("Disconnect charger")
} }
else if(battery.chargerConnected && battery.state === "charging") { else if(battery.chargerConnected && battery.state === "charging") {
coverText.text = qsTr("Charging") coverText.text = qsTr("Charging")
@ -49,7 +49,7 @@ CoverBackground {
coverText.text = qsTr("Not charging") coverText.text = qsTr("Not charging")
} }
else { // Discharging else { // Discharging
coverText.text = qsTr("Battery\nBuddy") coverText.text = qsTr("Battery Buddy")
} }
} }
} }

View file

@ -43,20 +43,16 @@
<translation>Akku ei\nlatauksessa</translation> <translation>Akku ei\nlatauksessa</translation>
</message> </message>
<message> <message>
<source>Connect <source>Connect charger</source>
charger</source> <translation>Kytke laturi</translation>
<translation>Kytke\nlaturi</translation>
</message> </message>
<message> <message>
<source>Disconnect <source>Disconnect charger</source>
charger</source> <translation>Irrota laturi</translation>
<translation>Irrota\nlaturi</translation>
</message> </message>
<message> <message>
<source>Battery <source>Battery Buddy</source>
Buddy</source> <translation>Battery Buddy</translation>
<translation>Battery
Buddy</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -35,18 +35,15 @@
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message> <message>
<source>Connect <source>Connect charger</source>
charger</source>
<translation>Branchez le chargeur</translation> <translation>Branchez le chargeur</translation>
</message> </message>
<message> <message>
<source>Disconnect <source>Disconnect charger</source>
charger</source>
<translation>Débranchez le chargeur</translation> <translation>Débranchez le chargeur</translation>
</message> </message>
<message> <message>
<source>Battery <source>Battery Buddy</source>
Buddy</source>
<translation>Battery Buddy</translation> <translation>Battery Buddy</translation>
</message> </message>
<message> <message>

View file

@ -43,22 +43,16 @@
<translation>Laddar inte</translation> <translation>Laddar inte</translation>
</message> </message>
<message> <message>
<source>Connect <source>Connect charger</source>
charger</source> <translation>Anslut laddare</translation>
<translation>Anslut
laddare</translation>
</message> </message>
<message> <message>
<source>Disconnect <source>Disconnect charger</source>
charger</source> <translation>Koppla ifrån laddaren</translation>
<translation>Koppla ifrån
laddaren</translation>
</message> </message>
<message> <message>
<source>Battery <source>Battery Buddy</source>
Buddy</source> <translation>Battery Buddy</translation>
<translation>Battery
Buddy</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -35,20 +35,16 @@
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message> <message>
<source>Connect <source>Connect charger</source>
charger</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<source>Disconnect <source>Disconnect charger</source>
charger</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<source>Battery <source>Battery Buddy</source>
Buddy</source> <translation>Battery Buddy</translation>
<translation>Battery
Buddy</translation>
</message> </message>
<message> <message>
<source>Charging</source> <source>Charging</source>

View file

@ -43,18 +43,15 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Connect <source>Connect charger</source>
charger</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Disconnect <source>Disconnect charger</source>
charger</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Battery <source>Battery Buddy</source>
Buddy</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>