From: Marek Stępniowski Date: Wed, 17 Sep 2008 12:17:26 +0000 (+0200) Subject: Improved title generation (Request from Olga). X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/2e5909e2ebaa5f8ee25bac812b96d4a9f5312df4?ds=sidebyside Improved title generation (Request from Olga). --- 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