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

Rafael Ortiz rafael at activitycentral.com
Thu Oct 6 13:29:17 EDT 2011


On Fri, Sep 30, 2011 at 8:51 AM, <godiard at sugarlabs.org> wrote:

> 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
>
>
Acked, tested and pushed as:

http://git.sugarlabs.org/browse/mainline/commit/0984c0a342487c54381c71bb6a77b1b5656bff59


_______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20111006/a6fd427c/attachment.html>


More information about the Sugar-devel mailing list