Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/215.canada.changes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added French translation for `Searching...` in the Select2 JS autocomplete module.
14 changes: 14 additions & 0 deletions ckan/public/base/javascript/modules/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ this.ckan.module('autocomplete', function (jQuery) {
formatResult: this.formatResult,
formatNoMatches: this.formatNoMatches,
formatInputTooShort: this.formatInputTooShort,
// (canada fork only): more i18n
// TODO: upstream contrib!!
formatSearching: this.formatSearching,
dropdownCssClass: this.options.dropdownClass,
containerCssClass: this.options.containerClass,
tokenSeparators: this.options.tokensep.split(''),
Expand Down Expand Up @@ -236,6 +239,17 @@ this.ckan.module('autocomplete', function (jQuery) {
);
},

/* (canada fork only): more i18n
* TODO: upstream contrib!!
* Formatter used by the select2 plugin that returns a string when
* XHR is being performed.
*
* Returns a string.
*/
formatSearching: function () {
return this._('Searching...');
},

formatTerm: function (term) {
// (canada fork only): initial label
if( this.options.initial_value.length > 0 ){
Expand Down