[Sugar-devel] [PATCH Browse] Use named parameters to enable translation in msg with multiple strings
Chris Leonard
cjlhomeaddress at gmail.com
Thu Mar 22 01:46:35 EDT 2012
For some reason, I am still seeing an error in Browse POT generation
####### Checking POT for browse (master) ######
Already up-to-date.
downloadmanager.py:202: warning: 'msgid' format string with unnamed
arguments cannot be properly localized:
The translator cannot reorder the arguments.
Please consider using a format string
with named arguments,
and a mapping instead of a tuple for
the arguments.
Is this a reversion of the earlier patch or something new?
cjl
On Thu, Oct 6, 2011 at 1:29 PM, Rafael Ortiz <rafael at activitycentral.com> wrote:
> 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
>
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
More information about the Sugar-devel
mailing list