Changeset View
Changeset View
Standalone View
Standalone View
applets/systemmonitor/common/contents/ui/ConfigGeneral.qml
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Line(s) | 121 | QQC2.SpinBox { | |||
---|---|---|---|---|---|
126 | to: 1000000 | 126 | to: 1000000 | ||
127 | editable: true | 127 | editable: true | ||
128 | validator: DoubleValidator { | 128 | validator: DoubleValidator { | ||
129 | bottom: spinbox.from | 129 | bottom: spinbox.from | ||
130 | top: spinbox.to | 130 | top: spinbox.to | ||
131 | } | 131 | } | ||
132 | textFromValue: function(value) { | 132 | textFromValue: function(value) { | ||
133 | var seconds = value / 1000 | 133 | var seconds = value / 1000 | ||
134 | return i18n("%1 seconds", seconds.toFixed(1)) | 134 | return i18nc("SpinBox text", "%1 seconds", seconds.toFixed(1)) | ||
davidedmundson: The important part was the
I18np that handles "1 second" Vs "2 secondS" | |||||
135 | } | 135 | } | ||
136 | valueFromText: function(text) { | 136 | valueFromText: function(text) { | ||
137 | return parseFloat(text) * 1000 | 137 | return parseFloat(text) * 1000 | ||
138 | } | 138 | } | ||
139 | value: cfg_updateInterval | 139 | value: cfg_updateInterval | ||
140 | onValueModified: cfg_updateInterval = value | 140 | onValueModified: cfg_updateInterval = value | ||
141 | } | 141 | } | ||
142 | 142 | | |||
Show All 35 Lines |
The important part was the
I18np that handles "1 second" Vs "2 secondS"