[Sugar-devel] [PATCH] Change string formatting in downloadmanager to use named arguments
Manuel Quiñones
manuq at laptop.org
Mon Mar 19 14:22:51 EDT 2012
Fixes this warning in Pootle: 'msgid' format string with unnamed
arguments cannot be properly localized:
Signed-off-by: Manuel Quiñones <manuq at laptop.org>
---
downloadmanager.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/downloadmanager.py b/downloadmanager.py
index eeeee6d..9950c16 100644
--- a/downloadmanager.py
+++ b/downloadmanager.py
@@ -199,8 +199,10 @@ class Download(object):
def _create_journal_object(self):
self.dl_jobject = datastore.create()
- self.dl_jobject.metadata['title'] = _('Downloading %s from \n%s.') % \
- (self._download.get_suggested_filename(), self._source)
+ self.dl_jobject.metadata['title'] = \
+ _('Downloading %(filename)s from \n%(source)s.') % \
+ {'filename': self._download.get_suggested_filename(),
+ 'source': self._source}
self.dl_jobject.metadata['progress'] = '0'
self.dl_jobject.metadata['keep'] = '0'
--
1.7.7.6
More information about the Sugar-devel
mailing list