From 40589960bead84a691fd38230be82b6922921445 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 23 Jun 2021 16:43:35 +0100 Subject: [PATCH] Use paragraphs instead of line breaks, and avoid using html in translation strings --- app/views/confirmations/_resend_success_flash.html.erb | 3 ++- config/locales/en.yml | 4 +++- test/system/confirmation_resend.rb | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/confirmations/_resend_success_flash.html.erb b/app/views/confirmations/_resend_success_flash.html.erb index 1895de761..e9763e276 100644 --- a/app/views/confirmations/_resend_success_flash.html.erb +++ b/app/views/confirmations/_resend_success_flash.html.erb @@ -1 +1,2 @@ -<%= t "confirmations.confirm_resend.success_html", :email => email, :sender => sender %> +

<%= t ".confirmation_sent", :email => email %>

+

<%= t ".whitelist", :sender => sender %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 25464bdcf..f6272c918 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1535,7 +1535,6 @@ en: unknown token: "That confirmation code has expired or does not exist." reconfirm_html: "If you need us to resend the confirmation email, click here." confirm_resend: - success_html: "We've sent a new confirmation note to %{email} and as soon as you confirm your account you'll be able to get mapping.

If you use an antispam system which sends confirmation requests then please make sure you whitelist %{sender} as we are unable to reply to any confirmation requests." failure: "User %{name} not found." confirm_email: heading: Confirm a change of email address @@ -1544,6 +1543,9 @@ en: success: "Confirmed your change of email address!" failure: "An email address has already been confirmed with this token." unknown_token: "That confirmation code has expired or does not exist." + resend_success_flash: + confirmation_sent: We've sent a new confirmation note to %{email} and as soon as you confirm your account you'll be able to get mapping. + whitelist: If you use an antispam system which sends confirmation requests then please make sure you whitelist %{sender} as we are unable to reply to any confirmation requests. messages: inbox: title: "Inbox" diff --git a/test/system/confirmation_resend.rb b/test/system/confirmation_resend.rb index 69103e67c..6bbde09e0 100644 --- a/test/system/confirmation_resend.rb +++ b/test/system/confirmation_resend.rb @@ -21,6 +21,6 @@ class ConfirmationResendSystemTest < ApplicationSystemTestCase visit user_confirm_resend_path(@user) assert page.has_content?("sent a new confirmation") - assert_not page.has_content?("
") + assert_not page.has_content?("

") end end -- 2.39.5