[Sugar-devel] [PATCH Browse] Use named parameters to enable translation in msg with multiple strings

godiard at sugarlabs.org godiard at sugarlabs.org
Fri Sep 30 09:51:05 EDT 2011


From: Gonzalo Odiard <godiard at gmail.com>

Signed-off-by: Gonzalo Odiard <gonzalo at laptop.org>
---
 downloadmanager.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/downloadmanager.py b/downloadmanager.py
index 0fd6537..98d4f1a 100644
--- a/downloadmanager.py
+++ b/downloadmanager.py
@@ -341,8 +341,9 @@ class Download:
 
     def _create_journal_object(self):
         self.dl_jobject = datastore.create()
-        self.dl_jobject.metadata['title'] = _('Downloading %s from \n%s.') % \
-                (self._get_file_name(), self._source.spec)
+        self.dl_jobject.metadata['title'] = \
+                _('Downloading %(file)s from \n%(source)s.') % \
+                {'file': self._get_file_name(), 'source': self._source.spec}
 
         self.dl_jobject.metadata['progress'] = '0'
         self.dl_jobject.metadata['keep'] = '0'
-- 
1.7.4.4



More information about the Sugar-devel mailing list