{# The update's steps, for the update panel (design section 15.4). Titles and reasons come from the assistant and the repository, so they are only ever autoescaped text. #} {% macro used(step) -%} {% if step.provider %} · {{ step.provider }} · {{ step.model or _("default model") }}{% endif %}{% if step.tokens %} · {{ step.tokens|tokens }} {{ _("tokens") }}{% endif %}{% if step.cost_usd %} · {{ step.cost_usd|dollars }}{% endif %} {%- endmacro %} {% for step in steps %} {% if step.step == "facts" %}
  • {{ _("Refreshing the facts (free)…") }}
  • {% elif step.step == "facts_recorded" %}
  • {% if step.changes %}{% trans count=step.changes %}The facts are refreshed: one changed.{% pluralize %}The facts are refreshed: {{ count }} changed.{% endtrans %}{% else %}{{ _("The facts are refreshed: none changed.") }}{% endif %}
  • {% elif step.step == "plan" %}
  • {{ _("Planning the outline…") }}
  • {% elif step.step == "planned" %}
  • {% trans count=step.pages %}Planned one new page.{% pluralize %}Planned {{ count }} new pages.{% endtrans %}{{ used(step) }}
  • {% elif step.step == "page" %}
  • {% if step.attempt != 1 and step.revise %}{% trans title=step.title %}Revising “{{ title }}” again, with its problems…{% endtrans %}{% elif step.attempt != 1 %}{% trans title=step.title %}Writing “{{ title }}” again, with its problems…{% endtrans %}{% elif step.revise and step.reason == "update" %}{% trans title=step.title, count=step.changed %}Revising “{{ title }}” (one of its facts changed in this update)…{% pluralize count %}Revising “{{ title }}” ({{ count }} of its facts changed in this update)…{% endtrans %}{% elif step.revise %}{% trans title=step.title %}Revising “{{ title }}” (catching up: its facts changed after it was written)…{% endtrans %}{% elif step.reason == "update" %}{% trans title=step.title, count=step.changed %}Writing “{{ title }}” (one of its facts changed in this update)…{% pluralize count %}Writing “{{ title }}” ({{ count }} of its facts changed in this update)…{% endtrans %}{% elif step.reason == "new" %}{% trans title=step.title %}Writing “{{ title }}” (a new page)…{% endtrans %}{% elif step.reason == "outline" %}{% trans title=step.title %}Writing “{{ title }}” (its outline entry changed)…{% endtrans %}{% elif step.reason == "catching_up" %}{% trans title=step.title %}Writing “{{ title }}” (catching up: its facts changed after it was written)…{% endtrans %}{% else %}{% trans title=step.title %}Writing “{{ title }}”…{% endtrans %}{% endif %}
  • {% elif step.step == "page_written" %}
  • {% if step.unchanged %}{% trans title=step.title %}“{{ title }}” needed no change.{% endtrans %}{% elif step.revise %}{% trans title=step.title %}Revised “{{ title }}”.{% endtrans %}{% else %}{% trans title=step.title %}Wrote “{{ title }}”.{% endtrans %}{% endif %}{{ used(step) }}
  • {% elif step.step == "page_failed" %}
  • {% trans title=step.title, reason=step.reason %}“{{ title }}” wasn’t written: {{ reason }}{% endtrans %}
  • {% elif step.step == "page_later" %}
  • {% trans title=step.title %}“{{ title }}” waits for the next update: the budget is spent.{% endtrans %}
  • {% elif step.step == "page_skipped" %}
  • {% trans title=step.title %}“{{ title }}” is skipped: it failed last time, and nothing in it changed since.{% endtrans %} {% trans name=target %}To write it anyway: codetrail update {{ name }} --retry-failed{% endtrans %}
  • {% elif step.step == "digest" %}
  • {{ _("Writing the digest…") }}
  • {% elif step.step == "committed" %}
  • {% trans count=step.pages %}Saved one page to the guide.{% pluralize %}Saved {{ count }} pages to the guide.{% endtrans %}{% if step.failed %} {% trans count=step.failed %}One page wasn’t written.{% pluralize %}{{ count }} pages weren’t written.{% endtrans %}{% endif %}{% if step.later %} {% trans count=step.later %}One waits for the next update.{% pluralize %}{{ count }} wait for the next update.{% endtrans %}{% endif %}
  • {% endif %} {% endfor %}