From c87adde6f69ec18c07d36a3976f2b47acd6c51cc Mon Sep 17 00:00:00 2001 From: Sylvain Date: Fri, 23 Oct 2020 11:53:18 +0200 Subject: [PATCH] [bug] unable to set libraries locales to their default values (en-us) --- CHANGELOG.md | 2 ++ app/frontend/packs/application.js.erb | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da8116616..532aaa284 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +- Fix a bug: unable to set libraries locales to their default values (en-us) + ## v4.6.1 2020 October 21 - Reduced down time during upgrades diff --git a/app/frontend/packs/application.js.erb b/app/frontend/packs/application.js.erb index 1e702370b..0c3ef4dd8 100644 --- a/app/frontend/packs/application.js.erb +++ b/app/frontend/packs/application.js.erb @@ -6,7 +6,9 @@ import {} from 'jquery-ujs'; import 'bootstrap-sass'; import '../src/javascript/lib/polyfill'; import 'angular'; +<% unless Rails.application.secrets.angular_locale == 'en-us' %> import 'angular-i18n/angular-locale_<%= Rails.application.secrets.angular_locale %>.js'; +<% end %> import 'angular-cookies'; import 'angular-resource'; import 'angular-sanitize'; @@ -15,11 +17,15 @@ import '@uirouter/angularjs'; import 'angular-ui-bootstrap'; import 'ui-select'; import 'moment'; +<% unless Rails.application.secrets.moment_locale == 'en' %> import 'moment/locale/<%= Rails.application.secrets.moment_locale %>.js'; +<% end %> import 'moment-timezone'; import 'angular-ui-calendar'; import 'fullcalendar'; +<% unless Rails.application.secrets.fullcalendar_locale == 'en' %> import 'fullcalendar/dist/locale/<%= Rails.application.secrets.fullcalendar_locale %>.js'; +<% end %> import 'angular-moment'; import 'ngUpload'; import 'jasny-bootstrap/js/fileinput'; @@ -46,7 +52,9 @@ import 'bootstrap-switch/dist/js/bootstrap-switch'; import 'angular-bootstrap-switch/dist/angular-bootstrap-switch'; import 'angular-base64-upload/dist/angular-base64-upload.min'; import 'summernote'; +<% unless Rails.application.secrets.summernote_locale == 'en-US' %> import 'summernote/lang/summernote-<%= Rails.application.secrets.summernote_locale %>.js'; +<% end %> import 'angular-summernote/dist/angular-summernote'; import '../src/javascript/lib/summernote-ext-nugget'; import '@claviska/jquery-minicolors/jquery.minicolors.js';