Commit 1e31a6e8 authored by Nate Graham's avatar Nate Graham
Browse files

Improve the clarity and presentation of the update details text field

Summary: This patche makes it a bit more obvious what's actually going to happen if you click an update to see its details; you get a clear indication of the current version and the new version in the order that your brain expects them to be in.

Test Plan:
Tested in KDE Neon. Before:


Needs testing on other platforms that may format things differently.

Reviewers: apol, #discover_software_store

Reviewed By: apol, #discover_software_store

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision:
parent 3582c4c0
......@@ -219,7 +219,7 @@ QString PackageKitResource::joinPackages(const QStringList& pkgids, const QStrin
QStringList ret;
foreach(const QString& pkgid, pkgids) {
ret += i18nc("package-name (version)", "%1 (%2)", PackageKit::Daemon::packageName(pkgid), PackageKit::Daemon::packageVersion(pkgid));
ret += PackageKit::Daemon::packageVersion(pkgid);
const QString sep = _sep.isEmpty() ? i18nc("comma separating package names", ", ") : _sep;
return ret.join(sep);
......@@ -238,9 +238,9 @@ void PackageKitResource::updateDetail(const QString& /*packageID*/, const QStrin
const QString& /*changelog*/, PackageKit::Transaction::UpdateState state, const QDateTime& /*issued*/, const QDateTime& /*updated*/)
QString info;
addIfNotEmpty(i18n("Reason:"), updateText, info);
addIfNotEmpty(i18n("Current Version:"), joinPackages(updates), info);
addIfNotEmpty(i18n("Obsoletes:"), joinPackages(obsoletes), info);
addIfNotEmpty(i18n("Updates:"), joinPackages(updates), info);
addIfNotEmpty(i18n("New Version:"), updateText, info);
addIfNotEmpty(i18n("Update State:"), PackageKitMessages::updateStateMessage(state), info);
addIfNotEmpty(i18n("Restart:"), PackageKitMessages::restartMessage(restart), info);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment