mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-30 05:01:10 +02:00
add static files
This commit is contained in:
28
static/vendor/select2/tests/options/translation-tests.js
vendored
Normal file
28
static/vendor/select2/tests/options/translation-tests.js
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
module('Options - Translations');
|
||||
|
||||
var $ = require('jquery');
|
||||
var Options = require('select2/options');
|
||||
|
||||
test('partial dictionaries can be passed', function (assert) {
|
||||
var options = new Options({
|
||||
language: {
|
||||
searching: function () {
|
||||
return 'Something';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var translations = options.get('translations');
|
||||
|
||||
assert.equal(
|
||||
translations.get('searching')(),
|
||||
'Something',
|
||||
'The partial dictionary still overrides translations'
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
translations.get('noResults')(),
|
||||
'No results found',
|
||||
'You can still get English translations for keys not passed in'
|
||||
);
|
||||
});
|
Reference in New Issue
Block a user