select2-rails 3.5.9 → 3.5.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +5 -13
  2. data/lib/select2-rails/engine.rb +5 -1
  3. data/lib/select2-rails/source_file.rb +7 -27
  4. data/lib/select2-rails/version.rb +1 -1
  5. data/{app → vendor}/assets/images/select2-spinner.gif +0 -0
  6. data/{app → vendor}/assets/images/select2.png +0 -0
  7. data/{app → vendor}/assets/images/select2x2.png +0 -0
  8. data/{app → vendor}/assets/javascripts/select2.js +39 -12
  9. data/{app → vendor}/assets/javascripts/select2_locale_ar.js +4 -2
  10. data/{app → vendor}/assets/javascripts/select2_locale_az.js +4 -2
  11. data/{app → vendor}/assets/javascripts/select2_locale_bg.js +4 -2
  12. data/{app → vendor}/assets/javascripts/select2_locale_ca.js +4 -2
  13. data/{app → vendor}/assets/javascripts/select2_locale_cs.js +4 -2
  14. data/{app → vendor}/assets/javascripts/select2_locale_da.js +4 -2
  15. data/{app → vendor}/assets/javascripts/select2_locale_de.js +5 -3
  16. data/{app → vendor}/assets/javascripts/select2_locale_el.js +4 -2
  17. data/{app → vendor}/assets/javascripts/select2_locale_es.js +4 -2
  18. data/{app → vendor}/assets/javascripts/select2_locale_et.js +4 -2
  19. data/{app → vendor}/assets/javascripts/select2_locale_eu.js +4 -2
  20. data/{app → vendor}/assets/javascripts/select2_locale_fa.js +4 -2
  21. data/{app → vendor}/assets/javascripts/select2_locale_fi.js +4 -2
  22. data/{app → vendor}/assets/javascripts/select2_locale_fr.js +4 -2
  23. data/{app → vendor}/assets/javascripts/select2_locale_gl.js +4 -2
  24. data/{app → vendor}/assets/javascripts/select2_locale_he.js +4 -2
  25. data/{app → vendor}/assets/javascripts/select2_locale_hr.js +4 -2
  26. data/{app → vendor}/assets/javascripts/select2_locale_hu.js +4 -2
  27. data/{app → vendor}/assets/javascripts/select2_locale_id.js +4 -2
  28. data/{app → vendor}/assets/javascripts/select2_locale_is.js +4 -2
  29. data/{app → vendor}/assets/javascripts/select2_locale_it.js +4 -2
  30. data/{app → vendor}/assets/javascripts/select2_locale_ja.js +4 -2
  31. data/{app → vendor}/assets/javascripts/select2_locale_ka.js +4 -2
  32. data/{app → vendor}/assets/javascripts/select2_locale_ko.js +4 -2
  33. data/{app → vendor}/assets/javascripts/select2_locale_lt.js +4 -2
  34. data/{app → vendor}/assets/javascripts/select2_locale_lv.js +4 -2
  35. data/{app → vendor}/assets/javascripts/select2_locale_mk.js +4 -2
  36. data/{app → vendor}/assets/javascripts/select2_locale_ms.js +4 -2
  37. data/{app → vendor}/assets/javascripts/select2_locale_nl.js +7 -5
  38. data/{app → vendor}/assets/javascripts/select2_locale_no.js +4 -2
  39. data/{app → vendor}/assets/javascripts/select2_locale_pl.js +4 -2
  40. data/{app → vendor}/assets/javascripts/select2_locale_pt-BR.js +4 -2
  41. data/{app → vendor}/assets/javascripts/select2_locale_pt-PT.js +4 -2
  42. data/{app → vendor}/assets/javascripts/select2_locale_ro.js +4 -2
  43. data/{app → vendor}/assets/javascripts/select2_locale_rs.js +4 -2
  44. data/{app → vendor}/assets/javascripts/select2_locale_ru.js +4 -2
  45. data/{app → vendor}/assets/javascripts/select2_locale_sk.js +11 -9
  46. data/{app → vendor}/assets/javascripts/select2_locale_sv.js +4 -2
  47. data/{app → vendor}/assets/javascripts/select2_locale_th.js +4 -2
  48. data/{app → vendor}/assets/javascripts/select2_locale_tr.js +4 -2
  49. data/vendor/assets/javascripts/select2_locale_ug-CN.js +16 -0
  50. data/{app → vendor}/assets/javascripts/select2_locale_uk.js +4 -2
  51. data/{app → vendor}/assets/javascripts/select2_locale_vi.js +4 -2
  52. data/{app → vendor}/assets/javascripts/select2_locale_zh-CN.js +4 -2
  53. data/{app → vendor}/assets/javascripts/select2_locale_zh-TW.js +4 -2
  54. data/{app → vendor}/assets/stylesheets/select2-bootstrap.css +0 -0
  55. data/{app/assets/stylesheets/select2.css.erb → vendor/assets/stylesheets/select2.scss} +27 -26
  56. metadata +64 -63
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MmJhNDhmYTI5M2VkYWU4YWQwOTY2MDEzMmFiMDMyN2I0OWNkZTQyMA==
5
- data.tar.gz: !binary |-
6
- MDkzMzY0MWIwZDIyODM1M2I3ZWRlZWE0ZTdhYjJmYzY4NDE1MWEwNg==
2
+ SHA1:
3
+ metadata.gz: f905192c7ef87ad156560a77960c975629d45bd1
4
+ data.tar.gz: 78f225b8fd3081ddea3c5d228f4d1d54dfff874d
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- Y2UyZWE5YzQ4MTYyMDY5YTczZDNmZGNhOTc5Y2U4Mjg1MTM3YzdjM2QyMzNl
10
- NDRiYjU2YmE0NWNjYzE4NTY2MTdlNTIwZGQyZjUzZTNkODBkNjYzNDUwYmM5
11
- OTM3NjYxNGY1MDEwZTA1MTc0YWI0YWY1YzZlM2RhNzkwOGI3MWU=
12
- data.tar.gz: !binary |-
13
- NzM5OTVhZTU5YmI5MTQyZWNlNGFjYjhkZDM4MmMxOGQ4MmI5Y2VlMTJlMDg2
14
- MzdhNTNhZTk3MmUyZDVhYjY2ZGZmZjAxYzRmMjQwODEzNWQ1MDQzZWM3M2U5
15
- NWVlOTZkNWJkN2E5MmZlYjQ0Nzg1NjFiYzg5OWM0NTAwNjk1OTQ=
6
+ metadata.gz: d4059e2a9461fe63a12ae4e9d406d02b3e4f98c5e0a3498596f99b4f0649d3a8a48d32a2e0572e8f5a799e3d07bf15353a8ff43ed219b9b34476270d759fdfc9
7
+ data.tar.gz: 1b7e800c6eed3d3f3b34c6281cfc485196dfa1603e22f47dbb7e60a498fb68a54f9374850264671722419d5cca16f3b56c2a7c9f68aecf9dd0801486e74979b6
@@ -1,6 +1,10 @@
1
1
  module Select2
2
2
  module Rails
3
3
  class Engine < ::Rails::Engine
4
+ initializer :images do |app|
5
+ app.config.assets.precompile +=
6
+ %w(select2.png select2-spinner.gif select2x2.png)
7
+ end
4
8
  end
5
9
  end
6
- end
10
+ end
@@ -9,12 +9,12 @@ class SourceFile < Thor
9
9
  def fetch
10
10
  filtered_tags = fetch_tags
11
11
  tag = select("Which tag do you want to fetch?", filtered_tags)
12
- self.destination_root = "app/assets"
12
+ self.destination_root = "vendor/assets"
13
13
  remote = "https://github.com/ivaynberg/select2"
14
14
  get "#{remote}/raw/#{tag}/select2.png", "images/select2.png"
15
15
  get "#{remote}/raw/#{tag}/select2x2.png", "images/select2x2.png"
16
16
  get "#{remote}/raw/#{tag}/select2-spinner.gif", "images/select2-spinner.gif"
17
- get "#{remote}/raw/#{tag}/select2.css", "stylesheets/select2.css"
17
+ get "#{remote}/raw/#{tag}/select2.css", "stylesheets/select2.scss"
18
18
  get "#{remote}/raw/#{tag}/select2-bootstrap.css", "stylesheets/select2-bootstrap.css"
19
19
  get "#{remote}/raw/#{tag}/select2.js", "javascripts/select2.js"
20
20
  languages.each do |lang|
@@ -22,22 +22,14 @@ class SourceFile < Thor
22
22
  end
23
23
  end
24
24
 
25
- desc "convert css to css.erb file", "make css preprocess with erb"
25
+ desc "convert css to use rails paths", "make css use rails paths"
26
26
  def convert
27
- self.destination_root = "app/assets"
27
+ self.destination_root = "vendor/assets"
28
28
  inside destination_root do
29
- run("cp stylesheets/select2.css stylesheets/select2.css.erb")
30
- build_image_dependencies
31
- gsub_file 'stylesheets/select2.css.erb', %r/url\(([^\)]*)\)/, 'url(<%= asset_path(\1) %>)'
29
+ gsub_file 'stylesheets/select2.scss', %r/url\(([^\)]*)\)/, 'image-url(\1)'
32
30
  end
33
31
  end
34
32
 
35
- desc "clean up useless files", "clean up useless files"
36
- def cleanup
37
- self.destination_root = "app/assets"
38
- remove_file "stylesheets/select2.css"
39
- end
40
-
41
33
  private
42
34
 
43
35
  def fetch_tags
@@ -45,12 +37,14 @@ class SourceFile < Thor
45
37
  response = JSON.parse(http.get("https://api.github.com/repos/ivaynberg/select2/tags").body)
46
38
  response.map{|tag| tag["name"]}.sort
47
39
  end
40
+
48
41
  def languages
49
42
  [ "ar", "bg", "ca", "cs", "da", "de", "el", "es", "et", "eu", "fa", "fi", "fr", "gl", "he", "hr",
50
43
  "hu", "id", "is", "it", "ja", "ka", "ko", "lt", "lv", "mk", "ms", "nl", "no", "pl", "pt-BR",
51
44
  "pt-PT", "ro", "rs", "ru", "sk", "sv", "th", "tr", "uk", "vi", "zh-CN", "zh-TW"
52
45
  ].sort
53
46
  end
47
+
54
48
  def select msg, elements
55
49
  elements.each_with_index do |element, index|
56
50
  say(block_given? ? yield(element, index + 1) : ("#{index + 1}. #{element.to_s}"))
@@ -59,18 +53,4 @@ class SourceFile < Thor
59
53
  elements[result - 1]
60
54
  end
61
55
 
62
- def build_image_dependencies
63
- f = File.open("stylesheets/select2.css.erb", "r+")
64
- lines = f.readlines
65
- f.close
66
- lines = ["//= depend_on_asset \"select2.png\"\n"] +
67
- ["//= depend_on_asset \"select2-spinner.gif\"\n"] +
68
- ["//= depend_on_asset \"select2x2.png\"\n"] +
69
- lines
70
-
71
- output = File.new("stylesheets/select2.css.erb", "w")
72
- lines.each { |line| output.write line }
73
- output.close
74
- end
75
-
76
56
  end
@@ -1,5 +1,5 @@
1
1
  module Select2
2
2
  module Rails
3
- VERSION = "3.5.9"
3
+ VERSION = "3.5.9.1"
4
4
  end
5
5
  end
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  Copyright 2012 Igor Vaynberg
3
3
 
4
- Version: 3.5.0 Timestamp: Mon Jun 16 19:29:44 EDT 2014
4
+ Version: 3.5.1
5
5
 
6
6
  This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
7
7
  General Public License version 2 (the "GPL License"). You may choose either license to govern your
@@ -443,6 +443,16 @@ the specific language governing permissions and limitations under the Apache Lic
443
443
  // TODO - replace query.page with query so users have access to term, page, etc.
444
444
  // added query as third paramter to keep backwards compatibility
445
445
  var results = options.results(data, query.page, query);
446
+ query.callback(results);
447
+ },
448
+ error: function(jqXHR, textStatus, errorThrown){
449
+ var results = {
450
+ hasError: true,
451
+ jqXHR: jqXHR,
452
+ textStatus: textStatus,
453
+ errorThrown: errorThrown,
454
+ };
455
+
446
456
  query.callback(results);
447
457
  }
448
458
  });
@@ -836,13 +846,13 @@ the specific language governing permissions and limitations under the Apache Lic
836
846
 
837
847
  // abstract
838
848
  destroy: function () {
839
- var element=this.opts.element, select2 = element.data("select2");
849
+ var element=this.opts.element, select2 = element.data("select2"), self = this;
840
850
 
841
851
  this.close();
842
852
 
843
853
  if (element.length && element[0].detachEvent) {
844
854
  element.each(function () {
845
- this.detachEvent("onpropertychange", this._sync);
855
+ this.detachEvent("onpropertychange", self._sync);
846
856
  });
847
857
  }
848
858
  if (this.propertyObserver) {
@@ -1027,7 +1037,7 @@ the specific language governing permissions and limitations under the Apache Lic
1027
1037
 
1028
1038
  query.callback(data);
1029
1039
  });
1030
- // this is needed because inside val() we construct choices from options and there id is hardcoded
1040
+ // this is needed because inside val() we construct choices from options and their id is hardcoded
1031
1041
  opts.id=function(e) { return e.id; };
1032
1042
  } else {
1033
1043
  if (!("query" in opts)) {
@@ -1766,6 +1776,12 @@ the specific language governing permissions and limitations under the Apache Lic
1766
1776
  return;
1767
1777
  }
1768
1778
 
1779
+ // handle ajax error
1780
+ if(data.hasError !== undefined && checkFormatter(opts.formatAjaxError, "formatAjaxError")) {
1781
+ render("<li class='select2-ajax-error'>" + evaluate(opts.formatAjaxError, opts.element, data.jqXHR, data.textStatus, data.errorThrown) + "</li>");
1782
+ return;
1783
+ }
1784
+
1769
1785
  // save context, if any
1770
1786
  this.context = (data.context===undefined) ? null : data.context;
1771
1787
  // create a default choice and prepend it to the list
@@ -2101,6 +2117,9 @@ the specific language governing permissions and limitations under the Apache Lic
2101
2117
  this.search.on("keydown", this.bind(function (e) {
2102
2118
  if (!this.isInterfaceEnabled()) return;
2103
2119
 
2120
+ // filter 229 keyCodes (input method editor is processing key input)
2121
+ if (229 == e.keyCode) return;
2122
+
2104
2123
  if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {
2105
2124
  // prevent the page from scrolling
2106
2125
  killEvent(e);
@@ -2953,7 +2972,7 @@ the specific language governing permissions and limitations under the Apache Lic
2953
2972
  // multi
2954
2973
  onSelect: function (data, options) {
2955
2974
 
2956
- if (!this.triggerSelect(data)) { return; }
2975
+ if (!this.triggerSelect(data) || data.text === "") { return; }
2957
2976
 
2958
2977
  this.addSelectedChoice(data);
2959
2978
 
@@ -3406,13 +3425,6 @@ the specific language governing permissions and limitations under the Apache Lic
3406
3425
  },
3407
3426
  formatResultCssClass: function(data) {return data.css;},
3408
3427
  formatSelectionCssClass: function(data, container) {return undefined;},
3409
- formatMatches: function (matches) { if (matches === 1) { return "One result is available, press enter to select it."; } return matches + " results are available, use up and down arrow keys to navigate."; },
3410
- formatNoMatches: function () { return "No matches found"; },
3411
- formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " or more character" + (n == 1? "" : "s"); },
3412
- formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " character" + (n == 1? "" : "s"); },
3413
- formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
3414
- formatLoadMore: function (pageNumber) { return "Loading more results…"; },
3415
- formatSearching: function () { return "Searching…"; },
3416
3428
  minimumResultsForSearch: 0,
3417
3429
  minimumInputLength: 0,
3418
3430
  maximumInputLength: null,
@@ -3451,6 +3463,21 @@ the specific language governing permissions and limitations under the Apache Lic
3451
3463
  }
3452
3464
  };
3453
3465
 
3466
+ $.fn.select2.locales = [];
3467
+
3468
+ $.fn.select2.locales['en'] = {
3469
+ formatMatches: function (matches) { if (matches === 1) { return "One result is available, press enter to select it."; } return matches + " results are available, use up and down arrow keys to navigate."; },
3470
+ formatNoMatches: function () { return "No matches found"; },
3471
+ formatAjaxError: function (jqXHR, textStatus, errorThrown) { return "Loading failed"; },
3472
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " or more character" + (n == 1 ? "" : "s"); },
3473
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " character" + (n == 1 ? "" : "s"); },
3474
+ formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
3475
+ formatLoadMore: function (pageNumber) { return "Loading more results…"; },
3476
+ formatSearching: function () { return "Searching…"; },
3477
+ };
3478
+
3479
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['en']);
3480
+
3454
3481
  $.fn.select2.ajaxDefaults = {
3455
3482
  transport: $.ajax,
3456
3483
  params: {
@@ -6,12 +6,14 @@
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['ar'] = {
10
10
  formatNoMatches: function () { return "لم يتم العثور على مطابقات"; },
11
11
  formatInputTooShort: function (input, min) { var n = min - input.length; if (n == 1){ return "الرجاء إدخال حرف واحد على الأكثر"; } return n == 2 ? "الرجاء إدخال حرفين على الأكثر" : "الرجاء إدخال " + n + " على الأكثر"; },
12
12
  formatInputTooLong: function (input, max) { var n = input.length - max; if (n == 1){ return "الرجاء إدخال حرف واحد على الأقل"; } return n == 2 ? "الرجاء إدخال حرفين على الأقل" : "الرجاء إدخال " + n + " على الأقل "; },
13
13
  formatSelectionTooBig: function (limit) { if (n == 1){ return "يمكنك أن تختار إختيار واحد فقط"; } return n == 2 ? "يمكنك أن تختار إختيارين فقط" : "يمكنك أن تختار " + n + " إختيارات فقط"; },
14
14
  formatLoadMore: function (pageNumber) { return "تحميل المزيد من النتائج…"; },
15
15
  formatSearching: function () { return "البحث…"; }
16
- });
16
+ };
17
+
18
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['ar']);
17
19
  })(jQuery);
@@ -6,7 +6,7 @@
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['az'] = {
10
10
  formatMatches: function (matches) { return matches + " nəticə mövcuddur, hərəkət etdirmək üçün yuxarı və aşağı düymələrindən istifadə edin."; },
11
11
  formatNoMatches: function () { return "Nəticə tapılmadı"; },
12
12
  formatInputTooShort: function (input, min) { var n = min - input.length; return n + " simvol daxil edin"; },
@@ -14,5 +14,7 @@
14
14
  formatSelectionTooBig: function (limit) { return "Sadəcə " + limit + " element seçə bilərsiniz"; },
15
15
  formatLoadMore: function (pageNumber) { return "Daha çox nəticə yüklənir…"; },
16
16
  formatSearching: function () { return "Axtarılır…"; }
17
- });
17
+ };
18
+
19
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['az']);
18
20
  })(jQuery);
@@ -7,12 +7,14 @@
7
7
  (function ($) {
8
8
  "use strict";
9
9
 
10
- $.extend($.fn.select2.defaults, {
10
+ $.fn.select2.locales['bg'] = {
11
11
  formatNoMatches: function () { return "Няма намерени съвпадения"; },
12
12
  formatInputTooShort: function (input, min) { var n = min - input.length; return "Моля въведете още " + n + " символ" + (n > 1 ? "а" : ""); },
13
13
  formatInputTooLong: function (input, max) { var n = input.length - max; return "Моля въведете с " + n + " по-малко символ" + (n > 1 ? "а" : ""); },
14
14
  formatSelectionTooBig: function (limit) { return "Можете да направите до " + limit + (limit > 1 ? " избора" : " избор"); },
15
15
  formatLoadMore: function (pageNumber) { return "Зареждат се още…"; },
16
16
  formatSearching: function () { return "Търсене…"; }
17
- });
17
+ };
18
+
19
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['bg']);
18
20
  })(jQuery);
@@ -6,12 +6,14 @@
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['ca'] = {
10
10
  formatNoMatches: function () { return "No s'ha trobat cap coincidència"; },
11
11
  formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduïu " + n + " caràcter" + (n == 1 ? "" : "s") + " més"; },
12
12
  formatInputTooLong: function (input, max) { var n = input.length - max; return "Introduïu " + n + " caràcter" + (n == 1? "" : "s") + "menys"; },
13
13
  formatSelectionTooBig: function (limit) { return "Només podeu seleccionar " + limit + " element" + (limit == 1 ? "" : "s"); },
14
14
  formatLoadMore: function (pageNumber) { return "S'estan carregant més resultats…"; },
15
15
  formatSearching: function () { return "S'està cercant…"; }
16
- });
16
+ };
17
+
18
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['ca']);
17
19
  })(jQuery);
@@ -12,7 +12,7 @@
12
12
  3: function() { return "tři"; },
13
13
  4: function() { return "čtyři"; }
14
14
  }
15
- $.extend($.fn.select2.defaults, {
15
+ $.fn.select2.locales['cs'] = {
16
16
  formatNoMatches: function () { return "Nenalezeny žádné položky"; },
17
17
  formatInputTooShort: function (input, min) {
18
18
  var n = min - input.length;
@@ -45,5 +45,7 @@
45
45
  },
46
46
  formatLoadMore: function (pageNumber) { return "Načítají se další výsledky…"; },
47
47
  formatSearching: function () { return "Vyhledávání…"; }
48
- });
48
+ };
49
+
50
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['cs']);
49
51
  })(jQuery);
@@ -6,12 +6,14 @@
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['da'] = {
10
10
  formatNoMatches: function () { return "Ingen resultater fundet"; },
11
11
  formatInputTooShort: function (input, min) { var n = min - input.length; return "Angiv venligst " + n + " tegn mere"; },
12
12
  formatInputTooLong: function (input, max) { var n = input.length - max; return "Angiv venligst " + n + " tegn mindre"; },
13
13
  formatSelectionTooBig: function (limit) { return "Du kan kun vælge " + limit + " emne" + (limit === 1 ? "" : "r"); },
14
14
  formatLoadMore: function (pageNumber) { return "Indlæser flere resultater…"; },
15
15
  formatSearching: function () { return "Søger…"; }
16
- });
16
+ };
17
+
18
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['da']);
17
19
  })(jQuery);
@@ -4,7 +4,7 @@
4
4
  (function ($) {
5
5
  "use strict";
6
6
 
7
- $.extend($.fn.select2.defaults, {
7
+ $.fn.select2.locales['de'] = {
8
8
  formatNoMatches: function () { return "Keine Übereinstimmungen gefunden"; },
9
9
  formatInputTooShort: function (input, min) { var n = min - input.length; return "Bitte " + n + " Zeichen mehr eingeben"; },
10
10
  formatInputTooLong: function (input, max) { var n = input.length - max; return "Bitte " + n + " Zeichen weniger eingeben"; },
@@ -12,5 +12,7 @@
12
12
  formatLoadMore: function (pageNumber) { return "Lade mehr Ergebnisse…"; },
13
13
  formatSearching: function () { return "Suche…"; },
14
14
  formatMatches: function (matches) { return matches + " Ergebnis " + (matches > 1 ? "se" : "") + " verfügbar, zum Navigieren die Hoch-/Runter-Pfeiltasten verwenden."; }
15
- });
16
- })(jQuery);
15
+ };
16
+
17
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['de']);
18
+ })(jQuery);
@@ -6,12 +6,14 @@
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['el'] = {
10
10
  formatNoMatches: function () { return "Δεν βρέθηκαν αποτελέσματα"; },
11
11
  formatInputTooShort: function (input, min) { var n = min - input.length; return "Παρακαλούμε εισάγετε " + n + " περισσότερο" + (n > 1 ? "υς" : "") + " χαρακτήρ" + (n > 1 ? "ες" : "α"); },
12
12
  formatInputTooLong: function (input, max) { var n = input.length - max; return "Παρακαλούμε διαγράψτε " + n + " χαρακτήρ" + (n > 1 ? "ες" : "α"); },
13
13
  formatSelectionTooBig: function (limit) { return "Μπορείτε να επιλέξετε μόνο " + limit + " αντικείμεν" + (limit > 1 ? "α" : "ο"); },
14
14
  formatLoadMore: function (pageNumber) { return "Φόρτωση περισσότερων…"; },
15
15
  formatSearching: function () { return "Αναζήτηση…"; }
16
- });
16
+ };
17
+
18
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['el']);
17
19
  })(jQuery);
@@ -4,12 +4,14 @@
4
4
  (function ($) {
5
5
  "use strict";
6
6
 
7
- $.extend($.fn.select2.defaults, {
7
+ $.fn.select2.locales['es'] = {
8
8
  formatNoMatches: function () { return "No se encontraron resultados"; },
9
9
  formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor, introduzca " + n + " car" + (n == 1? "ácter" : "acteres"); },
10
10
  formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor, elimine " + n + " car" + (n == 1? "ácter" : "acteres"); },
11
11
  formatSelectionTooBig: function (limit) { return "Sólo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
12
12
  formatLoadMore: function (pageNumber) { return "Cargando más resultados…"; },
13
13
  formatSearching: function () { return "Buscando…"; }
14
- });
14
+ };
15
+
16
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['es']);
15
17
  })(jQuery);
@@ -6,12 +6,14 @@
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['et'] = {
10
10
  formatNoMatches: function () { return "Tulemused puuduvad"; },
11
11
  formatInputTooShort: function (input, min) { var n = min - input.length; return "Sisesta " + n + " täht" + (n == 1 ? "" : "e") + " rohkem"; },
12
12
  formatInputTooLong: function (input, max) { var n = input.length - max; return "Sisesta " + n + " täht" + (n == 1? "" : "e") + " vähem"; },
13
13
  formatSelectionTooBig: function (limit) { return "Saad vaid " + limit + " tulemus" + (limit == 1 ? "e" : "t") + " valida"; },
14
14
  formatLoadMore: function (pageNumber) { return "Laen tulemusi.."; },
15
15
  formatSearching: function () { return "Otsin.."; }
16
- });
16
+ };
17
+
18
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['et']);
17
19
  })(jQuery);
@@ -6,7 +6,7 @@
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['eu'] = {
10
10
  formatNoMatches: function () {
11
11
  return "Ez da bat datorrenik aurkitu";
12
12
  },
@@ -39,5 +39,7 @@
39
39
  formatSearching: function () {
40
40
  return "Bilatzen…";
41
41
  }
42
- });
42
+ };
43
+
44
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['eu']);
43
45
  })(jQuery);
@@ -7,7 +7,7 @@
7
7
  (function ($) {
8
8
  "use strict";
9
9
 
10
- $.extend($.fn.select2.defaults, {
10
+ $.fn.select2.locales['fa'] = {
11
11
  formatMatches: function (matches) { return matches + " نتیجه موجود است، کلیدهای جهت بالا و پایین را برای گشتن استفاده کنید."; },
12
12
  formatNoMatches: function () { return "نتیجه‌ای یافت نشد."; },
13
13
  formatInputTooShort: function (input, min) { var n = min - input.length; return "لطفاً " + n + " نویسه بیشتر وارد نمایید"; },
@@ -15,5 +15,7 @@
15
15
  formatSelectionTooBig: function (limit) { return "شما فقط می‌توانید " + limit + " مورد را انتخاب کنید"; },
16
16
  formatLoadMore: function (pageNumber) { return "در حال بارگیری موارد بیشتر…"; },
17
17
  formatSearching: function () { return "در حال جستجو…"; }
18
- });
18
+ };
19
+
20
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['fa']);
19
21
  })(jQuery);