Merge branch 'from/upstream-develop/tusooa/translate-pages' into 'develop'
Translate backend-rendered pages See merge request pleroma/pleroma!3634
This commit is contained in:
commit
d7c53da77a
58 changed files with 3319 additions and 446 deletions
|
|
@ -12,6 +12,8 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
|
|||
alias Pleroma.UserInviteToken
|
||||
|
||||
def register_user(params, opts \\ []) do
|
||||
fallback_language = Gettext.get_locale()
|
||||
|
||||
params =
|
||||
params
|
||||
|> Map.take([:email, :token, :password])
|
||||
|
|
@ -21,6 +23,10 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
|
|||
|> Map.put(:password_confirmation, params[:password])
|
||||
|> Map.put(:registration_reason, params[:reason])
|
||||
|> Map.put(:birthday, params[:birthday])
|
||||
|> Map.put(
|
||||
:language,
|
||||
Pleroma.Web.Gettext.normalize_locale(params[:language]) || fallback_language
|
||||
)
|
||||
|
||||
if Pleroma.Config.get([:instance, :registrations_open]) do
|
||||
create_user(params, opts)
|
||||
|
|
|
|||
|
|
@ -5,4 +5,5 @@
|
|||
defmodule Pleroma.Web.TwitterAPI.PasswordView do
|
||||
use Pleroma.Web, :view
|
||||
import Phoenix.HTML.Form
|
||||
alias Pleroma.Web.Gettext
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
defmodule Pleroma.Web.TwitterAPI.RemoteFollowView do
|
||||
use Pleroma.Web, :view
|
||||
import Phoenix.HTML.Form
|
||||
alias Pleroma.Web.Gettext
|
||||
|
||||
defdelegate avatar_url(user), to: Pleroma.User
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilView do
|
|||
import Phoenix.HTML.Form
|
||||
alias Pleroma.Config
|
||||
alias Pleroma.Web.Endpoint
|
||||
alias Pleroma.Web.Gettext
|
||||
|
||||
def status_net_config(instance) do
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue