From bf5a9a34dd327e858e741be1e8925584c8c88cb6 Mon Sep 17 00:00:00 2001
From: "glatzor@ubuntu.com" <>
Date: Wed, 2 Aug 2006 23:34:19 +0200
Subject: * Handle to be newly installed "updates" in the version string
information * Add a unit b for Bytes to the download size
---
UpdateManager/UpdateManager.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
(limited to 'UpdateManager')
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py
index 54b892a1..4da00664 100644
--- a/UpdateManager/UpdateManager.py
+++ b/UpdateManager/UpdateManager.py
@@ -726,10 +726,16 @@ class UpdateManager(SimpleGladeApp):
name = xml.sax.saxutils.escape(pkg.name)
summary = xml.sax.saxutils.escape(pkg.summary)
contents = "%s\n%s\n" % (name, summary)
- contents = contents + _("From version %s to %s (Size: %s)") % \
- (pkg.installedVersion,
- pkg.candidateVersion,
- apt.SizeToStr(pkg.packageSize)) + ""
+ if pkg.installedVersion != None:
+ contents += _("From version %s to %s") % \
+ (pkg.installedVersion,
+ pkg.candidateVersion)
+ else:
+ contents += _("Version %s") % pkg.candidateVersion
+ #TRANSLATORS: the b stands for Bytes
+ contents += " " + _("(Size: %sb)") % apt.SizeToStr(pkg.packageSize)
+ contents += ""
+
iter = self.store.append([True, contents, pkg.name, pkg])
self.add_update(pkg)
i = i + 1
--
cgit v1.2.3