{% load i18n %}
{% if not transcript_audio %}

{% trans "Choose the podcast audio and save first." %}

{% else %}

{% if transcript_generation_status %}{% trans "Transcript status:" %} {{ transcript_generation_status }}. {{ transcript_generation_message }}{% endif %}

{{ transcript_generation_error }}

{% if transcript and not transcript_generation_active %} {# The buttons below replace the status link; it only matters while polling an active run. #}

{% blocktrans with named=transcript_voices.named total=transcript_voices.total %}{{ named }} of {{ total }} voices named{% endblocktrans %}

{% if transcript_voices.named < transcript_voices.total %}{% trans "Name the voices" %}{% else %}{% trans "Edit transcript and speakers" %}{% endif %} {% trans "Preview" %}

{% if can_generate_transcript %}{% trans "Generate again or replace files" %}{% else %}{% trans "Replace files" %}{% endif %} {% if can_generate_transcript %}{% include "cast/wagtail/_transcript_readiness.html" %}{% endif %}

{% if can_generate_transcript %}{% trans "Generate again…" %}{% endif %} {% trans "Upload replacement files" %}

{% else %} {% trans "Name the voices" %} {% if not transcript_generation_active %} {% if can_generate_transcript %}{% include "cast/wagtail/_transcript_readiness.html" %}{% endif %}

{% if can_generate_transcript %} {% endif %} {% trans "Upload transcript files" %}

{% endif %} {% endif %} {% endif %}
{% include "cast/wagtail/_transcript_status_poll.html" %}