On 06/30/2011 02:30 PM, Gary Martin wrote:
Hi Simon,

On 30 Jun 2011, at 09:18, Simon Schampijer<si...@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<si...@laptop.org>
Tested-by: Samuel Greenfeld<greenf...@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

Thanks Gary, pushed as: http://git.sugarlabs.org/sugar/mainline/commit/dacaff710a699383988d4dd6ad2fa483c040a0b7

Sorry, I forgot to list the testers and reviewers in the commit message...:/

Regards,
   Simon
_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to