Ticket #7412: i18n.diff
File i18n.diff, 826 bytes (added by , 16 years ago) |
---|
-
django/templatetags/i18n.py
4 4 from django.template import TemplateSyntaxError, TokenParser, Library 5 5 from django.template import TOKEN_TEXT, TOKEN_VAR 6 6 from django.utils import translation 7 from django.utils.encoding import force_unicode 7 from django.utils.encoding import force_unicode, smart_unicode 8 8 9 9 register = Library() 10 10 … … 43 43 if self.noop: 44 44 return value 45 45 else: 46 return translation.ugettext( value)46 return translation.ugettext(smart_unicode(value)) 47 47 48 48 class BlockTranslateNode(Node): 49 49 def __init__(self, extra_context, singular, plural=None, countervar=None,