From 0fd5d16c222583dd68128b70b17e461d4decda8c Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Mon, 23 Jan 2023 06:07:20 +0100 Subject: [PATCH] [4.2.x] Fixed #34278 -- Made translatable string plural-aware in SelectFilter2.js. Bug in be63c78760924e1335603c36babd0ad6cfaea3c4. Backport of e3a4cee081cf60650b8824f0646383b79cb110e7 from main --- django/contrib/admin/static/admin/js/SelectFilter2.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/django/contrib/admin/static/admin/js/SelectFilter2.js b/django/contrib/admin/static/admin/js/SelectFilter2.js index 5189107aebf..9a4e0a3a91b 100644 --- a/django/contrib/admin/static/admin/js/SelectFilter2.js +++ b/django/contrib/admin/static/admin/js/SelectFilter2.js @@ -207,7 +207,11 @@ Requires core.js and SelectBox.js. const selector = document.getElementById(field_id + '_selector_chosen'); const warning = document.getElementById(field_id + '_list-footer-display-text'); selector.className = selector.className.replace('selector-chosen--with-filtered', ''); - warning.textContent = interpolate(gettext('%s selected options not visible'), [count]); + warning.textContent = interpolate(ngettext( + '%s selected option not visible', + '%s selected options not visible', + count + ), [count]); if(count > 0) { selector.className += ' selector-chosen--with-filtered'; }