From 2e5909e2ebaa5f8ee25bac812b96d4a9f5312df4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Wed, 17 Sep 2008 14:17:26 +0200 Subject: [PATCH] Improved title generation (Request from Olga). --- apps/catalogue/templatetags/catalogue_tags.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index 90cbec3b6..c315cfed3 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -41,17 +41,17 @@ 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', + '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)) - return ' '.join(title) + title.append("%s: %s" % (mapping[tag.category], tag.name)) + return capfirst(', '.join(title)) @register.simple_tag -- 2.20.1