-
Notifications
You must be signed in to change notification settings - Fork 652
AO3-7035 Add Invitation Mailer Previews and Refactored I18n Keys #5489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 11 commits
c8128a6
7048e89
d248a35
edf5014
1a49796
f853aaa
3050af7
352193c
9f2ca85
9884d1f
ea71832
ffe6a7a
a6ac3ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,29 +1,29 @@ | ||||||
| <% content_for :message do %> | ||||||
| <p> | ||||||
| <% 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" %> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please update all
Suggested change
|
||||||
| <% end %> | ||||||
| </p> | ||||||
|
|
||||||
| <p> | ||||||
| <%= 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(".html.otw_link_text"), "https://www.transformativeworks.org")) %> | ||||||
| </p> | ||||||
|
|
||||||
| <p> | ||||||
| <%= t ".features" %> | ||||||
| </p> | ||||||
|
|
||||||
| <p> | ||||||
| <%= 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(".html.invitation_link_text"), signup_url(invitation_token: @invitation.token))) %> | ||||||
| </p> | ||||||
|
|
||||||
| <p> | ||||||
| <%= 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(".html.support_link_text"), new_feedback_report_url)) %> | ||||||
| </p> | ||||||
|
|
||||||
| <p> | ||||||
| <%= 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(".html.faq_link_text"), archive_faqs_url)) %> | ||||||
| </p> | ||||||
| <% end %> | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 %> |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -651,24 +651,29 @@ 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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In all these strings, please replace "AO3" with the |
||||||
| 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}. | ||||||
| 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}. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| been_invited: You've been invited to join the Archive of Our Own! | ||||||
| faq: | ||||||
| html: For more information, please check %{faq_link}. | ||||||
| text: For more information, please check %{faq_url}. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please move the exact text to the new location without modifying it:
Suggested change
|
||||||
| 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!" | ||||||
| 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!" | ||||||
|
Comment on lines
+668
to
+670
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this is the same text in both emails it can just be one key. If it needs the html suffix to avoid |
||||||
| 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_link_text: our FAQ | ||||||
| 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 | ||||||
Dcano-png marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| join: | ||||||
| html: If you'd like to join us, please %{invitation_link}. | ||||||
| text: If you'd like to join us, please follow this link to sign up %{invitation_url}. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| 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}. | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please give this user the |
||
| 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) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We prefer
usernamewithout a space, please update these variables here for that