mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-28 22:53: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
|
||||
xDuration: history.duration
|
||||
|
||||
yUnits: i18nc("literal percent sign","%")
|
||||
yMax: 100
|
||||
yStep: 20
|
||||
visible: history.count > 1
|
||||
|
|
@ -127,7 +126,7 @@ Kirigami.ScrollablePage {
|
|||
MobileForm.FormTextDelegate {
|
||||
id: currentChargeDelegate
|
||||
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 {}
|
||||
|
|
@ -135,7 +134,7 @@ Kirigami.ScrollablePage {
|
|||
MobileForm.FormTextDelegate {
|
||||
id: healthDelegate
|
||||
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 {}
|
||||
|
|
|
|||
|
|
@ -40,9 +40,6 @@ Canvas
|
|||
property real xMin: 0
|
||||
property real yStep: 20
|
||||
|
||||
property string yUnits: ""
|
||||
property string xUnits: ""
|
||||
|
||||
property real xDuration: 3600
|
||||
property real xDivisions: 6
|
||||
property real xDivisionWidth: 600000
|
||||
|
|
@ -141,7 +138,7 @@ Canvas
|
|||
for(var i = 0; i <= yMax; i += yStep) {
|
||||
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
|
||||
c.moveTo(xPadding, y)
|
||||
|
|
|
|||
Loading…
Reference in a new issue