From: Radek Czajka Date: Mon, 30 Aug 2010 11:51:50 +0000 (+0200) Subject: i18n fix: translated simple_title X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/e09a81b73f95737858d03d0506b91395ffe462e5?ds=sidebyside;hp=--cc i18n fix: translated simple_title --- e09a81b73f95737858d03d0506b91395ffe462e5 diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index c1d318afd..6ad83a045 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -12,6 +12,7 @@ from django.core.urlresolvers import reverse from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from django.db.models import Q from django.conf import settings +from django.utils.translation import ugettext as _ register = template.Library() @@ -46,18 +47,9 @@ def capfirst(text): def simple_title(tags): - mapping = { - 'author': u'Autor', - 'theme': u'motyw', - 'epoch': u'epoka', - 'genre': u'gatunek', - 'kind': u'rodzaj', - 'set': u'półka', - } - title = [] for tag in tags: - title.append("%s: %s" % (mapping[tag.category], tag.name)) + title.append("%s: %s" % (_(tag.category), tag.name)) return capfirst(', '.join(title))