kilobyte megabyte etc is 1000 and not 1024. we could use KiB MiB if we want for 1024. more http://en.wikipedia.org/wiki/Kibibyte
This commit is contained in:
parent
d1b76f0a30
commit
b0599ba788
|
@ -29,17 +29,15 @@ _ = i18n._
|
|||
from common import gajim
|
||||
|
||||
|
||||
|
||||
|
||||
def convert_bytes(string):
|
||||
suffix = ''
|
||||
bytes = int(string)
|
||||
if bytes >= 1024:
|
||||
bytes = round(bytes/1024.,1)
|
||||
if bytes >= 1024:
|
||||
bytes = round(bytes/1024.,1)
|
||||
if bytes >= 1024:
|
||||
bytes = round(bytes/1024.,1)
|
||||
if bytes >= 1000:
|
||||
bytes = round(bytes/1000., 1)
|
||||
if bytes >= 1000:
|
||||
bytes = round(bytes/1000., 1)
|
||||
if bytes >= 1000:
|
||||
bytes = round(bytes/1000., 1)
|
||||
#Gb means giga bytes
|
||||
suffix = _('%s Gb')
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue