diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-10-27 09:57:49 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-10-27 09:57:49 +0200 |
| commit | bed5736c7cf31070540bd7e27ffb073db3d7c396 (patch) | |
| tree | c733204d23625109cd282afcf2ac54539d300fd9 /UpdateManager/GtkProgress.py | |
| parent | 590c710c9feef18c9a23676aab1ce0fb7b6d2f75 (diff) | |
| parent | dcee921a1107db6e5c8042598641b422a77e24c2 (diff) | |
| download | python-apt-bed5736c7cf31070540bd7e27ffb073db3d7c396.tar.gz | |
* merged from main
Diffstat (limited to 'UpdateManager/GtkProgress.py')
| -rw-r--r-- | UpdateManager/GtkProgress.py | 13 |
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: |
