Ticket #4152: 4152.diff

File 4152.diff, 1022 bytes (added by Ivan Sagalaev <Maniac@…>, 17 years ago)

Patch for template tags

  • django/templatetags/i18n.py

     
    4040        if self.noop:
    4141            return value
    4242        else:
    43             return translation.gettext(value)
     43            return translation.ugettext(value)
    4444
    4545class BlockTranslateNode(Node):
    4646    def __init__(self, extra_context, singular, plural=None, countervar=None, counter=None):
     
    6868            count = self.counter.resolve(context)
    6969            context[self.countervar] = count
    7070            plural = self.render_token_list(self.plural)
    71             result = translation.ngettext(singular, plural, count) % context
     71            result = translation.ungettext(singular, plural, count) % context
    7272        else:
    73             result = translation.gettext(singular) % context
     73            result = translation.ugettext(singular) % context
    7474        context.pop()
    7575        return result
    7676
Back to Top