Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Pluralize 'items' in formatSelectionTooBig #378

Merged
merged 1 commit into from

2 participants

@gavinwahl

formatSelectionTooBig returns the text 'You can only select 1 items'. This patch fixes that by correctly pluralizing items based on the limit.

@ivaynberg ivaynberg merged commit 3254f74 into select2:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 4, 2012
  1. @gavinwahl
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  select2.js
View
2  select2.js
@@ -2348,7 +2348,7 @@
formatResultCssClass: function(data) {return undefined;},
formatNoMatches: function () { return "No matches found"; },
formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; },
- formatSelectionTooBig: function (limit) { return "You can only select " + limit + " items"; },
+ formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Loading more results..."; },
formatSearching: function () { return "Searching..."; },
minimumResultsForSearch: 0,
Something went wrong with that request. Please try again.