Bug 40720: Misleading title attribute "Remove all items" in Select2 fields

This patch updates our Select2 initialization script to update the
strings used as title attributes on the "X" control which appears in a
Select2 dropdown when you've made a selection.

The updated text reads "Clear selections" in order to eliminate the
ambiguity of the word "items."

To test, apply the patch and clear your browser cache.

- Go to Catalog -> Item search.
- Make one or more selections in any of the Select2 dropdowns (e.g. Home
  library, current library, item type, etc.).
- An "X" should appear at the end of the field after you've made one or
  more selections.
- Hover your mouse over the "X." The title which appears should read
  "Clear selections."

Sponsored-by: Athens County Public Libraries

Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Slava Shishkin 2025-10-28 17:01:53 +02:00 committed by Lucas Gass
parent 7dac6055b2
commit a8dd0bc13f
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 2 additions and 2 deletions

View File

@ -32,10 +32,10 @@ $.fn.select2.defaults.set("language", {
return __("Searching…");
},
removeAllItems: function () {
return __("Remove all items");
return __("Clear selections");
},
removeItem: function () {
return __("Remove item");
return __("Clear selection");
},
});