diff --git a/app/views/contests/show.html.slim b/app/views/contests/show.html.slim
index 931b1ec..711bf09 100644
--- a/app/views/contests/show.html.slim
+++ b/app/views/contests/show.html.slim
@@ -50,10 +50,10 @@
.row.mt-5
.col
h4 = t("messages.plural").capitalize
- - if !@puzzles.size
+ - if @puzzles.size == 0
.row
.col.alert.alert-danger
- | You first need to add a puzzle before converting messages to completions
+ = t("messages.warning")
table.table.table-striped.table-hover
thead
tr
@@ -82,7 +82,7 @@
td
= message.text
td
- - if @puzzles.size
+ - if @puzzles.size > 0
a.btn.btn-sm.btn-secondary href=contest_message_convert_path(@contest, message) style="white-space: nowrap;"
= t("helpers.buttons.add_completion")
- else
diff --git a/config/locales/en.yml b/config/locales/en.yml
index bf80d4c..fb4ad11 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -140,6 +140,7 @@ en:
title: "New completion"
plural: "messages"
singular: "message"
+ warning: "You first need to add a puzzle before converting messages to completions."
nav:
users: "Users"
home: "Home"
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 918602b..f283d23 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -111,6 +111,7 @@ fr:
title: "Ajout d'une complétion"
plural: "messages"
singular: "message"
+ warning: "Au moins un puzzle doit être ajouté avant de pouvoir convertir des messages en complétions."
nav:
users: "Utilisateur.ices"
home: "Accueil"