Skip to content

Commit

Permalink
Rework confirmations page to avoid raw html in translations
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitystorm committed Mar 8, 2023
1 parent 2771921 commit 59ed461
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions app/views/confirmations/confirm.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
</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 %>
3 changes: 2 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
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:
Expand Down

0 comments on commit 59ed461

Please sign in to comment.