Fixed #4107 -- Marked a few more strings for translation. Thanks, Baptiste.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5061 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-04-23 05:51:29 +00:00
parent 254e087e31
commit 00cb6a1ba8
2 changed files with 6 additions and 6 deletions

View File

@ -273,7 +273,7 @@ class AnonymousUser(object):
pass
def __str__(self):
return 'AnonymousUser'
return _('AnonymousUser')
def __eq__(self, other):
return isinstance(other, self.__class__)

View File

@ -2,7 +2,7 @@
from django.template import resolve_variable, Library
from django.conf import settings
from django.utils.translation import gettext
from django.utils.translation import gettext, ngettext
import re
import random as random_module
@ -517,12 +517,12 @@ def filesizeformat(bytes):
return "0 bytes"
if bytes < 1024:
return "%d byte%s" % (bytes, bytes != 1 and 's' or '')
return ngettext("%(size)d byte", "%(size)d bytes", bytes) % {'size': bytes}
if bytes < 1024 * 1024:
return "%.1f KB" % (bytes / 1024)
return gettext("%.1f KB") % (bytes / 1024)
if bytes < 1024 * 1024 * 1024:
return "%.1f MB" % (bytes / (1024 * 1024))
return "%.1f GB" % (bytes / (1024 * 1024 * 1024))
return gettext("%.1f MB") % (bytes / (1024 * 1024))
return gettext("%.1f GB") % (bytes / (1024 * 1024 * 1024))
def pluralize(value, arg='s'):
"""