Make password reset pages translatable

This commit is contained in:
Tusooa Zhu 2022-02-28 01:04:04 -05:00
commit 1edbda39e1
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
6 changed files with 61 additions and 8 deletions

View file

@ -1 +1 @@
<h2>Invalid Token</h2>
<h2><%= Gettext.dpgettext("static_pages", "password reset invalid token message", "Invalid Token") %></h2>

View file

@ -1,13 +1,13 @@
<h2>Password Reset for <%= @user.nickname %></h2>
<%= form_for @conn, Routes.reset_password_path(@conn, :do_reset), [as: "data"], fn f -> %>
<div class="form-row">
<%= label f, :password, "Password" %>
<%= label f, :password, Gettext.dpgettext("static_pages", "password reset form password prompt", "Password") %>
<%= password_input f, :password %>
</div>
<div class="form-row">
<%= label f, :password_confirmation, "Confirmation" %>
<%= label f, :password_confirmation, Gettext.dpgettext("static_pages", "password reset form confirm password prompt", "Confirmation") %>
<%= password_input f, :password_confirmation %>
</div>
<%= hidden_input f, :token, value: @token.token %>
<%= submit "Reset" %>
<%= submit Gettext.dpgettext("static_pages", "password reset button", "Reset") %>
<% end %>

View file

@ -1,2 +1,6 @@
<h2>Password reset failed</h2>
<h3><a href="<%= Pleroma.Web.Endpoint.url() %>">Homepage</a></h3>
<h2><%= Gettext.dpgettext("static_pages", "password reset failed message", "Password reset failed") %></h2>
<h3>
<a href="<%= Pleroma.Web.Endpoint.url() %>">
<%= Gettext.dpgettext("static_pages", "password reset failed homepage link", "Homepage") %>
</a>
</h3>

View file

@ -1,2 +1,2 @@
<h2>Password changed!</h2>
<h3><a href="<%= Pleroma.Web.Endpoint.url() %>">Homepage</a></h3>
<h2><%= Gettext.dpgettext("static_pages", "password reset successful message", "Password changed!") %></h2>
<h3><a href="<%= Pleroma.Web.Endpoint.url() %>"><%= Gettext.dpgettext("static_pages", "password reset successful homepage link", "Homepage") %></a></h3>

View file

@ -5,4 +5,5 @@
defmodule Pleroma.Web.TwitterAPI.PasswordView do
use Pleroma.Web, :view
import Phoenix.HTML.Form
alias Pleroma.Web.Gettext
end