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

@ -40,7 +40,7 @@ PlasmaComponents.ListItem
horizontalAlignment: Text.AlignHCenter
text: display
}
PlasmaComponents.Button
{
id: browse
@ -50,27 +50,27 @@ 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") }
}
]
Sftp {
id: sftp
deviceId: root.deviceId
onMounted: browse.state = "MOUNTED"
onUnmounted: browse.state = "UNMOUNTED"
onError: browse.state = "UNMOUNTED"
}
onClicked: {
if (state == "UNMOUNTED") {
state = "MOUNTING"
@ -82,12 +82,12 @@ PlasmaComponents.ListItem
}
}
}
height: browse.height
width: parent.width
}
//Battery
PlasmaComponents.ListItem {

View file

@ -24,9 +24,9 @@ import org.kde.plasma.components 0.1 as PlasmaComponents
import org.kde.kdeconnect 1.0
QtObject {
id: root
property string deviceId: ""
property bool isMounted: false
property variant sftp: SftpDbusInterfaceFactory.create(deviceId)
@ -40,7 +40,7 @@ QtObject {
signal mounted
signal unmounted
signal error(string message)
onMounted: isMounted = true
onUnmounted: isMounted = false