summaryrefslogtreecommitdiff
path: root/UpdateManager/GtkProgress.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-29 17:00:29 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-29 17:00:29 +0200
commitd74718143cd630e09ee14f5a2fb946b86266cb37 (patch)
tree7509d730c14e38838e26acaf7e4f150837c464ed /UpdateManager/GtkProgress.py
parente40dd39c6ad5b1d29644430cdecdfc02bf674a8a (diff)
parentb9dffe7bcfab1807249821bacb8b39e83d20d5eb (diff)
downloadpython-apt-d74718143cd630e09ee14f5a2fb946b86266cb37.tar.gz
* merged from glatzor
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: