summaryrefslogtreecommitdiff
path: root/UpdateManager/GtkProgress.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-10-27 09:57:49 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-10-27 09:57:49 +0200
commitbed5736c7cf31070540bd7e27ffb073db3d7c396 (patch)
treec733204d23625109cd282afcf2ac54539d300fd9 /UpdateManager/GtkProgress.py
parent590c710c9feef18c9a23676aab1ce0fb7b6d2f75 (diff)
parentdcee921a1107db6e5c8042598641b422a77e24c2 (diff)
downloadpython-apt-bed5736c7cf31070540bd7e27ffb073db3d7c396.tar.gz
* merged from main
Diffstat (limited to 'UpdateManager/GtkProgress.py')
-rw-r--r--UpdateManager/GtkProgress.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/UpdateManager/GtkProgress.py b/UpdateManager/GtkProgress.py
index 54f60384..cb635e87 100644
--- a/UpdateManager/GtkProgress.py
+++ b/UpdateManager/GtkProgress.py
@@ -25,6 +25,7 @@ import gtk
import apt
import apt_pkg
from gettext import gettext as _
+from Common.utils import *
# intervals of the start up progress
# 3x caching and menu creation
@@ -104,12 +105,14 @@ class GtkFetchProgress(apt.progress.FetchProgress):
if currentItem > self.totalItems:
currentItem = self.totalItems
if self.currentCPS > 0:
- statusText = (_("Downloading file %li of %li with %s/s"
- % (currentItem, self.totalItems,
- apt_pkg.SizeToStr(self.currentCPS))))
+ statusText = (_("Downloading file %(current)li of %(total)li with "
+ "%(speed)s/s") % {"current" : currentItem,
+ "total" : self.totalItems,
+ "speed" : humanize_size(self.currentCPS)})
else:
- statusText = (_("Downloading file %li of %li with unknown "
- "speed") % (currentItem, self.totalItems))
+ statusText = (_("Downloading file %(current)li of %(total)li") % \
+ {"current" : currentItem,
+ "total" : self.totalItems })
self.progress.set_fraction(self.percent/100.0)
self.status.set_markup("<i>%s</i>" % statusText)
# TRANSLATORS: show the remaining time in a progress bar: