From 07a88ffea0d611f776582d4eb26fea3660d2714f Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Fri, 21 Jan 2022 14:13:13 +0000 Subject: [PATCH] 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. --- .../templates/wagtaildocs/documents/confirm_delete.html | 9 ++++++++- .../templates/wagtailimages/images/confirm_delete.html | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/wagtail/documents/templates/wagtaildocs/documents/confirm_delete.html b/wagtail/documents/templates/wagtaildocs/documents/confirm_delete.html index 6b48b49c50..8676aa79a9 100644 --- a/wagtail/documents/templates/wagtaildocs/documents/confirm_delete.html +++ b/wagtail/documents/templates/wagtaildocs/documents/confirm_delete.html @@ -14,7 +14,14 @@ {% endif %} -

{% trans "Are you sure you want to delete this document?" %}

+

+ {# 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 %} +

{% csrf_token %} diff --git a/wagtail/images/templates/wagtailimages/images/confirm_delete.html b/wagtail/images/templates/wagtailimages/images/confirm_delete.html index 4fd4d17773..eee261cabb 100644 --- a/wagtail/images/templates/wagtailimages/images/confirm_delete.html +++ b/wagtail/images/templates/wagtailimages/images/confirm_delete.html @@ -17,7 +17,14 @@ {% blocktrans count usage_count=image.get_usage.count %}Used {{ usage_count }} time{% plural %}Used {{ usage_count }} times{% endblocktrans %} {% endif %} -

{% trans "Are you sure you want to delete this image?" %}

+

+ {# 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 %} +

{% csrf_token %}