Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove 'no items selected' text since it's hidden anyway

dominik-zeglena38465e1f4d7
diff --git a/saleor/static/dashboard/js/components/bulk-actions.js b/saleor/static/dashboard/js/components/bulk-actions.js
index 1a8c305778..9e3c09b448 100644
--- a/saleor/static/dashboard/js/components/bulk-actions.js
+++ b/saleor/static/dashboard/js/components/bulk-actions.js
@@ -2,16 +2,13 @@ function updateCounterSelected () {
const count = $('.select-item:checked').length;
const $counterTextNode = $('.data-table-header-action-selected-items');
let counterText;
- switch (count) {
- case 0:
- counterText = pgettext('bulk action select label zero', 'no items selected');
- break;
- case 1:
- counterText = pgettext('bulk action select label one', 'item selected');
- break;
- default:
- counterText = pgettext('bulk action select label multiple', 'items selected');
+
+ if (count === 1) {
+ counterText = pgettext('bulk action select label one', 'item selected');
+ } else {
+ counterText = pgettext('bulk action select label multiple', 'items selected');
}
+
$counterTextNode.html(count ? `${count} ${counterText}` : counterText);
if (!count) {
$counterTextNode.addClass('hide');