<!--
SPDX-FileCopyrightText: 2018-present Tobias Kunze
SPDX-License-Identifier: AGPL-3.0-only WITH LicenseRef-Pretalx-AGPL-3.0-Terms
-->

{% load i18n %}

{% include "django/forms/widgets/input_option.html" %}
{% if not widget.official %}
    {% if widget.percentage %}
        <a href="https://translate.pretalx.com/engage/pretalx/{{ widget.value }}/">
            <span class="badge badge-pill color-{% if widget.percentage >= 90 %}success{% elif widget.percentage >= 80 %}warning{% else %}danger{% endif %}">
                {% blocktranslate trimmed with percentage=widget.percentage %}{{ percentage }} % translated{% endblocktranslate %}</span></a> {# We need to avoid trailing whitespace here, sadly #}
    {% endif %}
{% endif %}
