From e09a81b73f95737858d03d0506b91395ffe462e5 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 30 Aug 2010 13:51:50 +0200 Subject: [PATCH] i18n fix: translated simple_title --- apps/catalogue/templatetags/catalogue_tags.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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)) -- 2.20.1