Ticket #7412: i18n.diff

File i18n.diff, 826 bytes (added by AV <av0000@…>, 16 years ago)
  • django/templatetags/i18n.py

     
    44from django.template import TemplateSyntaxError, TokenParser, Library
    55from django.template import TOKEN_TEXT, TOKEN_VAR
    66from django.utils import translation
    7 from django.utils.encoding import force_unicode
     7from django.utils.encoding import force_unicode, smart_unicode
    88
    99register = Library()
    1010
     
    4343        if self.noop:
    4444            return value
    4545        else:
    46             return translation.ugettext(value)
     46            return translation.ugettext(smart_unicode(value))
    4747
    4848class BlockTranslateNode(Node):
    4949    def __init__(self, extra_context, singular, plural=None, countervar=None,
Back to Top