Fix #640 make file size suffixes translatable

This commit is contained in:
Andrew Resch 2010-04-08 17:43:57 -07:00
parent afa283cd2d
commit addda6cfcc
1 changed files with 3 additions and 3 deletions

View File

@ -234,12 +234,12 @@ def fsize(fsize_b):
""" """
fsize_kb = fsize_b / 1024.0 fsize_kb = fsize_b / 1024.0
if fsize_kb < 1024: if fsize_kb < 1024:
return "%.1f KiB" % fsize_kb return "%.1f %s" % (fsize_kb, _("KiB"))
fsize_mb = fsize_kb / 1024.0 fsize_mb = fsize_kb / 1024.0
if fsize_mb < 1024: if fsize_mb < 1024:
return "%.1f MiB" % fsize_mb return "%.1f %s" % (fsize_mb, _("MiB"))
fsize_gb = fsize_mb / 1024.0 fsize_gb = fsize_mb / 1024.0
return "%.1f GiB" % fsize_gb return "%.1f %s" % (fsize_gb, _("GiB"))
def fpcnt(dec): def fpcnt(dec):
""" """