diff --git a/app/controllers/decidim/half_signup/quick_auth_controller.rb b/app/controllers/decidim/half_signup/quick_auth_controller.rb index 87f349d..ef38982 100644 --- a/app/controllers/decidim/half_signup/quick_auth_controller.rb +++ b/app/controllers/decidim/half_signup/quick_auth_controller.rb @@ -61,6 +61,7 @@ def verify @form = form(VerificationCodeForm).instance @verification_code = auth_session["code"] @info = set_contact_info + @mail = auth_session["email"] == @info end def authenticate diff --git a/app/views/decidim/half_signup/quick_auth/verify.html.erb b/app/views/decidim/half_signup/quick_auth/verify.html.erb index 60605e1..066ebc2 100644 --- a/app/views/decidim/half_signup/quick_auth/verify.html.erb +++ b/app/views/decidim/half_signup/quick_auth/verify.html.erb @@ -11,7 +11,11 @@

<%= t("enter_code", scope: "decidim.half_signup.quick_auth") %>

- <%= t("instruction", scope:"decidim.half_signup.quick_auth", contact_info: @info) %> + <% if @mail %> + <%= t("instruction_email", scope:"decidim.half_signup.quick_auth", contact_info: @info) %> + <% else %> + <%= t("instruction", scope:"decidim.half_signup.quick_auth", contact_info: @info) %> + <% end %>
<%= auth_link_generator %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index baa2521..f541685 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -78,6 +78,7 @@ en: welcome: Welcome to the platform! enter_code: 'Please enter the code:' instruction: You should have received the code to %{contact_info} + instruction_email: You should have received the code to %{contact_info} options: email: To your email not_allowed: You are not allowed to perform this action. diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 062783f..90431d7 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -94,6 +94,7 @@ fr: welcome: Bienvenue sur la plateforme ! enter_code: 'Veuillez saisir le code :' instruction: Vous devriez avoir reçu le code à +33%{contact_info} + instruction_email: Vous devriez avoir reçu le code à %{contact_info} options: classic_connection: Se connecter en utilisant la méthode classique email: À votre e-mail