diff --git a/Gemfile b/Gemfile index 53b050864a6166ed6de4c08b45531420b8359996..81cb8ddd4bc36c8859b64a904d77e0d60168ecf5 100644 --- a/Gemfile +++ b/Gemfile @@ -38,6 +38,7 @@ gem "hal_openscience", "~> 0.1" gem "has_scope", "~> 0.8.0" gem "hash_dot" gem "i18n_data", "~> 0.17.1" +gem "i18n_date_range", "~> 0.1.0" gem "image_processing" gem "jbuilder" gem "jquery-rails" @@ -93,4 +94,4 @@ group :test do gem "simplecov", require: false end -gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] +gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index ec027c15b0cd75e4471a32408df703c6440ba8ad..4ba3d37c8ea7a377f8d41197e64a2402b10273c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -275,6 +275,7 @@ GEM concurrent-ruby (~> 1.0) i18n_data (0.17.1) simple_po_parser (~> 1.1) + i18n_date_range (0.1.0) image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) @@ -614,6 +615,7 @@ DEPENDENCIES has_scope (~> 0.8.0) hash_dot i18n_data (~> 0.17.1) + i18n_date_range (~> 0.1.0) image_processing jbuilder jquery-rails diff --git a/app/views/admin/communication/websites/agenda/events/static.html.erb b/app/views/admin/communication/websites/agenda/events/static.html.erb index fc6d33d66b656c5a8dfec2c48859b28ac39969e2..de3fda683a5cc5f97f87f281e6ceb1a37085275a 100644 --- a/app/views/admin/communication/websites/agenda/events/static.html.erb +++ b/app/views/admin/communication/websites/agenda/events/static.html.erb @@ -4,8 +4,8 @@ dates: status: "<%= @about.status %>" archive: <%= @about.archive? %> computed: - short: "Du 14 au 16 juin 2023" - long: "Du mercredi 14 au vendredi 16 juin 2023" + short: <%= date_range_i18n(@about.from_day, @about.to_day) %> + long: <%= date_range_i18n(@about.from_day, @about.to_day, :long) %> from: day: <%= @about.from_day %> <% if @about.from_hour %>