Skip to content

Commit

Permalink
[#2939] Fix filesize issue which will not be found for years
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 14, 2012
1 parent 1884cd0 commit 21eabce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/lib/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def rnd(number, divisor):
elif number < 1024 ** 2:
return _('{kibibytes} KiB').format(kibibytes=rnd(number, 1024))
elif number < 1024 ** 3:
return _('{mebibytes} KiB').format(mebibytes=rnd(number, 1024 ** 2))
return _('{mebibytes} MiB').format(mebibytes=rnd(number, 1024 ** 2))
elif number < 1024 ** 4:
return _('{gibibytes} KiB').format(gibibytes=rnd(number, 1024 ** 3))
return _('{gibibytes} GiB').format(gibibytes=rnd(number, 1024 ** 3))
else:
return _('{tebibytes} KiB').format(tebibytes=rnd(number, 1024 ** 4))
return _('{tebibytes} TiB').format(tebibytes=rnd(number, 1024 ** 4))

0 comments on commit 21eabce

Please sign in to comment.