{% if link_to_list %} {% set base = url('addons.reviews.list', addon.slug) %} {% else %} {% set base = addon.get_url_path()|urlparams('reviews') %} {% if collection_uuid %} {% set base = base|urlparams(collection_uuid=collection_uuid) %} {% endif %} {% endif %}

{% with num=addon.total_reviews %} {% if num %} {{ addon.average_rating|float|stars }} {% with count='{0}'|fe(num|numberfmt) %} {# Using num=count so we don't change an L10n string. #} {{ ngettext('{num} review', '{num} reviews', num)|f(num=count)|safe }} {% endwith %} {% else %} {{ _('Not yet rated') }} {% endif %} {% endwith %}