<commit_before>{% set reviews = reviews[:3] %}
{% cache reviews %}
  {% if reviews %}
    {% set replies = get_replies(reviews) %}
    {% for review in reviews %}
      <div class="review">
        <h3>
          {% if review.title %}
            <b>{{ review.title }}</b>
          {% endif %}
          {{ review.rating|stars }}
        </h3>
        <p class="byline">
          {% trans user=review.user|user_link, date=review.created|datetime %}
            by {{ user }} on {{ date }}
          {% endtrans %}
        </p>
        <p class="description">{{ review.body|nl2br }}</p>
        {% if replies[review.id] %}
          <a class="more-info" href="{{ replies[review.id].get_url_path() }}">
            {{ _("Show the developer's reply to this review") }}</a>
        {% endif %}
      </div>
    {% endfor %}
    {% if addon %}
      <p>
        {% if settings.IMPALA_REVIEWS %}
          <a class="more-info" href="{{ url('i_reviews.list', addon.slug) }}">
        {% else %}
          <a class="more-info" href="{{ url('reviews.list', addon.slug) }}">
        {% endif %}
          {% trans num=addon.total_reviews, cnt=addon.total_reviews|numberfmt %}
            See all user reviews
          {% pluralize %}
            See all {{ cnt }} user reviews
          {% endtrans %}
        </a>
      </p>
    {% endif %}
  {% else %}
    <div class="review no-reviews">
      <h3>
        {% trans url = url('reviews.add', addon.slug) %}
          This add-on has not yet been reviewed.
          <a href="{{ url }}">Be the first!</a>
        {% endtrans %}
      </h3>
    </div>
  {% endif %}
{% endcache %}<commit_msg>don't offer writing reviews to an addon's author (bug 678892)<commit_after>{% set reviews = reviews[:3] %}
{% cache reviews %}
  {% if reviews %}
    {% set replies = get_replies(reviews) %}
    {% for review in reviews %}
      <div class="review">
        <h3>
          {% if review.title %}
            <b>{{ review.title }}</b>
          {% endif %}
          {{ review.rating|stars }}
        </h3>
        <p class="byline">
          {% trans user=review.user|user_link, date=review.created|datetime %}
            by {{ user }} on {{ date }}
          {% endtrans %}
        </p>
        <p class="description">{{ review.body|nl2br }}</p>
        {% if replies[review.id] %}
          <a class="more-info" href="{{ replies[review.id].get_url_path() }}">
            {{ _("Show the developer's reply to this review") }}</a>
        {% endif %}
      </div>
    {% endfor %}
    {% if addon %}
      <p>
        {% if settings.IMPALA_REVIEWS %}
          <a class="more-info" href="{{ url('i_reviews.list', addon.slug) }}">
        {% else %}
          <a class="more-info" href="{{ url('reviews.list', addon.slug) }}">
        {% endif %}
          {% trans num=addon.total_reviews, cnt=addon.total_reviews|numberfmt %}
            See all user reviews
          {% pluralize %}
            See all {{ cnt }} user reviews
          {% endtrans %}
        </a>
      </p>
    {% endif %}
  {% else %}
    <div class="review no-reviews">
      <h3>
        {{ _('This add-on has not yet been reviewed.') }}
        {% if not addon.has_author(amo_user) %}
          <a href="{{ url('reviews.add', addon.slug) }}">
            {{ ('Be the first!') }}
          </a>
        {% endif %}
      </h3>
    </div>
  {% endif %}
{% endcache %}
{'fraction_non_alphanumeric': 0.18838862559241706, 'fraction_numerical': 0.00533175355450237, 'mean_word_length': 1.818864774624374, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '7555039', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1058, 'n_words': 248}