[Sugar-devel] [PATCH sugar] Use the same wording for the filesize of an entry without a file SL #2880

Gary Martin garycmartin at googlemail.com
Thu Jun 30 08:30:40 EDT 2011


Hi Simon,

On 30 Jun 2011, at 09:18, Simon Schampijer <simon at schampijer.de> wrote:

> On 06/06/2011 11:25 AM, Simon Schampijer wrote:
>> The change has no impact on existing translations, since
>> we use as well util.format_size when no filesize is
>> specified.
>> ---
>>  src/jarabe/journal/listmodel.py |    5 ++---
>>  1 files changed, 2 insertions(+), 3 deletions(-)
>> 
>> diff --git a/src/jarabe/journal/listmodel.py b/src/jarabe/journal/listmodel.py
>> index 3902eba..417ff61 100644
>> --- a/src/jarabe/journal/listmodel.py
>> +++ b/src/jarabe/journal/listmodel.py
>> @@ -163,9 +163,8 @@ class ListModel(gtk.GenericTreeModel, gtk.TreeDragSource):
>>          try:
>>              size = int(metadata.get('filesize'))
>>          except (TypeError, ValueError):
>> -            self._cached_row.append(_('Unknown'))
>> -        else:
>> -            self._cached_row.append(util.format_size(size))
>> +            size = None
>> +        self._cached_row.append(util.format_size(size))
>> 
>>          try:
>>              progress = int(float(metadata.get('progress', 100)))
> 
> Signed-off-by: Simon Schampijer <simon at laptop.org>
> Tested-by: Samuel Greenfeld <greenfeld at laptop.org>
> 
> Gary, is that one ok with you? I slightly modified your initial patch. Sam did test it as working.

Looks great. Just tested it here on the 11.2.0 os870 build (Sugar 0.92.2) and Journal is now correctly showing 'Empty' on zero size entries. Rebooting into Spanish and it correctly uses 'Vacio'.

Regards,
--Gary

> Regards,
>   Simon


More information about the Sugar-devel mailing list