From e308ea97e9ef50b293fd78649d3ef042866781a4 Mon Sep 17 00:00:00 2001 From: Brian Austin <13002992+brianjaustin@users.noreply.github.com> Date: Tue, 23 Apr 2024 14:51:49 -0400 Subject: [PATCH] AO3-4308 Update claim email text with t's suggestion (#4796) * AO3-4308 Update claim email text with t's suggestion * Group text/html under 1 parent * Match T's suggested keys --- app/views/user_mailer/claim_notification.html.erb | 2 +- app/views/user_mailer/claim_notification.text.erb | 2 +- config/locales/mailers/en.yml | 4 +++- test/mailers/previews/user_mailer_preview.rb | 6 ++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/views/user_mailer/claim_notification.html.erb b/app/views/user_mailer/claim_notification.html.erb index a61603dbeaf..ff920e64cae 100644 --- a/app/views/user_mailer/claim_notification.html.erb +++ b/app/views/user_mailer/claim_notification.html.erb @@ -25,7 +25,7 @@ <% end %> -
<%= t(".redirects") %>
+<%= t(".redirects.html", negation: style_bold(t(".redirects.negation"))) %>
<%= t(".update_redirect.html", contact_open_doors_link: opendoors_link(t(".update_redirect.contact_open_doors"))) %>
diff --git a/app/views/user_mailer/claim_notification.text.erb b/app/views/user_mailer/claim_notification.text.erb index 3a316eff16e..2fa691d7da9 100644 --- a/app/views/user_mailer/claim_notification.text.erb +++ b/app/views/user_mailer/claim_notification.text.erb @@ -18,7 +18,7 @@ <% end %> <% end %> -<%= t(".redirects") %> +<%= t(".redirects.html", negation: t(".redirects.negation")) %> <%= t(".update_redirect.text", open_doors_url: "https://opendoors.transformativeworks.org/en/contact-open-doors/") %> diff --git a/config/locales/mailers/en.yml b/config/locales/mailers/en.yml index 7c79f8cabd5..59fa550d064 100644 --- a/config/locales/mailers/en.yml +++ b/config/locales/mailers/en.yml @@ -225,7 +225,9 @@ en: contact_support: contact AO3 Support html: For other inquiries, please %{contact_support_link}. text: For other inquiries, please contact AO3 Support at %{support_url}. - redirects: To preserve rec lists and bookmarks, the imported archive's web addresses may redirect to the imported copy of these works for a limited time (check the announcement post for your archive to be sure). If you've already uploaded a copy of these works and you did NOT use the import from URL feature, there will be two copies of the same work on the archive. + redirects: + html: To preserve rec lists and bookmarks, the imported archive's web addresses may redirect to the imported copy of these works for a limited time (check the announcement post for your archive to be sure). If you've already uploaded a copy of these works and you did %{negation} use the import from URL feature, there will be two copies of the same work on the AO3. + negation: NOT subject: "[%{app_name}] Works uploaded" update_redirect: contact_open_doors: contact Open Doors diff --git a/test/mailers/previews/user_mailer_preview.rb b/test/mailers/previews/user_mailer_preview.rb index 443163bca1e..5fa4f430314 100644 --- a/test/mailers/previews/user_mailer_preview.rb +++ b/test/mailers/previews/user_mailer_preview.rb @@ -29,6 +29,12 @@ def feedback_response UserMailer.feedback(feedback.id) end + def claim_notification_registered + work = create(:work) + creator_id = work.pseuds.first.user.id + UserMailer.claim_notification(creator_id, [work.id], true) + end + private def creatorship_notification_data