diff --git a/app/views/user_mailer/invitation.html.erb b/app/views/user_mailer/invitation.html.erb index 6ba70b011d6..5f6bacbe387 100644 --- a/app/views/user_mailer/invitation.html.erb +++ b/app/views/user_mailer/invitation.html.erb @@ -1,14 +1,14 @@ <% content_for :message do %>

<% if !@user_name.blank? %> - <%= t(".has_invited", user_name: style_bold(@user_name)).html_safe %> + <%= t(".has_invited.html", user_name: style_bold(@user_name)) %> <% else %> <%= t ".been_invited" %> <% end %>

- <%= t(".html.about", otw_link: style_link(t(".html.otw_link_text"), "https://www.transformativeworks.org")).html_safe %> + <%= t(".about.html", otw_link: style_link(t(".about.otw_link_text"), "https://www.transformativeworks.org")) %>

@@ -16,14 +16,14 @@

- <%= t(".html.join", invitation_link: style_link(t(".html.invitation_link_text"), signup_url(invitation_token: @invitation.token))).html_safe %> + <%= t(".join.html", invitation_link: style_link(t(".join.invitation_link_text"), signup_url(invitation_token: @invitation.token))) %>

- <%= t(".html.activation_support", support_link: style_link(t(".html.support_link_text"), new_feedback_report_url)).html_safe %> + <%= t(".activation_support.html", support_link: style_link(t(".activation_support.support_link_text"), new_feedback_report_url)) %>

- <%= t(".html.faq", faq_link: style_link(t(".html.faq_link_text"), archive_faqs_url)).html_safe %> + <%= t(".faq.html", faq_link: style_link(t(".faq.faq_link_text"), archive_faqs_url)) %>

<% end %> diff --git a/app/views/user_mailer/invitation.text.erb b/app/views/user_mailer/invitation.text.erb index 00fedc67bc8..4f3db24c345 100644 --- a/app/views/user_mailer/invitation.text.erb +++ b/app/views/user_mailer/invitation.text.erb @@ -1,17 +1,17 @@ <% content_for :message do %> <% if !@user_name.blank? %> -<%= t ".has_invited", user_name: @user_name %> +<%= t ".has_invited.text", user_name: @user_name %> <% else %> <%= t ".been_invited" %> <% end %> -<%= t ".text.about", otw_url: "https://www.transformativeworks.org" %> +<%= t ".about.text", otw_url: "https://www.transformativeworks.org" %> <%= t ".features" %> -<%= t ".text.join", invitation_url: signup_url(invitation_token: @invitation.token) %> +<%= t ".join.text", invitation_url: signup_url(invitation_token: @invitation.token) %> -<%= t ".text.activation_support", support_url: new_feedback_report_url %> +<%= t ".activation_support.text", support_url: new_feedback_report_url %> -<%= t ".text.faq", faq_url: archive_faqs_url %> +<%= t ".faq.text", faq_url: archive_faqs_url %> <% end %> diff --git a/config/locales/mailers/en.yml b/config/locales/mailers/en.yml index 56017b19e50..e9fec02be63 100644 --- a/config/locales/mailers/en.yml +++ b/config/locales/mailers/en.yml @@ -651,24 +651,28 @@ en: signups_here: 'Here are the invalid sign-ups:' subject: "[%{app_name}][%{collection_title}] Invalid sign-ups found" invitation: + about: + html: The Archive of Our Own (AO3) is a free, noncommercial archive built by and for fans. Our servers are owned by our parent nonprofit, the %{otw_link}, which works to protect fan rights and preserve fanworks. We welcome all kinds of fanworks, including fanfiction, fanart, fanvids, and podfic from any fandom. + otw_link_text: Organization for Transformative Works + text: The Archive of Our Own (AO3) is a free, noncommercial archive built by and for fans. Our servers are owned by our parent nonprofit, the Organization for Transformative Works (%{otw_url}), which works to protect fan rights and preserve fanworks. We welcome all kinds of fanworks, including fanfiction, fanart, fanvids, and podfic from any fandom. + activation_support: + html: After you sign up, you'll receive an account activation email. If you do not receive this email after 48 hours, please %{support_link}. + support_link_text: contact Support + text: After you sign up, you'll receive an account activation email. If you do not receive this email after 48 hours, please %{support_url}. been_invited: You've been invited to join the Archive of Our Own! - features: With an account, you can post fanworks, use bookmarks to keep track of works you enjoyed, receive subscription emails when your favorite creators or works update, customize the way the site looks for you, and more! - has_invited: "%{user_name} has invited you to join the Archive of Our Own!" - html: - about: The Archive of Our Own (AO3) is a free, noncommercial archive built by and for fans. Our servers are owned by our parent nonprofit, the %{otw_link}, which works to protect fan rights and preserve fanworks. We welcome all kinds of fanworks, including fanfiction, fanart, fanvids, and podfic from any fandom. - activation_support: After you sign up, you'll receive an account activation email. If you do not receive this email after 48 hours, please %{support_link}. - faq: For more information, please check %{faq_link}. + faq: faq_link_text: our FAQ + html: For more information, please check %{faq_link}. + text: For more information, please check %{faq_url}. + features: With an account, you can post fanworks, use bookmarks to keep track of works you enjoyed, receive subscription emails when your favorite creators or works update, customize the way the site looks for you, and more! + has_invited: + html: "%{user_name} has invited you to join the Archive of Our Own!" + text: "%{user_name} has invited you to join the Archive of Our Own!" + join: + html: If you'd like to join us, please %{invitation_link}. invitation_link_text: follow this link to sign up - join: If you'd like to join us, please %{invitation_link}. - otw_link_text: Organization for Transformative Works - support_link_text: contact Support + text: If you'd like to join us, please follow this link to sign up %{invitation_url}. subject: "[%{app_name}] Invitation" - text: - about: The Archive of Our Own (AO3) is a free, noncommercial archive built by and for fans. Our servers are owned by our parent nonprofit, the Organization for Transformative Works (%{otw_url}), which works to protect fan rights and preserve fanworks. We welcome all kinds of fanworks, including fanfiction, fanart, fanvids, and podfic from any fandom. - activation_support: 'After you sign up, you''ll receive an account activation email. If you do not receive this email after 48 hours, please contact Support: %{support_url}.' - faq: 'For more information, please check our FAQ: %{faq_url}.' - join: 'If you''d like to join us, please follow this link to sign up: %{invitation_url}.' invitation_to_claim: access: html: Depending on the archive, your works may have been imported as restricted to registered users only (to keep them out of Google searches). If this is the case, the works will only be accessible by logged-in users unless you choose to make them fully visible. For help unlocking, orphaning, or deleting your works, please %{contact_support_link}. diff --git a/test/mailers/previews/user_mailer_preview.rb b/test/mailers/previews/user_mailer_preview.rb index 003c314ff4e..cb36a3c1c84 100644 --- a/test/mailers/previews/user_mailer_preview.rb +++ b/test/mailers/previews/user_mailer_preview.rb @@ -153,6 +153,19 @@ def invitation_to_claim UserMailer.invitation_to_claim(invitation.id, archivist.login) end + # URL: /rails/mailers/user_mailer/invitation + def invitation_by_other_user + inviting_user = create(:user) + invitation = create(:invitation, creator: inviting_user) + UserMailer.invitation(invitation.id) + end + + # URL: /rails/mailers/user_mailer/invitation + def invitation_by_queue + invitation = create(:invitation) + UserMailer.invitation(invitation.id) + end + # URL: /rails/mailers/user_mailer/invite_request_declined?total=3 def invite_request_declined user = create(:user, :for_mailer_preview)