0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Add plural to image/document confirm delete string

This stops it being flagged as a duplicate with the bulk delete template, and means both templates can share the string.
This commit is contained in:
Matt Westcott 2022-01-21 14:13:13 +00:00
parent cd6bc70d9d
commit 07a88ffea0
2 changed files with 16 additions and 2 deletions

View File

@ -14,7 +14,14 @@
</div> </div>
{% endif %} {% endif %}
<p>{% trans "Are you sure you want to delete this document?" %}</p> <p>
{# This message will only appear in the singular, but we specify a plural so it can share the translation string with confirm_bulk_delete.html #}
{% blocktrans trimmed count counter=1 %}
Are you sure you want to delete this document?
{% plural %}
Are you sure you want to delete these documents?
{% endblocktrans %}
</p>
<form action="{% url 'wagtaildocs:delete' document.id %}" method="POST"> <form action="{% url 'wagtaildocs:delete' document.id %}" method="POST">
{% csrf_token %} {% csrf_token %}
<input type="hidden" value="{{ next }}" name="next"> <input type="hidden" value="{{ next }}" name="next">

View File

@ -17,7 +17,14 @@
<a href="{{ image.usage_url }}">{% blocktrans count usage_count=image.get_usage.count %}Used {{ usage_count }} time{% plural %}Used {{ usage_count }} times{% endblocktrans %}</a> <a href="{{ image.usage_url }}">{% blocktrans count usage_count=image.get_usage.count %}Used {{ usage_count }} time{% plural %}Used {{ usage_count }} times{% endblocktrans %}</a>
</div> </div>
{% endif %} {% endif %}
<p>{% trans "Are you sure you want to delete this image?" %}</p> <p>
{# This message will only appear in the singular, but we specify a plural so it can share the translation string with confirm_bulk_delete.html #}
{% blocktrans count counter=1 %}
Are you sure you want to delete this image?
{% plural %}
Are you sure you want to delete these images?
{% endblocktrans %}
</p>
<form action="{% url 'wagtailimages:delete' image.id %}" method="POST"> <form action="{% url 'wagtailimages:delete' image.id %}" method="POST">
{% csrf_token %} {% csrf_token %}
<input type="hidden" value="{{ next }}" name="next"> <input type="hidden" value="{{ next }}" name="next">