Merge "fix templatetag for no fractional bytes"

This commit is contained in:
Jenkins 2014-02-15 18:03:45 +00:00 committed by Gerrit Code Review
commit b4972c09b8
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ def filesizeformat(bytes, filesize_number_format):
"%(size)d Bytes", 0) % {'size': 0}
if bytes < 1024:
bytes = int(bytes)
return translation.ungettext_lazy("%(size)d Byte",
"%(size)d Bytes", bytes) % {'size': bytes}
if bytes < 1024 * 1024: