{% extends "base.html" %} {% from "_speed.html" import speed_field with context %} {% from "_remove.html" import remove_box with context %} {% from "_paper.html" import paper_head with context %} {% from "_making.html" import making with context %} {% from "_icons.html" import icon %} {% block title %}{{ t('paper.prepare') }}: {{ head.title }} · {{ t('common.app') }}{% endblock %} {% block view_class %} wide{% endblock %} {% block main %} {#- Prepare (#391, DESIGN.md "Prepare"; screens prepare.png, making.png, failed.png): the paper header, the audiobook job inline, three steps and the side column. -#} {{ paper_head(head, 'prepare', 'document-title', text_language) }}

{% if analysing %}{{ t('document.analysing') }}{% endif %}

{% if card %}{{ making(card, document) }}{% endif %} {% if failed %}
{{ icon('alert', 'l') }}

{{ t('document.analysis_failed', reason=failed.reason) }}{% if failed.details %} {{ t('common.details') }} {{ failed.details }}{% endif %}

{% endif %}

1 {{ t('document.step_check') }}

{% if report %}

{{ t('document.summary_chapters', n=chapters|length, chosen=chosen_chapters) }} {{ t('document.summary_edits', n=edit_count) }} {{ t('document.summary_heard', n=heard) }}

{% if report.unreadable %}{# a PDF whose text is glyph numbers (#442, #187) #}
{{ icon('alert', 'l') }}

{% if report.unreadable.stops %}{{ t('document.unreadable_stop', n=report.unreadable.pages|length, pages=report.unreadable.ranges) }}{% else %}{{ t('document.unreadable_pages', n=report.unreadable.pages|length, pages=report.unreadable.ranges) }}{% endif %}

{% endif %} {% if report.picture_pages %}{# a PDF's pages that are scans without text (#186) #}
{{ icon('alert', 'l') }}

{{ t('document.picture_pages', n=report.picture_pages.pages|length, pages=report.picture_pages.ranges) }}

{% endif %} {% if report.problems %}
{{ icon('alert', 'l') }}

{{ t('document.problems') }}

    {% for problem in report.problems %}
  • {{ t('document.problem', step=problem.step, message=problem.message) }}
  • {% endfor %}
{% endif %} {% if report.not_run %}
{{ icon('info', 'l') }}

{{ t('document.not_run', steps=report.not_run|join(', ')) }}

{% endif %} {% if report.warnings %}
{{ icon('info', 'l') }}

{{ t('document.warnings') }}

    {% for warning in report.warnings %}
  • {{ warning }}
  • {% endfor %}
{% endif %} {# the buttons app.js wires are drawn disabled; it enables each with its click (#350, #427) #}
{{ t('check.chapters') }}

{{ t('check.chapters_hint') }}

    {% for chapter in ordered_chapters %} {% set off = chapter.references or chapter.publisher %}
  1. {% if chapter.references %}{{ t('check.references') }}{% endif %}{% if chapter.publisher %}{{ t('check.publisher') }}{% endif %} {% if chapter.first_page %}{{ t('check.chapter_details', page=chapter.first_page, n=chapter.utterances) }}{% else %}{{ t('check.chapter_details_no_page', n=chapter.utterances) }}{% endif %}{% if chapter.references %}; {{ t('check.references') }}{% endif %}{% if chapter.publisher %}; {{ t('check.publisher') }}{% endif %}
  2. {% endfor %}

{{ t('check.language_hint') }}

{% if language_note %}

{{ language_note }}

{% endif %}
{{ t('check.switches') }}

{{ t('check.switches_hint') }}

    {% for category in categories %}
  • {{ t('check.counts', **category.counts) }}
    {% if category.total %}
    {{ icon('chev', 's') }}{{ t('check.category_changes', label=category.label, n=category.total) }} {% if category.total > category.rows|length %}

    {{ t('check.more', shown=category.rows|length, total=category.total) }}

    {% endif %}
    {% for row in category.rows %} {% endfor %}
    {{ t('check.printed') }}{{ t('check.said') }}{{ t('check.reason') }} {{ t('check.page') }}{{ t('check.chapter') }}{{ t('check.status') }}
    {{ row.printed }}{{ row.said }}{{ row.reason }}{{ row.page }}{{ row.chapter }}{{ row.status }}
    {% endif %}
  • {% endfor %}

{% else %}

{{ t('document.not_analysed') }}

{% if not analysing %}

{% endif %} {% endif %}

2 {{ t('document.step_voice') }}

{% if not voice_installed %}
{{ icon('alert', 'l') }}

{{ t('voice.missing') }} {{ t('voice.setup') }}

{% elif voice_partly %}
{{ icon('alert', 'l') }}

{{ t('voice.missing_languages', languages=voice_partly) }} {{ t('voice.setup') }}

{% endif %}

{{ t('voice.language_hint') }}

{{ t('voice.licence') }} {{ licences }}

{{ speed_field('speed-exact', speed, t('speed.exact')) }}

{{ t('voice.letter_pace') }}

{{ t('voice.letter_pace_hint') }}

    {% for pace in letter_paces %}
  • {% endfor %}
{% if voice_installed %}

{{ t('voice.preview_hint', limit=preview_limit) }}

{% endif %}

3 {{ t('document.step_make') }}

{{ t('make.folder_hint') }}

{{ t('make.subtitles_hint') }}

{{ t('voice.remembered') }}

{% set blocked = 'needs_analysis' if not report else ('needs_text' if report.unreadable and report.unreadable.stops else ('needs_chapters' if not chosen_chapters else ('needs_voice' if not job_voice_installed else ''))) %}

{% if blocked %}{{ t('make.' + blocked) }}{% endif %}

{{ t('remove.heading') }}

{{ remove_box(document, removal, busy, false) }}
{% endblock %}