Added missing i18n() calls to plasmoid

This commit is contained in:
Albert Vaca 2014-02-14 17:11:41 +01:00
parent e1649f1b1e
commit 372ea8839b
4 changed files with 16 additions and 16 deletions

View file

@ -29,9 +29,9 @@ QtObject {
property string deviceId: ""
property bool available: false
property bool state: false
property bool charging: false
property int charge: -1
property string displayString: (available) ? ((state) ? ("Charging, " + charge) : ("Discharging, " + charge)) : "No Info"
property string displayString: (available && charge > -1) ? ((charging) ? (i18n("Charging, %1").arg(charge)) : (i18n("Discharging, %1").arg(charge))) : i18n("No info")
property variant device: DeviceDbusInterfaceFactory.create(deviceId)
property variant battery: null
@ -39,7 +39,7 @@ QtObject {
property variant nested1: DBusAsyncResponse {
id: startupCheck1
autoDelete: false
onSuccess: state = result
onSuccess: charging = result
}
property variant nested2: DBusAsyncResponse {
@ -52,7 +52,7 @@ QtObject {
if (available) {
battery = DeviceBatteryDbusInterfaceFactory.create(deviceId)
battery.stateChanged.connect(function(charging) {root.state = charging})
battery.stateChanged.connect(function(charging) {root.charging = charging})
battery.chargeChanged.connect(function(charge) {root.charge = charge})
startupCheck1.setPendingCall(battery.isCharging())

View file

@ -45,7 +45,7 @@ Item {
id: tooltip
target: mouseArea
image: QIcon("smartphone")
subText: "KDE Connect device notifications"
subText: i18n("KDE Connect device notifications")
}
}

View file

@ -50,15 +50,15 @@ PlasmaComponents.ListItem
states: [
State {
name: "UNMOUNTED"
PropertyChanges { target: browse; checked: false; text: "Browse" }
PropertyChanges { target: browse; checked: false; text: i18n("Browse") }
},
State {
name: "MOUNTING"
PropertyChanges { target: browse; checked: true; text: "Mounting..." }
PropertyChanges { target: browse; checked: true; text: i18n("Mounting...") }
},
State {
name: "MOUNTED"
PropertyChanges { target: browse; checked: false; text: "Unmount" }
PropertyChanges { target: browse; checked: false; text: i18n("Unmount") }
}
]