{% load i18n %}
{% load utilities %}
{% load cache %}
{% spaceless %}

{% get_current_language as LANGUAGE_CODE %}
{# 6 month cache #}
{% cache 15552000 titleby LANGUAGE_CODE book.id %}

{% if book.authors.exists %}
{% blocktrans trimmed with path=book.local_path title=book|book_title %}
<a href="{{ path }}">{{ title }}</a> by
{% endblocktrans %}&nbsp;{% include 'snippets/authors.html' with book=book limit=3 %}

{% else %}
<a href="{{ book.local_path }}">{{ book|book_title }}</a>
{% endif %}

{% endcache %}
{% endspaceless %}
