Properly do i18n in common.fsize().
This commit is contained in:
parent
a6e8db9bb0
commit
3bac6bcfc8
@ -63,12 +63,12 @@ def get_eta(size, done, speed):
|
|||||||
def fsize(fsize_b):
|
def fsize(fsize_b):
|
||||||
fsize_kb = float (fsize_b / 1024.0)
|
fsize_kb = float (fsize_b / 1024.0)
|
||||||
if fsize_kb < 1000:
|
if fsize_kb < 1000:
|
||||||
return _("%.1f KiB")%fsize_kb
|
return "%.1f %s" % (fsize_kb, _("KiB"))
|
||||||
fsize_mb = float (fsize_kb / 1024.0)
|
fsize_mb = float (fsize_kb / 1024.0)
|
||||||
if fsize_mb < 1000:
|
if fsize_mb < 1000:
|
||||||
return _("%.1f MiB")%fsize_mb
|
return "%.1f %s" % (fsize_mb, _("MiB"))
|
||||||
fsize_gb = float (fsize_mb / 1024.0)
|
fsize_gb = float (fsize_mb / 1024.0)
|
||||||
return _("%.1f GiB")%fsize_gb
|
return "%.1f %s" % (fsize_gb, _("GiB"))
|
||||||
|
|
||||||
# Returns a formatted string representing a percentage
|
# Returns a formatted string representing a percentage
|
||||||
def fpcnt(dec):
|
def fpcnt(dec):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user