logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 0149ea453868b701d949a5cfee429dfd9d78bb65
parent af82f09ce39dcc36498549be00f52c530936d0cd
Author: Tusooa Zhu <tusooa@kazv.moe>
Date:   Tue,  1 Mar 2022 21:24:17 -0500

Send emails i18n'd using backend-stored user language

Diffstat:

Mlib/pleroma/emails/user_email.ex534+++++++++++++++++++++++++++++++++++++++++--------------------------------------
Mlib/pleroma/user.ex1+
Mlib/pleroma/web/gettext.ex22++++++++++++++++++++++
Mlib/pleroma/web/plugs/set_locale_plug.ex4+---
Apriv/gettext/en_test/LC_MESSAGES/default.po186+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apriv/gettext/en_test/LC_MESSAGES/errors.po557+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apriv/gettext/en_test/LC_MESSAGES/posix_errors.po153+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apriv/gettext/en_test/LC_MESSAGES/static_pages.po529+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpriv/gettext/static_pages.pot44++++++++++++++++++++++----------------------
Apriv/repo/migrations/20220302013920_add_language_to_users.exs9+++++++++
Mtest/pleroma/emails/user_email_test.exs12++++++++++++
11 files changed, 1769 insertions(+), 282 deletions(-)

diff --git a/lib/pleroma/emails/user_email.ex b/lib/pleroma/emails/user_email.ex @@ -30,68 +30,75 @@ defmodule Pleroma.Emails.UserEmail do @spec welcome(User.t(), map()) :: Swoosh.Email.t() def welcome(user, opts \\ %{}) do - new() - |> to(recipient(user)) - |> from(Map.get(opts, :sender, sender())) - |> subject( - Map.get( - opts, - :subject, - Gettext.dpgettext("static_pages", "welcome email subject", "Welcome to %{instance_name}!", - instance_name: instance_name() + Gettext.with_locale_or_default user.language do + new() + |> to(recipient(user)) + |> from(Map.get(opts, :sender, sender())) + |> subject( + Map.get( + opts, + :subject, + Gettext.dpgettext( + "static_pages", + "welcome email subject", + "Welcome to %{instance_name}!", + instance_name: instance_name() + ) ) ) - ) - |> html_body( - Map.get( - opts, - :html, - Gettext.dpgettext( - "static_pages", - "welcome email html body", - "Welcome to %{instance_name}!", - instance_name: instance_name() + |> html_body( + Map.get( + opts, + :html, + Gettext.dpgettext( + "static_pages", + "welcome email html body", + "Welcome to %{instance_name}!", + instance_name: instance_name() + ) ) ) - ) - |> text_body( - Map.get( - opts, - :text, - Gettext.dpgettext( - "static_pages", - "welcome email text body", - "Welcome to %{instance_name}!", - instance_name: instance_name() + |> text_body( + Map.get( + opts, + :text, + Gettext.dpgettext( + "static_pages", + "welcome email text body", + "Welcome to %{instance_name}!", + instance_name: instance_name() + ) ) ) - ) + end end def password_reset_email(user, token) when is_binary(token) do - password_reset_url = Router.Helpers.reset_password_url(Endpoint, :reset, token) - - html_body = - Gettext.dpgettext( - "static_pages", - "password reset email body", - """ - <h3>Reset your password at %{instance_name}</h3> - <p>Someone has requested password change for your account at %{instance_name}.</p> - <p>If it was you, visit the following link to proceed: <a href="%{password_reset_url}">reset password</a>.</p> - <p>If it was someone else, nothing to worry about: your data is secure and your password has not been changed.</p> - """, - instance_name: instance_name(), - password_reset_url: password_reset_url - ) + Gettext.with_locale_or_default user.language do + password_reset_url = Router.Helpers.reset_password_url(Endpoint, :reset, token) + + html_body = + Gettext.dpgettext( + "static_pages", + "password reset email body", + """ + <h3>Reset your password at %{instance_name}</h3> + <p>Someone has requested password change for your account at %{instance_name}.</p> + <p>If it was you, visit the following link to proceed: <a href="%{password_reset_url}">reset password</a>.</p> + <p>If it was someone else, nothing to worry about: your data is secure and your password has not been changed.</p> + """, + instance_name: instance_name(), + password_reset_url: password_reset_url + ) - new() - |> to(recipient(user)) - |> from(sender()) - |> subject( - Gettext.dpgettext("static_pages", "password reset email subject", "Password reset") - ) - |> html_body(html_body) + new() + |> to(recipient(user)) + |> from(sender()) + |> subject( + Gettext.dpgettext("static_pages", "password reset email subject", "Password reset") + ) + |> html_body(html_body) + end end def user_invitation_email( @@ -100,128 +107,136 @@ defmodule Pleroma.Emails.UserEmail do to_email, to_name \\ nil ) do - registration_url = - Router.Helpers.redirect_url( - Endpoint, - :registration_page, - user_invite_token.token - ) + Gettext.with_locale_or_default user.language do + registration_url = + Router.Helpers.redirect_url( + Endpoint, + :registration_page, + user_invite_token.token + ) - html_body = - Gettext.dpgettext( - "static_pages", - "user invitation email body", - """ - <h3>You are invited to %{instance_name}</h3> - <p>%{inviter_name} invites you to join %{instance_name}, an instance of Pleroma federated social networking platform.</p> - <p>Click the following link to register: <a href="%{registration_url}">accept invitation</a>.</p> - """, - instance_name: instance_name(), - inviter_name: user.name, - registration_url: registration_url - ) + html_body = + Gettext.dpgettext( + "static_pages", + "user invitation email body", + """ + <h3>You are invited to %{instance_name}</h3> + <p>%{inviter_name} invites you to join %{instance_name}, an instance of Pleroma federated social networking platform.</p> + <p>Click the following link to register: <a href="%{registration_url}">accept invitation</a>.</p> + """, + instance_name: instance_name(), + inviter_name: user.name, + registration_url: registration_url + ) - new() - |> to(recipient(to_email, to_name)) - |> from(sender()) - |> subject( - Gettext.dpgettext( - "static_pages", - "user invitation email subject", - "Invitation to %{instance_name}", - instance_name: instance_name() + new() + |> to(recipient(to_email, to_name)) + |> from(sender()) + |> subject( + Gettext.dpgettext( + "static_pages", + "user invitation email subject", + "Invitation to %{instance_name}", + instance_name: instance_name() + ) ) - ) - |> html_body(html_body) + |> html_body(html_body) + end end def account_confirmation_email(user) do - confirmation_url = - Router.Helpers.confirm_email_url( - Endpoint, - :confirm_email, - user.id, - to_string(user.confirmation_token) - ) + Gettext.with_locale_or_default user.language do + confirmation_url = + Router.Helpers.confirm_email_url( + Endpoint, + :confirm_email, + user.id, + to_string(user.confirmation_token) + ) - html_body = - Gettext.dpgettext( - "static_pages", - "confirmation email body", - """ - <h3>Thank you for registering on %{instance_name}</h3> - <p>Email confirmation is required to activate the account.</p> - <p>Please click the following link to <a href="%{confirmation_url}">activate your account</a>.</p> - """, - instance_name: instance_name(), - confirmation_url: confirmation_url - ) + html_body = + Gettext.dpgettext( + "static_pages", + "confirmation email body", + """ + <h3>Thank you for registering on %{instance_name}</h3> + <p>Email confirmation is required to activate the account.</p> + <p>Please click the following link to <a href="%{confirmation_url}">activate your account</a>.</p> + """, + instance_name: instance_name(), + confirmation_url: confirmation_url + ) - new() - |> to(recipient(user)) - |> from(sender()) - |> subject( - Gettext.dpgettext( - "static_pages", - "confirmation email subject", - "%{instance_name} account confirmation", - instance_name: instance_name() + new() + |> to(recipient(user)) + |> from(sender()) + |> subject( + Gettext.dpgettext( + "static_pages", + "confirmation email subject", + "%{instance_name} account confirmation", + instance_name: instance_name() + ) ) - ) - |> html_body(html_body) + |> html_body(html_body) + end end def approval_pending_email(user) do - html_body = - Gettext.dpgettext( - "static_pages", - "approval pending email body", - """ - <h3>Awaiting Approval</h3> - <p>Your account at %{instance_name} is being reviewed by staff. You will receive another email once your account is approved.</p> - """, - instance_name: instance_name() - ) + Gettext.with_locale_or_default user.language do + html_body = + Gettext.dpgettext( + "static_pages", + "approval pending email body", + """ + <h3>Awaiting Approval</h3> + <p>Your account at %{instance_name} is being reviewed by staff. You will receive another email once your account is approved.</p> + """, + instance_name: instance_name() + ) - new() - |> to(recipient(user)) - |> from(sender()) - |> subject( - Gettext.dpgettext( - "static_pages", - "approval pending email subject", - "Your account is awaiting approval" + new() + |> to(recipient(user)) + |> from(sender()) + |> subject( + Gettext.dpgettext( + "static_pages", + "approval pending email subject", + "Your account is awaiting approval" + ) ) - ) - |> html_body(html_body) + |> html_body(html_body) + end end def successful_registration_email(user) do - html_body = - Gettext.dpgettext( - "static_pages", - "successful registration email body", - """ - <h3>Hello @%{nickname},</h3> - <p>Your account at %{instance_name} has been registered successfully.</p> - <p>No further action is required to activate your account.</p> - """, - nickname: user.nickname, - instance_name: instance_name() - ) + Gettext.with_locale_or_default user.language do + html_body = + Gettext.dpgettext( + "static_pages", + "successful registration email body", + """ + <h3>Hello @%{nickname},</h3> + <p>Your account at %{instance_name} has been registered successfully.</p> + <p>No further action is required to activate your account.</p> + """, + nickname: user.nickname, + instance_name: instance_name() + ) - new() - |> to(recipient(user)) - |> from(sender()) - |> subject( - Gettext.dpgettext( - "static_pages", - "successful registration email subject", - "Account registered on %{instance_name}", - instance_name: instance_name() + new() + |> to(recipient(user)) + |> from(sender()) + |> subject( + Gettext.dpgettext( + "static_pages", + "successful registration email subject", + "Account registered on %{instance_name}", + instance_name: instance_name() + ) ) - ) - |> html_body(html_body) + |> html_body(html_body) + end end @doc """ @@ -231,76 +246,78 @@ defmodule Pleroma.Emails.UserEmail do """ @spec digest_email(User.t()) :: Swoosh.Email.t() | nil def digest_email(user) do - notifications = Pleroma.Notification.for_user_since(user, user.last_digest_emailed_at) - - mentions = - notifications - |> Enum.filter(&(&1.activity.data["type"] == "Create")) - |> Enum.map(fn notification -> - object = Pleroma.Object.normalize(notification.activity, fetch: false) - - if not is_nil(object) do - object = update_in(object.data["content"], &format_links/1) - - %{ - data: notification, - object: object, - from: User.get_by_ap_id(notification.activity.actor) - } - end - end) - |> Enum.filter(& &1) - - followers = - notifications - |> Enum.filter(&(&1.activity.data["type"] == "Follow")) - |> Enum.map(fn notification -> - from = User.get_by_ap_id(notification.activity.actor) - - if not is_nil(from) do - %{ - data: notification, - object: Pleroma.Object.normalize(notification.activity, fetch: false), - from: User.get_by_ap_id(notification.activity.actor) - } - end - end) - |> Enum.filter(& &1) - - unless Enum.empty?(mentions) do - styling = Config.get([__MODULE__, :styling]) - logo = Config.get([__MODULE__, :logo]) - - html_data = %{ - instance: instance_name(), - user: user, - mentions: mentions, - followers: followers, - unsubscribe_link: unsubscribe_url(user, "digest"), - styling: styling - } - - logo_path = - if is_nil(logo) do - Path.join(:code.priv_dir(:pleroma), "static/static/logo.svg") - else - Path.join(Config.get([:instance, :static_dir]), logo) - end - - new() - |> to(recipient(user)) - |> from(sender()) - |> subject( - Gettext.dpgettext( - "static_pages", - "digest email subject", - "Your digest from %{instance_name}", - instance_name: instance_name() + Gettext.with_locale_or_default user.language do + notifications = Pleroma.Notification.for_user_since(user, user.last_digest_emailed_at) + + mentions = + notifications + |> Enum.filter(&(&1.activity.data["type"] == "Create")) + |> Enum.map(fn notification -> + object = Pleroma.Object.normalize(notification.activity, fetch: false) + + if not is_nil(object) do + object = update_in(object.data["content"], &format_links/1) + + %{ + data: notification, + object: object, + from: User.get_by_ap_id(notification.activity.actor) + } + end + end) + |> Enum.filter(& &1) + + followers = + notifications + |> Enum.filter(&(&1.activity.data["type"] == "Follow")) + |> Enum.map(fn notification -> + from = User.get_by_ap_id(notification.activity.actor) + + if not is_nil(from) do + %{ + data: notification, + object: Pleroma.Object.normalize(notification.activity, fetch: false), + from: User.get_by_ap_id(notification.activity.actor) + } + end + end) + |> Enum.filter(& &1) + + unless Enum.empty?(mentions) do + styling = Config.get([__MODULE__, :styling]) + logo = Config.get([__MODULE__, :logo]) + + html_data = %{ + instance: instance_name(), + user: user, + mentions: mentions, + followers: followers, + unsubscribe_link: unsubscribe_url(user, "digest"), + styling: styling + } + + logo_path = + if is_nil(logo) do + Path.join(:code.priv_dir(:pleroma), "static/static/logo.svg") + else + Path.join(Config.get([:instance, :static_dir]), logo) + end + + new() + |> to(recipient(user)) + |> from(sender()) + |> subject( + Gettext.dpgettext( + "static_pages", + "digest email subject", + "Your digest from %{instance_name}", + instance_name: instance_name() + ) ) - ) - |> put_layout(false) - |> render_body("digest.html", html_data) - |> attachment(Swoosh.Attachment.new(logo_path, filename: "logo.svg", type: :inline)) + |> put_layout(false) + |> render_body("digest.html", html_data) + |> attachment(Swoosh.Attachment.new(logo_path, filename: "logo.svg", type: :inline)) + end end end @@ -330,44 +347,47 @@ defmodule Pleroma.Emails.UserEmail do def backup_is_ready_email(backup, admin_user_id \\ nil) do %{user: user} = Pleroma.Repo.preload(backup, :user) - download_url = Pleroma.Web.PleromaAPI.BackupView.download_url(backup) - html_body = - if is_nil(admin_user_id) do - Gettext.dpgettext( - "static_pages", - "account archive email body - self-requested", - """ - <p>You requested a full backup of your Pleroma account. It's ready for download:</p> - <p><a href="%{download_url}">%{download_url}</a></p> - """, - download_url: download_url - ) - else - admin = Pleroma.Repo.get(User, admin_user_id) + Gettext.with_locale_or_default user.language do + download_url = Pleroma.Web.PleromaAPI.BackupView.download_url(backup) + + html_body = + if is_nil(admin_user_id) do + Gettext.dpgettext( + "static_pages", + "account archive email body - self-requested", + """ + <p>You requested a full backup of your Pleroma account. It's ready for download:</p> + <p><a href="%{download_url}">%{download_url}</a></p> + """, + download_url: download_url + ) + else + admin = Pleroma.Repo.get(User, admin_user_id) + + Gettext.dpgettext( + "static_pages", + "account archive email body - admin requested", + """ + <p>Admin @%{admin_nickname} requested a full backup of your Pleroma account. It's ready for download:</p> + <p><a href="%{download_url}">%{download_url}</a></p> + """, + admin_nickname: admin.nickname, + download_url: download_url + ) + end + new() + |> to(recipient(user)) + |> from(sender()) + |> subject( Gettext.dpgettext( "static_pages", - "account archive email body - admin requested", - """ - <p>Admin @%{admin_nickname} requested a full backup of your Pleroma account. It's ready for download:</p> - <p><a href="%{download_url}">%{download_url}</a></p> - """, - admin_nickname: admin.nickname, - download_url: download_url + "account archive email subject", + "Your account archive is ready" ) - end - - new() - |> to(recipient(user)) - |> from(sender()) - |> subject( - Gettext.dpgettext( - "static_pages", - "account archive email subject", - "Your account archive is ready" ) - ) - |> html_body(html_body) + |> html_body(html_body) + end end end diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex @@ -156,6 +156,7 @@ defmodule Pleroma.User do field(:last_status_at, :naive_datetime) field(:birthday, :date) field(:show_birthday, :boolean, default: false) + field(:language, :string) embeds_one( :notification_settings, diff --git a/lib/pleroma/web/gettext.ex b/lib/pleroma/web/gettext.ex @@ -34,4 +34,26 @@ defmodule Pleroma.Web.Gettext do Gettext.get_locale() |> String.replace("_", "-", global: true) end + + def supports_locale?(locale) do + Pleroma.Web.Gettext + |> Gettext.known_locales() + |> Enum.member?(locale) + end + + def locale_or_default(locale) do + if supports_locale?(locale) do + locale + else + Gettext.get_locale() + end + end + + defmacro with_locale_or_default(locale, do: fun) do + quote do + Gettext.with_locale(Pleroma.Web.Gettext.locale_or_default(unquote(locale)), fn -> + unquote(fun) + end) + end + end end diff --git a/lib/pleroma/web/plugs/set_locale_plug.ex b/lib/pleroma/web/plugs/set_locale_plug.ex @@ -64,9 +64,7 @@ defmodule Pleroma.Web.Plugs.SetLocalePlug do end defp supported_locale?(locale) do - Pleroma.Web.Gettext - |> Gettext.known_locales() - |> Enum.member?(locale) + Pleroma.Web.Gettext.supports_locale?(locale) end defp parse_language_option(string) do diff --git a/priv/gettext/en_test/LC_MESSAGES/default.po b/priv/gettext/en_test/LC_MESSAGES/default.po @@ -0,0 +1,186 @@ +## "msgid"s in this file come from POT (.pot) files. +## +## Do not add, change, or remove "msgid"s manually here as +## they're tied to the ones in the corresponding POT file +## (with the same domain). +## +## Use "mix gettext.extract --merge" or "mix gettext.merge" +## to merge POT files into PO files. +msgid "" +msgstr "" +"Language: en_test\n" +"Plural-Forms: nplurals=2\n" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:122 +msgid "%{name} - %{count} is not a multiple of %{multiple}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:131 +msgid "%{name} - %{value} is larger than exclusive maximum %{max}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:140 +msgid "%{name} - %{value} is larger than inclusive maximum %{max}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:149 +msgid "%{name} - %{value} is smaller than exclusive minimum %{min}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:158 +msgid "%{name} - %{value} is smaller than inclusive minimum %{min}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:102 +msgid "%{name} - Array items must be unique." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:114 +msgid "%{name} - Array length %{length} is larger than maxItems: %{}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:106 +msgid "%{name} - Array length %{length} is smaller than minItems: %{min}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:166 +msgid "%{name} - Invalid %{type}. Got: %{value}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:174 +msgid "%{name} - Invalid format. Expected %{format}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:51 +msgid "%{name} - Invalid schema.type. Got: %{type}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:178 +msgid "%{name} - Invalid value for enum." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:95 +msgid "%{name} - String length is larger than maxLength: %{length}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:88 +msgid "%{name} - String length is smaller than minLength: %{length}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:63 +msgid "%{name} - null value where %{type} expected." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:60 +msgid "%{name} - null value." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:182 +msgid "Failed to cast to any schema in %{polymorphic_type}" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:71 +msgid "Failed to cast value as %{invalid_schema}. Value must be castable using `allOf` schemas listed." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:84 +msgid "Failed to cast value to one of: %{failed_schemas}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:78 +msgid "Failed to cast value using any of: %{failed_schemas}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:212 +msgid "Invalid value for header: %{name}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:204 +msgid "Missing field: %{name}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:208 +msgid "Missing header: %{name}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:196 +msgid "No value provided for required discriminator `%{field}`." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:216 +msgid "Object property count %{property_count} is greater than maxProperties: %{max_properties}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:224 +msgid "Object property count %{property_count} is less than minProperties: %{min_properties}" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/static_fe/static_fe/error.html.eex:2 +msgid "Oops" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:188 +msgid "Unexpected field: %{name}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:200 +msgid "Unknown schema: %{name}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/api_spec/render_error.ex:192 +msgid "Value used as discriminator for `%{field}` matches no schemas." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/embed/show.html.eex:43 +#: lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex:37 +msgid "announces" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/embed/show.html.eex:44 +#: lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex:38 +msgid "likes" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/embed/show.html.eex:42 +#: lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex:36 +msgid "replies" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/embed/show.html.eex:27 +#: lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex:22 +msgid "sensitive media" +msgstr "" diff --git a/priv/gettext/en_test/LC_MESSAGES/errors.po b/priv/gettext/en_test/LC_MESSAGES/errors.po @@ -0,0 +1,557 @@ +## "msgid"s in this file come from POT (.pot) files. +## +## Do not add, change, or remove "msgid"s manually here as +## they're tied to the ones in the corresponding POT file +## (with the same domain). +## +## Use "mix gettext.extract --merge" or "mix gettext.merge" +## to merge POT files into PO files. +msgid "" +msgstr "" +"Language: en_test\n" +"Plural-Forms: nplurals=2\n" + +msgid "can't be blank" +msgstr "" + +msgid "has already been taken" +msgstr "" + +msgid "is invalid" +msgstr "" + +msgid "has invalid format" +msgstr "" + +msgid "has an invalid entry" +msgstr "" + +msgid "is reserved" +msgstr "" + +msgid "does not match confirmation" +msgstr "" + +msgid "is still associated with this entry" +msgstr "" + +msgid "are still associated with this entry" +msgstr "" + +msgid "should be %{count} character(s)" +msgid_plural "should be %{count} character(s)" +msgstr[0] "" +msgstr[1] "" + +msgid "should have %{count} item(s)" +msgid_plural "should have %{count} item(s)" +msgstr[0] "" +msgstr[1] "" + +msgid "should be at least %{count} character(s)" +msgid_plural "should be at least %{count} character(s)" +msgstr[0] "" +msgstr[1] "" + +msgid "should have at least %{count} item(s)" +msgid_plural "should have at least %{count} item(s)" +msgstr[0] "" +msgstr[1] "" + +msgid "should be at most %{count} character(s)" +msgid_plural "should be at most %{count} character(s)" +msgstr[0] "" +msgstr[1] "" + +msgid "should have at most %{count} item(s)" +msgid_plural "should have at most %{count} item(s)" +msgstr[0] "" +msgstr[1] "" + +msgid "must be less than %{number}" +msgstr "" + +msgid "must be greater than %{number}" +msgstr "" + +msgid "must be less than or equal to %{number}" +msgstr "" + +msgid "must be greater than or equal to %{number}" +msgstr "" + +msgid "must be equal to %{number}" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:523 +msgid "Account not found" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:316 +msgid "Already voted" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:402 +msgid "Bad request" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/controller_helper.ex:97 +#: lib/pleroma/web/controller_helper.ex:103 +msgid "Can't display this activity" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:324 +msgid "Can't find user" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:80 +msgid "Can't get favorites" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api/utils.ex:482 +msgid "Cannot post an empty status without attachments" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api/utils.ex:441 +msgid "Comment must be up to %{max_size} characters" +msgstr "" + +#, elixir-format +#: lib/pleroma/config_db.ex:200 +msgid "Config with params %{params} not found" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:167 lib/pleroma/web/common_api.ex:171 +msgid "Could not delete" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:217 +msgid "Could not favorite" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:254 +msgid "Could not unfavorite" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:202 +msgid "Could not unrepeat" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:530 lib/pleroma/web/common_api.ex:539 +msgid "Could not update state" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:205 +msgid "Error." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/twitter_api/twitter_api.ex:99 +msgid "Invalid CAPTCHA" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:144 +#: lib/pleroma/web/o_auth/o_auth_controller.ex:631 +msgid "Invalid credentials" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/plugs/ensure_authenticated_plug.ex:42 +msgid "Invalid credentials." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:337 +msgid "Invalid indices" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:29 +msgid "Invalid parameters" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api/utils.ex:349 +msgid "Invalid password." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:254 +msgid "Invalid request" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/twitter_api/twitter_api.ex:102 +msgid "Kocaptcha service unavailable" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:140 +msgid "Missing parameters" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api/utils.ex:477 +msgid "No such conversation" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:171 +#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:197 lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:239 +msgid "No such permission_group" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:504 +#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:11 lib/pleroma/web/feed/tag_controller.ex:16 +#: lib/pleroma/web/feed/user_controller.ex:69 lib/pleroma/web/o_status/o_status_controller.ex:132 +#: lib/pleroma/web/plugs/uploaded_media.ex:84 +msgid "Not found" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:308 +msgid "Poll's author can't vote" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:20 +#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:39 lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:51 +#: lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:52 lib/pleroma/web/mastodon_api/controllers/status_controller.ex:326 +#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:71 +msgid "Record not found" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:35 +#: lib/pleroma/web/feed/user_controller.ex:78 lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:42 +#: lib/pleroma/web/o_status/o_status_controller.ex:138 +msgid "Something went wrong" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api/activity_draft.ex:143 +msgid "The message visibility must be direct" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api/utils.ex:492 +msgid "The status is over the character limit" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/plugs/ensure_public_or_authenticated_plug.ex:36 +msgid "This resource requires authentication." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/plugs/rate_limiter.ex:208 +msgid "Throttled" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:338 +msgid "Too many choices" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:268 +msgid "You can't revoke your own admin status." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:243 +#: lib/pleroma/web/o_auth/o_auth_controller.ex:333 +msgid "Your account is currently disabled" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:205 +#: lib/pleroma/web/o_auth/o_auth_controller.ex:356 +msgid "Your login is missing a confirmed e-mail address" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:392 +msgid "can't read inbox of %{nickname} as %{as_nickname}" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:491 +msgid "can't update outbox of %{nickname} as %{as_nickname}" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:475 +msgid "conversation is already muted" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:510 +msgid "error" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:34 +msgid "mascots can only be images" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:63 +msgid "not found" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:437 +msgid "Bad OAuth request." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/twitter_api/twitter_api.ex:108 +msgid "CAPTCHA already used" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/twitter_api/twitter_api.ex:105 +msgid "CAPTCHA expired" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/plugs/uploaded_media.ex:57 +msgid "Failed" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:453 +msgid "Failed to authenticate: %{message}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:484 +msgid "Failed to set up user account." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/plugs/o_auth_scopes_plug.ex:37 +msgid "Insufficient permissions: %{permissions}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/plugs/uploaded_media.ex:111 +msgid "Internal Error" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/fallback_controller.ex:22 +#: lib/pleroma/web/o_auth/fallback_controller.ex:29 +msgid "Invalid Username/Password" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/twitter_api/twitter_api.ex:111 +msgid "Invalid answer data" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:33 +msgid "Nodeinfo schema version not handled" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:194 +msgid "This action is outside the authorized scopes" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/fallback_controller.ex:14 +msgid "Unknown error, please check the details and try again." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:136 +#: lib/pleroma/web/o_auth/o_auth_controller.ex:180 +msgid "Unlisted redirect_uri." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:433 +msgid "Unsupported OAuth provider: %{provider}." +msgstr "" + +#, elixir-format +#: lib/pleroma/uploaders/uploader.ex:74 +msgid "Uploader callback timeout" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/uploader_controller.ex:23 +msgid "bad request" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/twitter_api/twitter_api.ex:96 +msgid "CAPTCHA Error" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:266 +msgid "Could not add reaction emoji" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api.ex:277 +msgid "Could not remove reaction emoji" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/twitter_api/twitter_api.ex:122 +msgid "Invalid CAPTCHA (Missing parameter: %{name})" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/list_controller.ex:96 +msgid "List not found" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:151 +msgid "Missing parameter: %{name}" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:232 +#: lib/pleroma/web/o_auth/o_auth_controller.ex:346 +msgid "Password reset is required" +msgstr "" + +#, elixir-format +#: lib/pleroma/tests/auth_test_controller.ex:9 +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:6 lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:6 +#: lib/pleroma/web/admin_api/controllers/chat_controller.ex:6 lib/pleroma/web/admin_api/controllers/config_controller.ex:6 +#: lib/pleroma/web/admin_api/controllers/fallback_controller.ex:6 lib/pleroma/web/admin_api/controllers/frontend_controller.ex:6 +#: lib/pleroma/web/admin_api/controllers/instance_controller.ex:6 lib/pleroma/web/admin_api/controllers/instance_document_controller.ex:6 +#: lib/pleroma/web/admin_api/controllers/invite_controller.ex:6 lib/pleroma/web/admin_api/controllers/media_proxy_cache_controller.ex:6 +#: lib/pleroma/web/admin_api/controllers/o_auth_app_controller.ex:6 lib/pleroma/web/admin_api/controllers/relay_controller.ex:6 +#: lib/pleroma/web/admin_api/controllers/report_controller.ex:6 lib/pleroma/web/admin_api/controllers/status_controller.ex:6 +#: lib/pleroma/web/admin_api/controllers/user_controller.ex:6 lib/pleroma/web/controller_helper.ex:6 lib/pleroma/web/embed_controller.ex:6 +#: lib/pleroma/web/fallback/redirect_controller.ex:6 lib/pleroma/web/feed/tag_controller.ex:6 +#: lib/pleroma/web/feed/user_controller.ex:6 lib/pleroma/web/mailer/subscription_controller.ex:6 +#: lib/pleroma/web/manifest_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/account_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/app_controller.ex:11 lib/pleroma/web/mastodon_api/controllers/auth_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/conversation_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/custom_emoji_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/directory_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/domain_block_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/filter_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/follow_request_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/instance_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/list_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/marker_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex:14 lib/pleroma/web/mastodon_api/controllers/media_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/notification_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/poll_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/report_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/scheduled_activity_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/search_controller.ex:6 lib/pleroma/web/mastodon_api/controllers/status_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:7 lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex:6 +#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:6 lib/pleroma/web/media_proxy/media_proxy_controller.ex:6 +#: lib/pleroma/web/mongoose_im/mongoose_im_controller.ex:6 lib/pleroma/web/nodeinfo/nodeinfo_controller.ex:6 +#: lib/pleroma/web/o_auth/fallback_controller.ex:6 lib/pleroma/web/o_auth/mfa_controller.ex:10 +#: lib/pleroma/web/o_auth/o_auth_controller.ex:6 lib/pleroma/web/o_status/o_status_controller.ex:6 +#: lib/pleroma/web/pleroma_api/controllers/account_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/app_controller.ex:6 +#: lib/pleroma/web/pleroma_api/controllers/backup_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/chat_controller.ex:5 +#: lib/pleroma/web/pleroma_api/controllers/conversation_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/emoji_file_controller.ex:6 +#: lib/pleroma/web/pleroma_api/controllers/emoji_pack_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/emoji_reaction_controller.ex:6 +#: lib/pleroma/web/pleroma_api/controllers/instances_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/mascot_controller.ex:6 +#: lib/pleroma/web/pleroma_api/controllers/notification_controller.ex:6 lib/pleroma/web/pleroma_api/controllers/report_controller.ex:6 +#: lib/pleroma/web/pleroma_api/controllers/scrobble_controller.ex:6 +#: lib/pleroma/web/pleroma_api/controllers/two_factor_authentication_controller.ex:7 lib/pleroma/web/pleroma_api/controllers/user_import_controller.ex:6 +#: lib/pleroma/web/static_fe/static_fe_controller.ex:6 lib/pleroma/web/twitter_api/controller.ex:6 +#: lib/pleroma/web/twitter_api/controllers/password_controller.ex:10 lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex:6 +#: lib/pleroma/web/twitter_api/controllers/util_controller.ex:6 lib/pleroma/web/uploader_controller.ex:6 +#: lib/pleroma/web/web_finger/web_finger_controller.ex:6 +msgid "Security violation: OAuth scopes check was neither handled nor explicitly skipped." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/plugs/ensure_authenticated_plug.ex:32 +msgid "Two-factor authentication enabled, you must use a access token." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/subscription_controller.ex:61 +msgid "Web push subscription is disabled on this Pleroma instance" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/admin_api/controllers/admin_api_controller.ex:234 +msgid "You can't revoke your own admin/moderator status." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex:129 +msgid "authorization required for timeline view" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/fallback_controller.ex:24 +msgid "Access denied" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/mastodon_api/controllers/account_controller.ex:321 +msgid "This API requires an authenticated user" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/plugs/ensure_staff_privileged_plug.ex:26 +#: lib/pleroma/web/plugs/user_is_admin_plug.ex:21 +msgid "User is not an admin." +msgstr "" + +#, elixir-format +#: lib/pleroma/user/backup.ex:75 +msgid "Last export was less than a day ago" +msgid_plural "Last export was less than %{days} days ago" +msgstr[0] "" +msgstr[1] "" + +#, elixir-format +#: lib/pleroma/user/backup.ex:93 +msgid "Backups require enabled email" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/activity_pub/activity_pub_controller.ex:423 +msgid "Character limit (%{limit} characters) exceeded, contains %{length} characters" +msgstr "" + +#, elixir-format +#: lib/pleroma/user/backup.ex:98 +msgid "Email is required" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/common_api/utils.ex:507 +msgid "Too many attachments" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/plugs/ensure_staff_privileged_plug.ex:33 +#: lib/pleroma/web/plugs/user_is_staff_plug.ex:20 +msgid "User is not a staff member." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/o_auth/o_auth_controller.ex:366 +msgid "Your account is awaiting approval." +msgstr "" diff --git a/priv/gettext/en_test/LC_MESSAGES/posix_errors.po b/priv/gettext/en_test/LC_MESSAGES/posix_errors.po @@ -0,0 +1,153 @@ +## "msgid"s in this file come from POT (.pot) files. +## +## Do not add, change, or remove "msgid"s manually here as +## they're tied to the ones in the corresponding POT file +## (with the same domain). +## +## Use "mix gettext.extract --merge" or "mix gettext.merge" +## to merge POT files into PO files. +msgid "" +msgstr "" +"Language: en_test\n" +"Plural-Forms: nplurals=2\n" + +msgid "eperm" +msgstr "" + +msgid "eacces" +msgstr "" + +msgid "eagain" +msgstr "" + +msgid "ebadf" +msgstr "" + +msgid "ebadmsg" +msgstr "" + +msgid "ebusy" +msgstr "" + +msgid "edeadlk" +msgstr "" + +msgid "edeadlock" +msgstr "" + +msgid "edquot" +msgstr "" + +msgid "eexist" +msgstr "" + +msgid "efault" +msgstr "" + +msgid "efbig" +msgstr "" + +msgid "eftype" +msgstr "" + +msgid "eintr" +msgstr "" + +msgid "einval" +msgstr "" + +msgid "eio" +msgstr "" + +msgid "eisdir" +msgstr "" + +msgid "eloop" +msgstr "" + +msgid "emfile" +msgstr "" + +msgid "emlink" +msgstr "" + +msgid "emultihop" +msgstr "" + +msgid "enametoolong" +msgstr "" + +msgid "enfile" +msgstr "" + +msgid "enobufs" +msgstr "" + +msgid "enodev" +msgstr "" + +msgid "enolck" +msgstr "" + +msgid "enolink" +msgstr "" + +msgid "enoent" +msgstr "" + +msgid "enomem" +msgstr "" + +msgid "enospc" +msgstr "" + +msgid "enosr" +msgstr "" + +msgid "enostr" +msgstr "" + +msgid "enosys" +msgstr "" + +msgid "enotblk" +msgstr "" + +msgid "enotdir" +msgstr "" + +msgid "enotsup" +msgstr "" + +msgid "enxio" +msgstr "" + +msgid "eopnotsupp" +msgstr "" + +msgid "eoverflow" +msgstr "" + +msgid "epipe" +msgstr "" + +msgid "erange" +msgstr "" + +msgid "erofs" +msgstr "" + +msgid "espipe" +msgstr "" + +msgid "esrch" +msgstr "" + +msgid "estale" +msgstr "" + +msgid "etxtbsy" +msgstr "" + +msgid "exdev" +msgstr "" diff --git a/priv/gettext/en_test/LC_MESSAGES/static_pages.po b/priv/gettext/en_test/LC_MESSAGES/static_pages.po @@ -0,0 +1,529 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2022-03-01 21:15-0500\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#~ ## "msgid"s in this file come from POT (.pot) files. +#~ ## +#~ ## Do not add, change, or remove "msgid"s manually here as +#~ ## they're tied to the ones in the corresponding POT file +#~ ## (with the same domain). +#~ ## +#~ ## Use "mix gettext.extract --merge" or "mix gettext.merge" +#~ ## to merge POT files into PO files. +#~ msgid "" +#~ msgstr "" +#~ "Language: en_test\n" +#~ "Plural-Forms: nplurals=2\n" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/follow.html.eex:9 +msgctxt "remote follow authorization button" +msgid "Authorize" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/follow.html.eex:2 +msgctxt "remote follow error" +msgid "Error fetching user" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/follow.html.eex:4 +msgctxt "remote follow header" +msgid "Remote follow" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_mfa.html.eex:8 +msgctxt "placeholder text for auth code entry" +msgid "Authentication code" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex:10 +msgctxt "placeholder text for password entry" +msgid "Password" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex:8 +msgctxt "placeholder text for username entry" +msgid "Username" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex:13 +msgctxt "remote follow authorization button for login" +msgid "Authorize" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_mfa.html.eex:12 +msgctxt "remote follow authorization button for mfa" +msgid "Authorize" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/followed.html.eex:2 +msgctxt "remote follow error" +msgid "Error following account" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_login.html.eex:4 +msgctxt "remote follow header, need login" +msgid "Log in to follow" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/follow_mfa.html.eex:4 +msgctxt "remote follow mfa header" +msgid "Two-factor authentication" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/remote_follow/followed.html.eex:4 +msgctxt "remote follow success" +msgid "Account followed!" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex:7 +msgctxt "placeholder text for account id" +msgid "Your account ID, e.g. lain@quitter.se" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex:8 +msgctxt "remote follow authorization button for following with a remote account" +msgid "Follow" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex:2 +msgctxt "remote follow error" +msgid "Error: %{error}" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/util/subscribe.html.eex:4 +msgctxt "remote follow header" +msgid "Remotely follow %{nickname}" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/password/reset.html.eex:12 +msgctxt "password reset button" +msgid "Reset" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/password/reset_failed.html.eex:4 +msgctxt "password reset failed homepage link" +msgid "Homepage" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/password/reset_failed.html.eex:1 +msgctxt "password reset failed message" +msgid "Password reset failed" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/password/reset.html.eex:8 +msgctxt "password reset form confirm password prompt" +msgid "Confirmation" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/password/reset.html.eex:4 +msgctxt "password reset form password prompt" +msgid "Password" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/password/invalid_token.html.eex:1 +msgctxt "password reset invalid token message" +msgid "Invalid Token" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/password/reset_success.html.eex:2 +msgctxt "password reset successful homepage link" +msgid "Homepage" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/twitter_api/password/reset_success.html.eex:1 +msgctxt "password reset successful message" +msgid "Password changed!" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/feed/feed/tag.atom.eex:15 +#: lib/pleroma/web/templates/feed/feed/tag.rss.eex:7 +msgctxt "tag feed description" +msgid "These are public toots tagged with #%{tag}. You can interact with them if you have an account anywhere in the fediverse." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/oob_token_exists.html.eex:1 +msgctxt "oauth authorization exists page title" +msgid "Authorization exists" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:32 +msgctxt "oauth authorize approve button" +msgid "Approve" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:30 +msgctxt "oauth authorize cancel button" +msgid "Cancel" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:23 +msgctxt "oauth authorize message" +msgid "Application <strong>%{client_name}</strong> is requesting access to your account." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/oob_authorization_created.html.eex:1 +msgctxt "oauth authorized page title" +msgid "Successfully authorized" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex:1 +msgctxt "oauth external provider page title" +msgid "Sign in with external provider" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex:13 +msgctxt "oauth external provider sign in button" +msgid "Sign in with %{strategy}" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:54 +msgctxt "oauth login button" +msgid "Log In" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:51 +msgctxt "oauth login password prompt" +msgid "Password" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:47 +msgctxt "oauth login username prompt" +msgid "Username" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:39 +msgctxt "oauth register nickname prompt" +msgid "Pleroma Handle" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:37 +msgctxt "oauth register nickname unchangeable warning" +msgid "Choose carefully! You won't be able to change this later. You will be able to change your display name, though." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:18 +msgctxt "oauth register page email prompt" +msgid "Email" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:10 +msgctxt "oauth register page fill form prompt" +msgid "If you'd like to register a new account, please provide the details below." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:35 +msgctxt "oauth register page login button" +msgid "Proceed as existing user" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:31 +msgctxt "oauth register page login password prompt" +msgid "Password" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:24 +msgctxt "oauth register page login prompt" +msgid "Alternatively, sign in to connect to existing account." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:27 +msgctxt "oauth register page login username prompt" +msgid "Name or email" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:14 +msgctxt "oauth register page nickname prompt" +msgid "Nickname" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:22 +msgctxt "oauth register page register button" +msgid "Proceed as new user" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/register.html.eex:8 +msgctxt "oauth register page title" +msgid "Registration Details" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/show.html.eex:36 +msgctxt "oauth register page title" +msgid "This is the first time you visit! Please enter your Pleroma handle." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/_scopes.html.eex:2 +msgctxt "oauth scopes message" +msgid "The following permissions will be granted" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/o_auth/oob_authorization_created.html.eex:2 +#: lib/pleroma/web/templates/o_auth/o_auth/oob_token_exists.html.eex:2 +msgctxt "oauth token code message" +msgid "Token code is <br>%{token}" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/mfa/totp.html.eex:12 +msgctxt "mfa auth code prompt" +msgid "Authentication code" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/mfa/totp.html.eex:8 +msgctxt "mfa auth page title" +msgid "Two-factor authentication" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/mfa/totp.html.eex:23 +msgctxt "mfa auth page use recovery code link" +msgid "Enter a two-factor recovery code" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/mfa/totp.html.eex:20 +msgctxt "mfa auth verify code button" +msgid "Verify" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/mfa/recovery.html.eex:8 +msgctxt "mfa recover page title" +msgid "Two-factor recovery" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/mfa/recovery.html.eex:12 +msgctxt "mfa recover recovery code prompt" +msgid "Recovery code" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/mfa/recovery.html.eex:23 +msgctxt "mfa recover use 2fa code link" +msgid "Enter a two-factor code" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/o_auth/mfa/recovery.html.eex:20 +msgctxt "mfa recover verify recovery code button" +msgid "Verify" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/static_fe/static_fe/profile.html.eex:8 +msgctxt "static fe profile page remote follow button" +msgid "Remote follow" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/email/digest.html.eex:163 +msgctxt "digest email header line" +msgid "Hey %{nickname}, here is what you've missed!" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/email/digest.html.eex:544 +msgctxt "digest email receiver address" +msgid "The email address you are subscribed as is <a href='mailto:%{@user.email}' style='color: %{color};text-decoration: none;'>%{email}</a>. " +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/email/digest.html.eex:538 +msgctxt "digest email sending reason" +msgid "You have received this email because you have signed up to receive digest emails from <b>%{instance}</b> Pleroma instance." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/email/digest.html.eex:547 +msgctxt "digest email unsubscribe action" +msgid "To unsubscribe, please go %{here}." +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/email/digest.html.eex:547 +msgctxt "digest email unsubscribe action link text" +msgid "here" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/mailer/subscription/unsubscribe_failure.html.eex:1 +msgctxt "mailer unsubscribe failed message" +msgid "UNSUBSCRIBE FAILURE" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/mailer/subscription/unsubscribe_success.html.eex:1 +msgctxt "mailer unsubscribe successful message" +msgid "UNSUBSCRIBE SUCCESSFUL" +msgstr "" + +#, elixir-format +#: lib/pleroma/web/templates/email/digest.html.eex:385 +msgctxt "new followers count header" +msgid "%{count} New Follower" +msgid_plural "%{count} New Followers" +msgstr[0] "" +msgstr[1] "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:356 +msgctxt "account archive email body - self-requested" +msgid "<p>You requested a full backup of your Pleroma account. It's ready for download:</p>\n<p><a href=\"%{download_url}\">%{download_url}</a></p>\n" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:384 +msgctxt "account archive email subject" +msgid "Your account archive is ready" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:188 +msgctxt "approval pending email body" +msgid "<h3>Awaiting Approval</h3>\n<p>Your account at %{instance_name} is being reviewed by staff. You will receive another email once your account is approved.</p>\n" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:202 +msgctxt "approval pending email subject" +msgid "Your account is awaiting approval" +msgstr "xxYour account is awaiting approvalxx" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:158 +msgctxt "confirmation email body" +msgid "<h3>Thank you for registering on %{instance_name}</h3>\n<p>Email confirmation is required to activate the account.</p>\n<p>Please click the following link to <a href=\"%{confirmation_url}\">activate your account</a>.</p>\n" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:174 +msgctxt "confirmation email subject" +msgid "%{instance_name} account confirmation" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:310 +msgctxt "digest email subject" +msgid "Your digest from %{instance_name}" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:81 +msgctxt "password reset email body" +msgid "<h3>Reset your password at %{instance_name}</h3>\n<p>Someone has requested password change for your account at %{instance_name}.</p>\n<p>If it was you, visit the following link to proceed: <a href=\"%{password_reset_url}\">reset password</a>.</p>\n<p>If it was someone else, nothing to worry about: your data is secure and your password has not been changed.</p>\n" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:98 +msgctxt "password reset email subject" +msgid "Password reset" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:215 +msgctxt "successful registration email body" +msgid "<h3>Hello @%{nickname},</h3>\n<p>Your account at %{instance_name} has been registered successfully.</p>\n<p>No further action is required to activate your account.</p>\n" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:231 +msgctxt "successful registration email subject" +msgid "Account registered on %{instance_name}" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:119 +msgctxt "user invitation email body" +msgid "<h3>You are invited to %{instance_name}</h3>\n<p>%{inviter_name} invites you to join %{instance_name}, an instance of Pleroma federated social networking platform.</p>\n<p>Click the following link to register: <a href=\"%{registration_url}\">accept invitation</a>.</p>\n" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:136 +msgctxt "user invitation email subject" +msgid "Invitation to %{instance_name}" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:53 +msgctxt "welcome email html body" +msgid "Welcome to %{instance_name}!" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:41 +msgctxt "welcome email subject" +msgid "Welcome to %{instance_name}!" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:65 +msgctxt "welcome email text body" +msgid "Welcome to %{instance_name}!" +msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:368 +msgctxt "account archive email body - admin requested" +msgid "<p>Admin @%{admin_nickname} requested a full backup of your Pleroma account. It's ready for download:</p>\n<p><a href=\"%{download_url}\">%{download_url}</a></p>\n" +msgstr "" diff --git a/priv/gettext/static_pages.pot b/priv/gettext/static_pages.pot @@ -411,103 +411,103 @@ msgstr[0] "" msgstr[1] "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:349 -msgctxt "account archive email body - admin requested" -msgid "<p>Admin @%{admin.nickname} requested a full backup of your Pleroma account. It's ready for download:</p>\n<p><a href=\"%{download_url}\">%{download_url}</a></p>\n" -msgstr "" - -#, elixir-format -#: lib/pleroma/emails/user_email.ex:337 +#: lib/pleroma/emails/user_email.ex:356 msgctxt "account archive email body - self-requested" msgid "<p>You requested a full backup of your Pleroma account. It's ready for download:</p>\n<p><a href=\"%{download_url}\">%{download_url}</a></p>\n" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:365 +#: lib/pleroma/emails/user_email.ex:384 msgctxt "account archive email subject" msgid "Your account archive is ready" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:176 +#: lib/pleroma/emails/user_email.ex:188 msgctxt "approval pending email body" msgid "<h3>Awaiting Approval</h3>\n<p>Your account at %{instance_name} is being reviewed by staff. You will receive another email once your account is approved.</p>\n" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:190 +#: lib/pleroma/emails/user_email.ex:202 msgctxt "approval pending email subject" msgid "Your account is awaiting approval" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:148 +#: lib/pleroma/emails/user_email.ex:158 msgctxt "confirmation email body" msgid "<h3>Thank you for registering on %{instance_name}</h3>\n<p>Email confirmation is required to activate the account.</p>\n<p>Please click the following link to <a href=\"%{confirmation_url}\">activate your account</a>.</p>\n" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:164 +#: lib/pleroma/emails/user_email.ex:174 msgctxt "confirmation email subject" msgid "%{instance_name} account confirmation" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:294 +#: lib/pleroma/emails/user_email.ex:310 msgctxt "digest email subject" msgid "Your digest from %{instance_name}" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:75 +#: lib/pleroma/emails/user_email.ex:81 msgctxt "password reset email body" msgid "<h3>Reset your password at %{instance_name}</h3>\n<p>Someone has requested password change for your account at %{instance_name}.</p>\n<p>If it was you, visit the following link to proceed: <a href=\"%{password_reset_url}\">reset password</a>.</p>\n<p>If it was someone else, nothing to worry about: your data is secure and your password has not been changed.</p>\n" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:92 +#: lib/pleroma/emails/user_email.ex:98 msgctxt "password reset email subject" msgid "Password reset" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:201 +#: lib/pleroma/emails/user_email.ex:215 msgctxt "successful registration email body" msgid "<h3>Hello @%{nickname},</h3>\n<p>Your account at %{instance_name} has been registered successfully.</p>\n<p>No further action is required to activate your account.</p>\n" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:217 +#: lib/pleroma/emails/user_email.ex:231 msgctxt "successful registration email subject" msgid "Account registered on %{instance_name}" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:111 +#: lib/pleroma/emails/user_email.ex:119 msgctxt "user invitation email body" msgid "<h3>You are invited to %{instance_name}</h3>\n<p>%{inviter_name} invites you to join %{instance_name}, an instance of Pleroma federated social networking platform.</p>\n<p>Click the following link to register: <a href=\"%{registration_url}\">accept invitation</a>.</p>\n" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:128 +#: lib/pleroma/emails/user_email.ex:136 msgctxt "user invitation email subject" msgid "Invitation to %{instance_name}" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:49 +#: lib/pleroma/emails/user_email.ex:53 msgctxt "welcome email html body" msgid "Welcome to %{instance_name}!" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:40 +#: lib/pleroma/emails/user_email.ex:41 msgctxt "welcome email subject" msgid "Welcome to %{instance_name}!" msgstr "" #, elixir-format -#: lib/pleroma/emails/user_email.ex:61 +#: lib/pleroma/emails/user_email.ex:65 msgctxt "welcome email text body" msgid "Welcome to %{instance_name}!" msgstr "" + +#, elixir-format +#: lib/pleroma/emails/user_email.ex:368 +msgctxt "account archive email body - admin requested" +msgid "<p>Admin @%{admin_nickname} requested a full backup of your Pleroma account. It's ready for download:</p>\n<p><a href=\"%{download_url}\">%{download_url}</a></p>\n" +msgstr "" diff --git a/priv/repo/migrations/20220302013920_add_language_to_users.exs b/priv/repo/migrations/20220302013920_add_language_to_users.exs @@ -0,0 +1,9 @@ +defmodule Pleroma.Repo.Migrations.AddLanguageToUsers do + use Ecto.Migration + + def change do + alter table(:users) do + add_if_not_exists(:language, :string) + end + end +end diff --git a/test/pleroma/emails/user_email_test.exs b/test/pleroma/emails/user_email_test.exs @@ -56,4 +56,16 @@ defmodule Pleroma.Emails.UserEmailTest do assert email.subject == "Your account is awaiting approval" assert email.html_body =~ "Awaiting Approval" end + + test "email i18n" do + user = insert(:user, language: "en_test") + email = UserEmail.approval_pending_email(user) + assert email.subject == "xxYour account is awaiting approvalxx" + end + + test "email i18n should fallback to default locale if user language is unsupported" do + user = insert(:user, language: "unsupported") + email = UserEmail.approval_pending_email(user) + assert email.subject == "Your account is awaiting approval" + end end