From d40c0d3b0672ed1057001a632964121b06f0a1b2 Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Fri, 27 Oct 2017 17:15:21 +0200 Subject: [PATCH] Select2: fr localization --- app/assets/javascripts/new_design/application.js | 1 + .../javascripts/new_design/champs/multiple_drop_down_list.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/new_design/application.js b/app/assets/javascripts/new_design/application.js index 56b132233..e5d95ac00 100644 --- a/app/assets/javascripts/new_design/application.js +++ b/app/assets/javascripts/new_design/application.js @@ -18,5 +18,6 @@ //= require highcharts //= require chartkick //= require select2 +//= require select2_locale_fr //= require typeahead.bundle //= require_tree . diff --git a/app/assets/javascripts/new_design/champs/multiple_drop_down_list.js b/app/assets/javascripts/new_design/champs/multiple_drop_down_list.js index 3334a1790..02125aeae 100644 --- a/app/assets/javascripts/new_design/champs/multiple_drop_down_list.js +++ b/app/assets/javascripts/new_design/champs/multiple_drop_down_list.js @@ -1,7 +1,10 @@ document.addEventListener('turbolinks:load', function() { - $('select.select2').select2(); + $('select.select2').select2({ + 'language': 'fr' + }); $('select.select2-limited').select2({ + 'language': 'fr', 'placeholder': 'Sélectionnez des colonnes', 'maximumSelectionLength': '5', 'width': '300px'