From 0ab110f1217d62e7e05a557ec444a947516320b2 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Thu, 7 Sep 2023 12:20:03 +0200
Subject: [PATCH] fix

---
 app/views/admin/communication/websites/_form.html.erb  |  4 +++-
 .../websites/agenda/events/_dates.html.erb             | 10 +++++-----
 config/locales/communication/en.yml                    |  5 +++--
 config/locales/communication/fr.yml                    |  5 +++--
 config/locales/en.yml                                  |  1 +
 config/locales/fr.yml                                  |  1 +
 6 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/app/views/admin/communication/websites/_form.html.erb b/app/views/admin/communication/websites/_form.html.erb
index 1d6367fd4..1c20c4e24 100644
--- a/app/views/admin/communication/websites/_form.html.erb
+++ b/app/views/admin/communication/websites/_form.html.erb
@@ -7,8 +7,10 @@
       <%= osuny_panel t('metadata') do %>
         <%= f.input :name %>
         <%= f.input :url %>
-        <%= render 'admin/communication/abouts', f: f, i18n_key: 'activerecord.attributes.communication/website.about_' %>
         <%= f.input :in_production %>
+        <%= render 'admin/communication/abouts', f: f, i18n_key: 'activerecord.attributes.communication/website.about_' %>
+      <% end %>
+      <%= osuny_panel Communication::Website.human_attribute_name('features') do %>
         <%= f.input :feature_posts %>
         <%= f.input :feature_agenda %>
       <% end %>
diff --git a/app/views/admin/communication/websites/agenda/events/_dates.html.erb b/app/views/admin/communication/websites/agenda/events/_dates.html.erb
index 3b5167771..870e21eb4 100644
--- a/app/views/admin/communication/websites/agenda/events/_dates.html.erb
+++ b/app/views/admin/communication/websites/agenda/events/_dates.html.erb
@@ -1,9 +1,9 @@
 <i class="fas fa-play-circle"></i>
-<%= l event.from_day %>
-<%= l event.from_hour, format: "%H:%M" if event.from_hour %>
-<% if event.to_day%>
+<%= l(event.from_day) %>
+<%= l(event.from_hour, format: :time_only) if event.from_hour %>
+<% if event.to_day %>
   <br>
   <i class="fas fa-stop-circle"></i>
-  <%= l event.to_day %>
-  <%= l event.to_hour, format: "%H:%M" if event.to_hour %>
+  <%= l(event.to_day) %>
+  <%= l(event.to_hour, format: :time_only) if event.to_hour %>
 <% end %>
\ No newline at end of file
diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml
index 3874c4df1..098fdba4f 100644
--- a/config/locales/communication/en.yml
+++ b/config/locales/communication/en.yml
@@ -138,8 +138,9 @@ en:
         created_at: Creation
         default_language: Default language
         deployment_status_badge: Deployment status badge
-        feature_posts: Website with posts
-        feature_agenda: Website with agenda
+        features: Features
+        feature_posts: Posts
+        feature_agenda: Agenda
         git_branch: Git branch
         git_endpoint: Git endpoint
         git_provider: Git provider
diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml
index 30d469c1a..9467b766d 100644
--- a/config/locales/communication/fr.yml
+++ b/config/locales/communication/fr.yml
@@ -138,8 +138,9 @@ fr:
         created_at: Création
         default_language: Langue par défaut
         deployment_status_badge: Badge de statut du déploiement
-        feature_posts: Site avec des actualités
-        feature_agenda: Site avec un agenda
+        features: Fonctionnalités
+        feature_posts: Actualités
+        feature_agenda: Agenda
         git_branch: Branche
         git_endpoint: Point d'accès Git
         git_provider: Fournisseur Git
diff --git a/config/locales/en.yml b/config/locales/en.yml
index fc5648c67..3131d72c2 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -349,6 +349,7 @@ en:
       date_only: "%m/%d/%Y"
       date_with_explicit_month: "%B %d, %Y"
       date_with_hour: "%B %d, %Y %H:%M"
+      time_only: "%H:%M"
   today: Today
   true: Yes
   user:
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index c7e4dc9de..22a120ba2 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -349,6 +349,7 @@ fr:
       date_only: "%d/%m/%Y"
       date_with_explicit_month: "%d %B %Y"
       date_with_hour: "%d %B %Y %H:%M"
+      time_only: "%H:%M"
   today: Aujourd'hui
   true: Oui
   user:
-- 
GitLab