X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/bf3f18ce9313f4929ff327fbf12803157de171cb..ab81d95154bd35a67078cc6c926b5b9fbdd9011b:/apps/catalogue/templatetags/catalogue_tags.py diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index 6e81caec2..b99b9f631 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -347,15 +347,18 @@ def related_books(context, instance, limit=6, random=1, taken=0): } -@register.inclusion_tag('catalogue/menu.html') -def catalogue_menu(): - return {'categories': [ +@register.inclusion_tag('catalogue/menu.html', takes_context=True) +def catalogue_menu(context): + return { + 'categories': [ ('author', _('Authors'), 'autorzy'), ('genre', _('Genres'), 'gatunki'), ('kind', _('Kinds'), 'rodzaje'), ('epoch', _('Epochs'), 'epoki'), ('theme', _('Themes'), 'motywy'), - ]} + ], + 'LANGUAGE_CODE': context.get('LANGUAGE_CODE'), + } @register.simple_tag