diff options
| author | Sebastian Heinlein <sebi@sebi-pc> | 2006-09-27 00:30:46 +0200 |
|---|---|---|
| committer | Sebastian Heinlein <sebi@sebi-pc> | 2006-09-27 00:30:46 +0200 |
| commit | cf3decd2e830b53569e8dd9c12c2469914eb9b21 (patch) | |
| tree | 033fe3b9ccfe9ead34caebe9226646917a04de94 | |
| parent | 84593d761ff3e297753111923e621dfaf9c9ff77 (diff) | |
| download | python-apt-cf3decd2e830b53569e8dd9c12c2469914eb9b21.tar.gz | |
* Make some strings translatable - seems that gettext doesn't like being
part of string addition. the other one was my fault and not the one
of gettext. fix #62519 and #62458
* Fix the imports and calls of human_size
| -rw-r--r-- | UpdateManager/Common/utils.py | 3 | ||||
| -rw-r--r-- | UpdateManager/GtkProgress.py | 2 | ||||
| -rw-r--r-- | UpdateManager/UpdateManager.py | 16 | ||||
| -rw-r--r-- | po/POTFILES.in | 1 |
4 files changed, 12 insertions, 10 deletions
diff --git a/UpdateManager/Common/utils.py b/UpdateManager/Common/utils.py index 95440e44..fa73b8bd 100644 --- a/UpdateManager/Common/utils.py +++ b/UpdateManager/Common/utils.py @@ -1,4 +1,5 @@ import gtk +from gettext import gettext as _ def str_to_bool(str): if str == "0" or str.upper() == "FALSE": @@ -22,7 +23,7 @@ def error(parent, summary, message): d.destroy() return -def humanize_size(self, bytes): +def humanize_size(bytes): """ Convert a given size in bytes to a nicer better readable unit """ diff --git a/UpdateManager/GtkProgress.py b/UpdateManager/GtkProgress.py index cdc761fc..cb635e87 100644 --- a/UpdateManager/GtkProgress.py +++ b/UpdateManager/GtkProgress.py @@ -25,7 +25,7 @@ import gtk import apt import apt_pkg from gettext import gettext as _ -from common.utils import * +from Common.utils import * # intervals of the start up progress # 3x caching and menu creation diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 2bb95b2f..02a89a40 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -592,8 +592,8 @@ class UpdateManager(SimpleGladeApp): self.button_install.set_sensitive(self.cache.installCount) self.dl_size = self.cache.requiredDownload # TRANSLATORS: b stands for Bytes - self.label_downsize.set_markup(_("Download size: %s" % \ - humanize_size(self.dl_size))) + self.label_downsize.set_markup(_("Download size: %s") % \ + humanize_size(self.dl_size)) def update_count(self): """activate or disable widgets and show dialog texts correspoding to @@ -601,7 +601,7 @@ class UpdateManager(SimpleGladeApp): self.refresh_updates_count() num_updates = self.cache.installCount if num_updates == 0: - text_header= "<big><b>"+_("Your system is up-to-date")+"</b></big>" + text_header= "<big><b>%s</b></big" %_("Your system is up-to-date") text_download = "" self.notebook_details.set_sensitive(False) self.treeview_update.set_sensitive(False) @@ -611,11 +611,11 @@ class UpdateManager(SimpleGladeApp): self.textview_changes.get_buffer().set_text("") self.textview_descr.get_buffer().set_text("") else: - text_header = "<big><b>" + \ - gettext.ngettext("You can install %s update", - "You can install %s updates", - num_updates) % \ - num_updates + "</b></big>" + text_header = "<b><big>%s</b></big>" % \ + (gettext.ngettext("You can install %s update", + "You can install %s updates", + num_updates) % \ + num_updates) text_download = _("Download size: %s") % humanize_size(self.dl_size) self.notebook_details.set_sensitive(True) self.treeview_update.set_sensitive(True) diff --git a/po/POTFILES.in b/po/POTFILES.in index b383e84c..64774c4e 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -12,6 +12,7 @@ UpdateManager/fakegconf.py UpdateManager/ReleaseNotesViewer.py UpdateManager/GtkProgress.py UpdateManager/UpdateManager.py +UpdateManager/Common/utils.py data/mime/apt.xml.in data/glade/UpdateManager.glade data/glade/SoftwareProperties.glade |
