1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00

fix(vmbackups): a schedule run's failure reason in the reader's language

A failed run kept the error as English text and the schedule page passed
the whole sentence to gettext, which found no catalog entry once values
were filled in. The run now keeps the error as messages (text and values),
as jobs do, and the page shows them with the new words filter.
This commit is contained in:
catborise 2026-11-18 14:05:38 +03:00
parent fb6a427a47
commit e1611efd53
7 changed files with 40 additions and 15 deletions

View file

@ -2,6 +2,7 @@
{% load i18n %}
{% load static %}
{% load bootstrap_icons %}
{% load operations %}
{% block title %}{{ policy.name }} - {% trans "Backup schedules" %}{% endblock %}
{% block style %}<link href="{% static 'css/tom-select.bootstrap5.min.css' %}" rel="stylesheet">{% endblock %}
@ -36,7 +37,7 @@
{% if run.state == "submitted" %}{% if run.operation_id %}<a href="{% url 'operations:job' run.operation_id %}">{% trans "Backup job" %}</a>{% else %}{% trans "Started" %}{% endif %}
{% elif run.state == "skipped" %}<span class="badge text-bg-secondary">{% trans "Skipped" %}</span>
{% else %}<span class="badge text-bg-danger">{% trans "Failed" %}</span>{% endif %}
{% if run.note %}<div class="small text-body-secondary">{% trans run.note %}</div>{% endif %}
{% if run.note %}<div class="small text-body-secondary">{{ run.note|words }}</div>{% endif %}
</td>
</tr>
{% endfor %}