From 17d99a92c031b3cfde1cb9256a7b309fa2be7373 Mon Sep 17 00:00:00 2001 From: sto Date: Tue, 28 Jul 2026 13:20:29 +0200 Subject: [PATCH] Events: clarify messages --- app/views/contests/index.html.slim | 3 +++ app/views/events/index.html.slim | 4 ++-- app/views/layouts/authenticated.html.slim | 2 +- config/locales/en.yml | 5 ++++- config/locales/fr.yml | 5 ++++- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/views/contests/index.html.slim b/app/views/contests/index.html.slim index b091cee..89cd6a6 100644 --- a/app/views/contests/index.html.slim +++ b/app/views/contests/index.html.slim @@ -6,6 +6,9 @@ a.btn.btn-primary.mb-4 href=new_contest_path = t("contests.index.new_contest") +.alert.alert-primary role="alert" + = t("contests.index.message") + .row.row-cols-1.row-cols-md-3.g-4 - @contests.each do |contest| .col diff --git a/app/views/events/index.html.slim b/app/views/events/index.html.slim index 5e14a96..3d508f5 100644 --- a/app/views/events/index.html.slim +++ b/app/views/events/index.html.slim @@ -31,6 +31,6 @@ = t("events.index.my_contests_outside_events") .card-body .card-text.mb-2 - = "#{@contests_without_event} " + t("events.index.contests") if @contests_without_event > 1 - = "#{@contests_without_event} " + t("events.index.contest") if @contests_without_event <= 1 + = "#{@contests_without_event} " + t("events.index.other_contests") if @contests_without_event > 1 + = "#{@contests_without_event} " + t("events.index.other_contest") if @contests_without_event <= 1 a.stretched-link href=contests_path \ No newline at end of file diff --git a/app/views/layouts/authenticated.html.slim b/app/views/layouts/authenticated.html.slim index 418ff5c..d8bbee9 100644 --- a/app/views/layouts/authenticated.html.slim +++ b/app/views/layouts/authenticated.html.slim @@ -10,7 +10,7 @@ html - if @current_user.admin a.navbar-brand href=users_path class="btn btn-light" style="margin-right: 0" = t("nav.users") - a.navbar-brand href=contests_path class="btn btn-light" style="margin-right: 0" + a.navbar-brand href=events_path class="btn btn-light" style="margin-right: 0" = t("nav.home") a.navbar-brand href=user_path(@current_user) class="btn btn-light" = t("nav.settings") diff --git a/config/locales/en.yml b/config/locales/en.yml index bac8961..176497e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -211,6 +211,7 @@ en: index: title: Welcome %{username}! manage_contests: Manage my contests + message: Here are all contests not associated with any event. new_contest: Create a new contest modals: destroy: @@ -298,6 +299,8 @@ en: my_contests_outside_events: My contests not linked to any event new: Create a new event new_contest: Add a contest to this event + other_contest: contest + other_contests: contests subtitle: My events title: Welcome %{username}! new: @@ -355,7 +358,7 @@ en: warning: "You first need to add a puzzle before converting messages to completions." nav: users: Users - home: My contests + home: Home settings: My account log_out: Log out offlines: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index f1de311..df39aa4 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -182,6 +182,7 @@ fr: index: title: Bienvenue %{username} ! manage_contests: Mes concours de puzzle + message: Ici se trouvent les concours non associés à des événements new_contest: Créer un nouveau concours modals: destroy: @@ -269,6 +270,8 @@ fr: my_contests_outside_events: Mes concours non associés à un événement new: Créer un nouvel événement new_contest: Ajouter une épreuve à cet événement + other_contest: concours + other_contests: concours subtitle: Mes événements title: Bienvenue %{username} ! new: @@ -326,7 +329,7 @@ fr: warning: "Au moins un puzzle doit être ajouté avant de pouvoir convertir des messages en complétions." nav: users: Utilisateur.ices - home: Mes concours + home: Accueil settings: Mon compte log_out: Déconnexion offlines: