Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def signup_notification(user_id)
I18n.with_locale(@user.preference.locale_for_mails) do
mail(
to: @user.email,
subject: t("user_mailer.signup_notification.subject", app_name: ArchiveConfig.APP_SHORT_NAME)
subject: default_i18n_subject(app_name: ArchiveConfig.APP_SHORT_NAME)
)
end
end
Expand Down
20 changes: 10 additions & 10 deletions app/views/user_mailer/signup_notification.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<% content_for :message do %>
<p><%= t('.welcome',
login: style_bold(@user.login)).html_safe %></p>
<p><%= t('.activate.html',
activate_account_link: style_link(t('.activate_your_account'), activate_url(id: @user.confirmation_token))) %></p>
<p><%= t('.features.html') %></p>
<p><%= t('.information.html',
faq_link: style_link(t('.faq'), archive_faqs_url),
admin_posts_link: style_link(t('.admin_posts'), admin_posts_url),
contact_support_link: support_link(t '.contact_support')) %></p>
<p><%= t('.bye') %></p>
<p><%= t(".welcome.html",
login: style_bold(@user.login)) %></p>
<p><%= t(".activate.html",
activate_account_link: style_link(t(".activate_your_account"), activate_url(id: @user.confirmation_token))) %></p>
<p><%= t(".features.html") %></p>
<p><%= t(".information.html",
faq_link: style_link(t(".faq"), archive_faqs_url),
admin_posts_link: style_link(t(".admin_posts"), admin_posts_url),
contact_support_link: support_link(t(".contact_support"))) %></p>
<p><%= t(".bye") %></p>
<% end %>
10 changes: 5 additions & 5 deletions app/views/user_mailer/signup_notification.text.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<% content_for :message do %>
<%= t('.welcome',
<%= t(".welcome.text",
login: @user.login) %>

<%= t('.activate.text',
<%= t(".activate.text",
activate_account_url: activate_url(id: @user.confirmation_token)) %>

<%= t('.features.text') %>
<%= t(".features.text") %>

<%= t('.information.text',
<%= t(".information.text",
faq_url: archive_faqs_url,
admin_posts_url: admin_posts_url,
contact_support_url: new_feedback_report_url) %>

<%= t('.bye') %>
<%= t(".bye") %>
<% end %>
4 changes: 3 additions & 1 deletion config/locales/mailers/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,9 @@ en:
html: There's lots of information and advice on how to use the Archive in our %{faq_link}. You'll find the latest news about site developments on %{admin_posts_link}. If you need more help, run into a bug, or have questions or comments, please %{contact_support_link}, who are always happy to help out.
text: 'There''s lots of information and advice on how to use the Archive in our FAQ at %{faq_url}. You''ll find the latest news about site developments on AO3 News at %{admin_posts_url}. If you need more help, run into a bug, or have questions or comments, please contact Support, who are always happy to help out: %{contact_support_url}.'
subject: "[%{app_name}] Activate your account"
welcome: Welcome to the Archive of Our Own, %{login}!
welcome:
html: Welcome to the Archive of Our Own, %{login}!
text: Welcome to the Archive of Our Own, %{login}!
users:
mailer:
confirmation_instructions:
Expand Down
6 changes: 6 additions & 0 deletions test/mailers/previews/user_mailer_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,12 @@ def related_work_notification_anon
UserMailer.related_work_notification(user.id, related_work.id)
end

# URL: /rails/mailers/user_mailer/signup_notification
def signup_notification
user = create(:user, :for_mailer_preview, confirmed_at: nil)
UserMailer.signup_notification(user.id)
end

private

def creatorship_notification_data(creation_type)
Expand Down
Loading