chore: added gettext values and renamed rauthy container
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
bdc250f2d6
commit
d7ced0d9e5
8 changed files with 267 additions and 204 deletions
|
|
@ -9,9 +9,9 @@ defmodule MvWeb.AuthController do
|
|||
|
||||
message =
|
||||
case activity do
|
||||
{:confirm_new_user, :confirm} -> "Your email address has now been confirmed"
|
||||
{:password, :reset} -> "Your password has successfully been reset"
|
||||
_ -> "You are now signed in"
|
||||
{:confirm_new_user, :confirm} -> gettext("Your email address has now been confirmed")
|
||||
{:password, :reset} -> gettext("Your password has successfully been reset")
|
||||
_ -> gettext("You are now signed in")
|
||||
end
|
||||
|
||||
conn
|
||||
|
|
@ -33,14 +33,14 @@ defmodule MvWeb.AuthController do
|
|||
caused_by: %Ash.Error.Forbidden{
|
||||
errors: [%AshAuthentication.Errors.CannotConfirmUnconfirmedUser{}]
|
||||
}
|
||||
}} ->
|
||||
}} -> gettext(
|
||||
"""
|
||||
You have already signed in another way, but have not confirmed your account.
|
||||
You can confirm your account using the link we sent to you, or by resetting your password.
|
||||
"""
|
||||
""")
|
||||
|
||||
_ ->
|
||||
"Incorrect email or password"
|
||||
gettext("Incorrect email or password")
|
||||
end
|
||||
|
||||
conn
|
||||
|
|
@ -53,7 +53,7 @@ defmodule MvWeb.AuthController do
|
|||
|
||||
conn
|
||||
|> clear_session(:mv)
|
||||
|> put_flash(:info, "You are now signed out")
|
||||
|> put_flash(:info, gettext("You are now signed out"))
|
||||
|> redirect(to: return_to)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -79,16 +79,19 @@ defmodule MvWeb.Router do
|
|||
reset_path: "/reset",
|
||||
auth_routes_prefix: "/auth",
|
||||
on_mount: [{MvWeb.LiveUserAuth, :live_no_user}],
|
||||
overrides: [MvWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default]
|
||||
overrides: [MvWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default],
|
||||
gettext_backend: {MvWeb.Gettext, "default"}
|
||||
|
||||
# Remove this if you do not want to use the reset password feature
|
||||
reset_route auth_routes_prefix: "/auth",
|
||||
overrides: [MvWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default]
|
||||
overrides: [MvWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default],
|
||||
gettext_backend: {MvWeb.Gettext, "default"}
|
||||
|
||||
# Remove this if you do not use the confirmation strategy
|
||||
confirm_route Mv.Accounts.User, :confirm_new_user,
|
||||
auth_routes_prefix: "/auth",
|
||||
overrides: [MvWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default]
|
||||
overrides: [MvWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default],
|
||||
gettext_backend: {MvWeb.Gettext, "default"}
|
||||
|
||||
# Remove this if you do not use the magic link strategy.
|
||||
# magic_sign_in_route(Mv.Accounts.User, :magic_link,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue