All 'Mastodon' references in emails (except unlock_instructions) changed to instance title

unlock_instructions doesn't seem to exist elsewhere in the project so I've left it as is.
This commit is contained in:
Emma Winston 2019-09-16 21:02:08 +01:00
parent 5406acd04b
commit e7d13cd08a
3 changed files with 12 additions and 12 deletions

View File

@ -17,7 +17,7 @@ class UserMailer < Devise::Mailer
I18n.with_locale(@resource.locale || I18n.default_locale) do I18n.with_locale(@resource.locale || I18n.default_locale) do
mail to: @resource.unconfirmed_email.presence || @resource.email, mail to: @resource.unconfirmed_email.presence || @resource.email,
subject: I18n.t(@resource.pending_reconfirmation? ? 'devise.mailer.reconfirmation_instructions.subject' : 'devise.mailer.confirmation_instructions.subject', instance: @instance), subject: I18n.t(@resource.pending_reconfirmation? ? 'devise.mailer.reconfirmation_instructions.subject' : 'devise.mailer.confirmation_instructions.subject', instance: @instance, title: Setting.site_title),
template_name: @resource.pending_reconfirmation? ? 'reconfirmation_instructions' : 'confirmation_instructions' template_name: @resource.pending_reconfirmation? ? 'reconfirmation_instructions' : 'confirmation_instructions'
end end
end end
@ -30,7 +30,7 @@ class UserMailer < Devise::Mailer
return if @resource.disabled? return if @resource.disabled?
I18n.with_locale(@resource.locale || I18n.default_locale) do I18n.with_locale(@resource.locale || I18n.default_locale) do
mail to: @resource.email, subject: I18n.t('devise.mailer.reset_password_instructions.subject') mail to: @resource.email, subject: I18n.t('devise.mailer.reset_password_instructions.subject', title: Setting.site_title)
end end
end end
@ -41,7 +41,7 @@ class UserMailer < Devise::Mailer
return if @resource.disabled? return if @resource.disabled?
I18n.with_locale(@resource.locale || I18n.default_locale) do I18n.with_locale(@resource.locale || I18n.default_locale) do
mail to: @resource.email, subject: I18n.t('devise.mailer.password_change.subject') mail to: @resource.email, subject: I18n.t('devise.mailer.password_change.subject', title: Setting.site_title)
end end
end end
@ -52,7 +52,7 @@ class UserMailer < Devise::Mailer
return if @resource.disabled? return if @resource.disabled?
I18n.with_locale(@resource.locale || I18n.default_locale) do I18n.with_locale(@resource.locale || I18n.default_locale) do
mail to: @resource.email, subject: I18n.t('devise.mailer.email_changed.subject') mail to: @resource.email, subject: I18n.t('devise.mailer.email_changed.subject', title: Setting.site_title)
end end
end end
@ -75,7 +75,7 @@ class UserMailer < Devise::Mailer
return if @resource.disabled? return if @resource.disabled?
I18n.with_locale(@resource.locale || I18n.default_locale) do I18n.with_locale(@resource.locale || I18n.default_locale) do
mail to: @resource.email, subject: I18n.t('user_mailer.backup_ready.subject') mail to: @resource.email, subject: I18n.t('user_mailer.backup_ready.subject', title: Setting.site_title)
end end
end end

View File

@ -57,4 +57,4 @@
%tbody %tbody
%tr %tr
%td.column-cell.text-center.padded %td.column-cell.text-center.padded
%p= t 'devise.mailer.reconfirmation_instructions.extra' %p= t 'devise.mailer.reconfirmation_instructions.extra', title: site_title

View File

@ -23,28 +23,28 @@ en:
explanation: You have created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this email. explanation: You have created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this email.
explanation_when_pending: You applied for an invite to %{host} with this email address. Once you confirm your e-mail address, we will review your application. You can't login until then. If your application is rejected, your data will be removed, so no further action will be required from you. If this wasn't you, please ignore this email. explanation_when_pending: You applied for an invite to %{host} with this email address. Once you confirm your e-mail address, we will review your application. You can't login until then. If your application is rejected, your data will be removed, so no further action will be required from you. If this wasn't you, please ignore this email.
extra_html: Please also check out <a href="%{terms_path}">the rules of the server</a> and <a href="%{policy_path}">our terms of service</a>. extra_html: Please also check out <a href="%{terms_path}">the rules of the server</a> and <a href="%{policy_path}">our terms of service</a>.
subject: 'Mastodon: Confirmation instructions for %{instance}' subject: '%{title}: Confirmation instructions'
title: Verify email address title: Verify email address
email_changed: email_changed:
explanation: 'The email address for your account is being changed to:' explanation: 'The email address for your account is being changed to:'
extra: If you did not change your email, it is likely that someone has gained access to your account. Please change your password immediately or contact the server admin if you're locked out of your account. extra: If you did not change your email, it is likely that someone has gained access to your account. Please change your password immediately or contact the server admin if you're locked out of your account.
subject: 'Mastodon: Email changed' subject: '%{title}: Email changed'
title: New email address title: New email address
password_change: password_change:
explanation: The password for your account has been changed. explanation: The password for your account has been changed.
extra: If you did not change your password, it is likely that someone has gained access to your account. Please change your password immediately or contact the server admin if you're locked out of your account. extra: If you did not change your password, it is likely that someone has gained access to your account. Please change your password immediately or contact the server admin if you're locked out of your account.
subject: 'Mastodon: Password changed' subject: '%{title}: Password changed'
title: Password changed title: Password changed
reconfirmation_instructions: reconfirmation_instructions:
explanation: Confirm the new address to change your email. explanation: Confirm the new address to change your email.
extra: If this change wasn't initiated by you, please ignore this email. The email address for the Mastodon account won't change until you access the link above. extra: If this change wasn't initiated by you, please ignore this email. The email address for the %{title} account won't change until you access the link above.
subject: 'Mastodon: Confirm email for %{instance}' subject: '%{title}: Confirm email'
title: Verify email address title: Verify email address
reset_password_instructions: reset_password_instructions:
action: Change password action: Change password
explanation: You requested a new password for your account. explanation: You requested a new password for your account.
extra: If you didn't request this, please ignore this email. Your password won't change until you access the link above and create a new one. extra: If you didn't request this, please ignore this email. Your password won't change until you access the link above and create a new one.
subject: 'Mastodon: Reset password instructions' subject: '%{title}: Reset password instructions'
title: Password reset title: Password reset
unlock_instructions: unlock_instructions:
subject: 'Mastodon: Unlock instructions' subject: 'Mastodon: Unlock instructions'