Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/UpdatesPage.qml
Show First 20 Lines • Show All 263 Lines • ▼ Show 20 Line(s) | 262 | Label { | |||
---|---|---|---|---|---|
264 | elide: truncated ? Text.ElideLeft : Text.ElideRight | 264 | elide: truncated ? Text.ElideLeft : Text.ElideRight | ||
265 | text: { | 265 | text: { | ||
266 | if (installedVersion == availableVersion) { | 266 | if (installedVersion == availableVersion) { | ||
267 | // Update of the same version; show when old and new are | 267 | // Update of the same version; show when old and new are | ||
268 | // the same (common with Flatpak runtimes) | 268 | // the same (common with Flatpak runtimes) | ||
269 | return i18n("Update to version %1", availableVersion); | 269 | return i18n("Update to version %1", availableVersion); | ||
270 | } else if (installedVersion && availableVersion) { | 270 | } else if (installedVersion && availableVersion) { | ||
271 | // Old and new version numbers | 271 | // Old and new version numbers | ||
272 | // This thing with \x9 is a fancy feature in QML text handling: | 272 | // This thing with \x9C is a fancy feature in QML text handling: | ||
273 | // when the string will be elided, it shows the string after | 273 | // when the string will be elided, it shows the string after | ||
274 | // the last \x9. This allows us to show a smaller string | 274 | // the last \x9C. This allows us to show a smaller string | ||
275 | // when there's now enough room | 275 | // when there's now enough room | ||
276 | 276 | | |||
277 | // All of this is mostly for the benefit of KDE Neon users, | 277 | // All of this is mostly for the benefit of KDE Neon users, | ||
278 | // since the version strings there are really really long | 278 | // since the version strings there are really really long | ||
279 | return i18nc("Do not translate or alter \\x9", "%1 → %2\x9C%1 → %2\x9C%2", installedVersion, availableVersion); | 279 | return i18nc("Do not translate or alter \\x9C", "%1 → %2\x9C%1 → %2\x9C%2", installedVersion, availableVersion); | ||
280 | } else { | 280 | } else { | ||
281 | // Available version only, for when the installed version | 281 | // Available version only, for when the installed version | ||
282 | // isn't available for some reason | 282 | // isn't available for some reason | ||
283 | return availableVersion; | 283 | return availableVersion; | ||
284 | } | 284 | } | ||
285 | } | 285 | } | ||
286 | opacity: listItem.hovered? 0.8 : 0.6 | 286 | opacity: listItem.hovered? 0.8 : 0.6 | ||
287 | } | 287 | } | ||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |