<commit_before>{% load i18n comments %}
{% with comment_list=object.comments %}{% with comment_count=comment_list.count %}

  <div id="comments-wrapper">
    {% if comment_count %}
      <h3 class="has-comments-title">{% blocktrans with comment_count=comment_count entry_title=object.title %}{{ comment_count }} comments to {{ entry_title }}{% endblocktrans %}</h3>

      {% render_comment_list for object %}

      {% if not object.comments_are_open %}
        <p class="comments-closed">{% trans "Comments are closed." %}</p>
      {% endif %}
    {% else %}
      {% if object.comments_are_open %}
        <h3 class="no-comments-title">{% trans "Leave a reply" %}</h3>
      {% endif %}
    {% endif %}
  </div>

  {% if object.comments_are_open %}
    <div id="comments-form-wrapper">
      {% render_comment_form for object %}
    </div>
  {% endif %}

{% endwith %}{% endwith %}<commit_msg>Also render comment <div> when there are no comments, to assist JavaScript.<commit_after>{% load i18n comments %}
{% with comment_list=object.comments %}{% with comment_count=comment_list.count %}

  <div id="comments-wrapper">
    {% if comment_count %}
      <h3 class="has-comments-title">{% blocktrans with comment_count=comment_count entry_title=object.title %}{{ comment_count }} comments to {{ entry_title }}{% endblocktrans %}</h3>

      {% render_comment_list for object %}

      {% if not object.comments_are_open %}
        <p class="comments-closed">{% trans "Comments are closed." %}</p>
      {% endif %}
    {% else %}
      {% if object.comments_are_open %}
        <h3 class="no-comments-title">{% trans "Leave a reply" %}</h3>
        {% render_comment_list for object %}{# make sure the div is visible in the page #}
      {% endif %}
    {% endif %}
  </div>

  {% if object.comments_are_open %}
    <div id="comments-form-wrapper">
      {% render_comment_form for object %}
    </div>
  {% endif %}

{% endwith %}{% endwith %}
{'fraction_non_alphanumeric': 0.16435541859270672, 'fraction_numerical': 0.0061633281972265025, 'mean_word_length': 3.367713004484305, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5394864', 'n_tokens_mistral': 671, 'n_tokens_neox': 588, 'n_words': 147}