mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-18 14:20:06 +01:00
update
This commit is contained in:
43
node_modules/selectize/notes/i18n-feature.js
generated
vendored
Normal file
43
node_modules/selectize/notes/i18n-feature.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
// what are the i18n conventions in js?
|
||||
// what strings do we need to translate
|
||||
// is i18n lang set?
|
||||
|
||||
describe("I18n", function(){
|
||||
describe("dictionary syntax", function(){
|
||||
var s = Selectize.init({
|
||||
dictionary: {
|
||||
addThis: "Ajouter %{elem}"
|
||||
}
|
||||
})
|
||||
|
||||
expect(s.i18n('addThis', {elem: 'ceci'}).to.equal("Ajouter ceci")
|
||||
})
|
||||
|
||||
describe("delegate to i18n library", function(){
|
||||
var I18n = {
|
||||
t: function(key, params) {
|
||||
return "Ajouter " + params.elem;
|
||||
}
|
||||
}
|
||||
|
||||
var s = Selectize.init({
|
||||
i18n: I18n.t
|
||||
});
|
||||
|
||||
expect(s.i18n('addThis', {elem: 'ceci'})).to.equal("Ajouter ceci")
|
||||
})
|
||||
|
||||
describe("default i18n library", function(){
|
||||
var I18n = {
|
||||
t: function(key, params) {
|
||||
return "Ajouter " + params.elem;
|
||||
}
|
||||
}
|
||||
|
||||
var s = Selectize.init({
|
||||
// i18n: default
|
||||
});
|
||||
|
||||
expect(s.i18n('addThis', {elem: 'ceci'})).to.equal("Ajouter ceci")
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user