Changeset View
Changeset View
Standalone View
Standalone View
src/applet/package/contents/ui/logic.js
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 33 | { | |||
---|---|---|---|---|---|
46 | if (btManager.bluetoothBlocked) { | 46 | if (btManager.bluetoothBlocked) { | ||
47 | text = i18n("Bluetooth is disabled"); | 47 | text = i18n("Bluetooth is disabled"); | ||
48 | } else if (!btManager.bluetoothOperational) { | 48 | } else if (!btManager.bluetoothOperational) { | ||
49 | if (!btManager.adapters.length) { | 49 | if (!btManager.adapters.length) { | ||
50 | text = i18n("No adapters available"); | 50 | text = i18n("No adapters available"); | ||
51 | } else { | 51 | } else { | ||
52 | text = i18n("Bluetooth is offline"); | 52 | text = i18n("Bluetooth is offline"); | ||
53 | } | 53 | } | ||
54 | } else if (connectedDevices.length) { | 54 | } else if (connectedDevices.length == 1) { | ||
55 | text = i18n("%1 connected", device.name); | ||||
56 | } else if (connectedDevices.length > 1) { | ||||
55 | text = i18ncp("Number of connected devices", "%1 connected device", "%1 connected devices", connectedDevices.length); | 57 | text = i18ncp("Number of connected devices", "%1 connected device", "%1 connected devices", connectedDevices.length); | ||
56 | for (var i = 0; i < connectedDevices.length; ++i) { | 58 | for (var i = 0; i < connectedDevices.length; ++i) { | ||
57 | var device = connectedDevices[i]; | 59 | var device = connectedDevices[i]; | ||
58 | text += "\n %1 %2".arg(bullet).arg(device.name); | 60 | text += "\n %1 %2".arg(bullet).arg(device.name); | ||
59 | } | 61 | } | ||
60 | } else { | 62 | } else { | ||
61 | text = i18n("No connected devices"); | 63 | text = i18n("No connected devices"); | ||
62 | } | 64 | } | ||
Show All 20 Lines |