mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
kcms/powermanagement: Make battery page localizable
This commit is contained in:
parent
eb8a65ab45
commit
21018b52b8
2 changed files with 3 additions and 7 deletions
|
|
@ -79,7 +79,6 @@ Kirigami.ScrollablePage {
|
||||||
xMax: history.lastDataPointTime
|
xMax: history.lastDataPointTime
|
||||||
xDuration: history.duration
|
xDuration: history.duration
|
||||||
|
|
||||||
yUnits: i18nc("literal percent sign","%")
|
|
||||||
yMax: 100
|
yMax: 100
|
||||||
yStep: 20
|
yStep: 20
|
||||||
visible: history.count > 1
|
visible: history.count > 1
|
||||||
|
|
@ -127,7 +126,7 @@ Kirigami.ScrollablePage {
|
||||||
MobileForm.FormTextDelegate {
|
MobileForm.FormTextDelegate {
|
||||||
id: currentChargeDelegate
|
id: currentChargeDelegate
|
||||||
text: i18n("Current Charge")
|
text: i18n("Current Charge")
|
||||||
description: i18nc("%1 is value, %2 is unit", "%1 %2", Number(battery.chargePercent).toLocaleString(Qt.locale(), "f", 0), i18n("%"))
|
description: i18nc("%1 is percentage value", "%1 %", Number(battery.chargePercent).toLocaleString(Qt.locale(), "f", 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.FormDelegateSeparator {}
|
MobileForm.FormDelegateSeparator {}
|
||||||
|
|
@ -135,7 +134,7 @@ Kirigami.ScrollablePage {
|
||||||
MobileForm.FormTextDelegate {
|
MobileForm.FormTextDelegate {
|
||||||
id: healthDelegate
|
id: healthDelegate
|
||||||
text: i18n("Health")
|
text: i18n("Health")
|
||||||
description: i18nc("%1 is value, %2 is unit", "%1 %2", Number(battery.capacity).toLocaleString(Qt.locale(), "f", 0), i18n("%"))
|
description: i18nc("%1 is percentage value", "%1 %", Number(battery.capacity).toLocaleString(Qt.locale(), "f", 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.FormDelegateSeparator {}
|
MobileForm.FormDelegateSeparator {}
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,6 @@ Canvas
|
||||||
property real xMin: 0
|
property real xMin: 0
|
||||||
property real yStep: 20
|
property real yStep: 20
|
||||||
|
|
||||||
property string yUnits: ""
|
|
||||||
property string xUnits: ""
|
|
||||||
|
|
||||||
property real xDuration: 3600
|
property real xDuration: 3600
|
||||||
property real xDivisions: 6
|
property real xDivisions: 6
|
||||||
property real xDivisionWidth: 600000
|
property real xDivisionWidth: 600000
|
||||||
|
|
@ -141,7 +138,7 @@ Canvas
|
||||||
for(var i = 0; i <= yMax; i += yStep) {
|
for(var i = 0; i <= yMax; i += yStep) {
|
||||||
var y = scalePoint(Qt.point(0,i)).y;
|
var y = scalePoint(Qt.point(0,i)).y;
|
||||||
|
|
||||||
c.fillText(i + canvas.yUnits, xPadding - 10, y);
|
c.fillText(i18nc("%1 is a percentage value", "%1%", i), xPadding - 10, y);
|
||||||
|
|
||||||
//grid line
|
//grid line
|
||||||
c.moveTo(xPadding, y)
|
c.moveTo(xPadding, y)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue