Source

django-russian-admin / russian_admin / templatetags / russian_admin_tags.py

from django import template
from pymorphy.django_conf import default_morph as morph
from django.utils.translation import ugettext as _

register = template.Library()

@register.filter
def plural_from_object(source, object):
    l = len(object[0])
    if 1 == l:
      return source
    return morph.pluralize_inflected_ru(source.upper(), l).lower()

@register.filter
def labeltr(label):
  return _( label )