{% load comments i18n %}

{% comment %}
Based on jmbo/templates/inclusion_tags/object_comments.html.
1. Change occurence of 'comment' to 'message'.
{% endcomment %}

{% if object.comments_enabled %}
    <div class="object-comments">
        <div class="title">
            {% blocktrans count counter=object.comment_count %}
                1 message
            {% plural %}
                {{ counter }} messages
            {% endblocktrans %}
            <a href="#comment">{% trans "Add yours" %}</a>
        </div>
        {% render_comment_list for object %}
        {% if can_render_comment_form %}
            {% render_comment_form for object %}
        {% else %}
            {% if can_comment_code == 'auth_required' %}
                <a href="{% url "login" %}?next={{ request.META.PATH_INFO }}">{% trans "Sign in to chat" %}</a>
            {% endif %}
        {% endif %}
    </div>
{% endif %}
