parent
578105a3ef
commit
f700c53fd9
|
@ -35,21 +35,18 @@ def convert_bytes(string):
|
||||||
suffix = ''
|
suffix = ''
|
||||||
bytes = int(string)
|
bytes = int(string)
|
||||||
if bytes >= 1024:
|
if bytes >= 1024:
|
||||||
bytes /= 1024
|
bytes = round(bytes/1024.,1)
|
||||||
if bytes >= 1024:
|
if bytes >= 1024:
|
||||||
bytes /= 1024
|
bytes = round(bytes/1024.,1)
|
||||||
if bytes >= 1024:
|
if bytes >= 1024:
|
||||||
bytes /= 1024
|
bytes = round(bytes/1024.,1)
|
||||||
suffix = _('%s Gb')
|
suffix = _('%s Gb')
|
||||||
else:
|
else:
|
||||||
suffix = _('%s Mb')
|
suffix = _('%s Mb')
|
||||||
else:
|
else:
|
||||||
suffix = _('%s Kb')
|
suffix = _('%s Kb')
|
||||||
else:
|
else:
|
||||||
if bytes == 1:
|
suffix = _('%s b')
|
||||||
suffix = _('%s byte')
|
|
||||||
else:
|
|
||||||
suffix = _('%s bytes')
|
|
||||||
return suffix % str(bytes)
|
return suffix % str(bytes)
|
||||||
|
|
||||||
def escape_for_pango_markup(string):
|
def escape_for_pango_markup(string):
|
||||||
|
|
Loading…
Reference in New Issue