]> git.openstreetmap.org Git - rails.git/commitdiff
Rework confirmations page to avoid raw html in translations
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 8 Mar 2023 15:54:35 +0000 (15:54 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 8 Mar 2023 16:09:27 +0000 (16:09 +0000)
app/views/confirmations/confirm.html.erb
config/locales/en.yml

index 7350f86287494a9e4af12fc15c4bff07f35bbd06..879fb8f337cebf45c1a4f15ff46efdd1d5c422a6 100644 (file)
@@ -27,6 +27,8 @@
     </span>
   </h1>
 
     </span>
   </h1>
 
-  <p class='text-muted'><%= t ".reconfirm_html",
-                              :reconfirm => url_for(:action => "confirm_resend") %></p>
+  <p class='text-muted'>
+    <%= t ".resend_html",
+          :reconfirm_link => link_to(t(".click_here"), url_for(:action => "confirm_resend")) %>
+  </p>
 <% end %>
 <% end %>
index 9df536c33354c6b650acc73ae6b2f8ff2e25b3da..54404e5830d1d11e3bda021c2eace53938a52dc5 100644 (file)
@@ -1636,7 +1636,8 @@ en:
       success: "Confirmed your account, thanks for signing up!"
       already active: "This account has already been confirmed."
       unknown token: "That confirmation code has expired or does not exist."
       success: "Confirmed your account, thanks for signing up!"
       already active: "This account has already been confirmed."
       unknown token: "That confirmation code has expired or does not exist."
-      reconfirm_html: "If you need us to resend the confirmation email, <a href=\"%{reconfirm}\">click here</a>."
+      resend_html: "If you need us to resend the confirmation email, %{reconfirm_link}."
+      click_here: click here
     confirm_resend:
       failure: "User %{name} not found."
     confirm_email:
     confirm_resend:
       failure: "User %{name} not found."
     confirm_email: