Changeset View
Changeset View
Standalone View
Standalone View
applets/systemmonitor/net/contents/ui/net.qml
Show All 37 Lines | 36 | if (match) { | |||
---|---|---|---|---|---|
38 | root.addSource(source, match[1], rxSource, match[1]); | 38 | root.addSource(source, match[1], rxSource, match[1]); | ||
39 | } | 39 | } | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | delegate: DoublePlotter { | 42 | delegate: DoublePlotter { | ||
43 | function formatData(data) { | 43 | function formatData(data) { | ||
44 | var value = data.value * 1024 * 8 | 44 | var value = data.value * 1024 * 8 | ||
45 | if (value > (1024 * 1024)) { | 45 | if (value > (1024 * 1024)) { | ||
46 | return i18nc("%1 is the displayed data transfer speed in megabits per second", "%1 Mbps", (value / (1024 * 1024)).toFixed(1)); | 46 | return i18nc("%1 is the displayed data transfer speed in mebibits per second", "%1 Mib/s", (value / (1024 * 1024)).toFixed(1)); | ||
47 | } | 47 | } | ||
48 | if (value > 1024) { | 48 | if (value > 1024) { | ||
49 | return i18nc("%1 is the displayed data transfer speed in kilobits per second", "%1 Kbps", (value / 1024)); | 49 | return i18nc("%1 is the displayed data transfer speed in kibibits per second", "%1 Kib/s", (value / 1024)); | ||
50 | } | 50 | } | ||
51 | if (value > 0) { | 51 | return i18nc("%1 is the displayed data transfer speed in bits per second", "%1 b/s", value); | ||
52 | return i18nc("%1 is the displayed data transfer speed in bits per second", "%1 bps", value); | | |||
53 | } | | |||
54 | return value; | | |||
55 | } | 52 | } | ||
56 | } | 53 | } | ||
57 | } | 54 | } |