From 4f92add78da74a8c3b1b1ec7854c4b8a879a08ea Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 7 Apr 2022 10:33:11 +0200 Subject: [PATCH] Format LiveView templates after adding the LiveView formatter plugin Signed-off-by: Thomas Citharel --- lib/web/templates/api/privacy.html.heex | 173 ++++++---- lib/web/templates/api/terms.html.heex | 318 +++++++++++++++--- .../activity/_comment_activity_item.html.heex | 95 +++--- .../_discussion_activity_item.html.heex | 96 ++---- .../activity/_event_activity_item.html.heex | 98 +++--- .../activity/_group_activity_item.html.heex | 44 +-- .../activity/_member_activity_item.html.heex | 119 +++---- .../activity/_post_activity_item.html.heex | 58 ++-- .../_resource_activity_item.html.heex | 184 +++++----- .../actor_suspension_participants.html.heex | 33 +- lib/web/templates/email/admin/_role.html.heex | 14 +- .../email/admin_user_confirmation.html.heex | 54 ++- .../admin_user_email_changed_new.html.heex | 40 ++- .../admin_user_email_changed_old.html.heex | 40 ++- .../email/admin_user_role_changed.html.heex | 50 ++- ...ymous_participation_confirmation.html.heex | 59 +++- .../email/before_event_notification.html.heex | 45 ++- .../email/date/event_tz_date.html.heex | 19 +- .../email/date/event_tz_date_range.html.heex | 48 ++- lib/web/templates/email/email.html.heex | 91 +++-- .../email/email_anonymous_activity.html.heex | 54 +-- .../email/email_changed_new.html.heex | 43 ++- .../email/email_changed_old.html.heex | 36 +- .../email/email_direct_activity.html.heex | 282 +++++++++++----- ...vent_group_follower_notification.html.heex | 28 +- .../event_participation_approved.html.heex | 54 ++- .../event_participation_confirmed.html.heex | 54 ++- .../event_participation_rejected.html.heex | 30 +- .../templates/email/event_updated.html.heex | 89 +++-- .../templates/email/group_invite.html.heex | 44 ++- .../email/group_member_removal.html.heex | 37 +- .../email/group_membership_approval.html.heex | 38 ++- .../group_membership_rejection.html.heex | 28 +- .../email/group_suspension.html.heex | 53 ++- .../templates/email/instance_follow.html.heex | 104 ++++-- .../email/notification_each_week.html.heex | 58 +++- .../email/on_day_notification.html.heex | 55 ++- .../participation/card/_metadata.html.heex | 117 +++++-- .../participation/card/_picture.html.heex | 19 +- .../email/participation/card/_title.html.heex | 40 ++- .../email/participation/event_card.html.heex | 162 ++++++--- .../templates/email/password_reset.html.heex | 50 ++- ...nding_participation_notification.html.heex | 65 +++- .../email/registration_confirmation.html.heex | 45 ++- lib/web/templates/email/report.html.heex | 165 +++++++-- lib/web/templates/error/500_page.html.heex | 46 ++- .../export/event_participants.html.heex | 293 ++++++++-------- 47 files changed, 2557 insertions(+), 1210 deletions(-) diff --git a/lib/web/templates/api/privacy.html.heex b/lib/web/templates/api/privacy.html.heex index f57205f4c..b54b60f95 100644 --- a/lib/web/templates/api/privacy.html.heex +++ b/lib/web/templates/api/privacy.html.heex @@ -1,25 +1,32 @@

- <%= pgettext("terms", "Some terms, technical or otherwise, used in the text below may cover concepts that are difficult to grasp. We have provided a glossary to help you understand them better.") |> raw %> + <%= pgettext( + "terms", + "Some terms, technical or otherwise, used in the text below may cover concepts that are difficult to grasp. We have provided a glossary to help you understand them better." + ) + |> raw %>

<%= pgettext("terms", "What information do we collect?") %>

<%= pgettext("terms", "What do we use your information for?") %>

-

<%= - pgettext( - "terms", - "Any of the information we collect from you may be used in the following ways:" - ) - %>

+

+ <%= pgettext( + "terms", + "Any of the information we collect from you may be used in the following ways:" + ) %> +

<%= pgettext("terms", "How do we protect your information?") %>

- <%= - pgettext("terms", "We implement a variety of security measures to maintain the safety of your personal information when you enter, submit, or access your personal information. Among other things, your browser session, as well as the traffic between your applications and the API, are secured with SSL/TLS, and your password is hashed using a strong one-way algorithm.") - %> + <%= pgettext( + "terms", + "We implement a variety of security measures to maintain the safety of your personal information when you enter, submit, or access your personal information. Among other things, your browser session, as well as the traffic between your applications and the API, are secured with SSL/TLS, and your password is hashed using a strong one-way algorithm." + ) %>

<%= pgettext("terms", "What is our data retention policy?") %>

<%= pgettext("terms", "We will make a good faith effort to:") %>

<%= pgettext("terms", "You may irreversibly delete your account at any time.") %>

<%= pgettext("terms", "Do we use cookies?") %>

-

<%= - pgettext("terms", "We store the following information on your device when you connect:") - %> +

+ <%= pgettext("terms", "We store the following information on your device when you connect:") %>

<%= pgettext("terms", "If you delete this information, you need to login again.") %>

-

<%= - pgettext( - "terms", - "If you're not connected, we don't store any information on your device, unless you participate in an event anonymously. In this specific case we store the hash of an unique identifier for the event and participation status in your browser so that we may display participation status. Deleting this information will only stop displaying participation status in your browser." - ) - %> +

+ <%= pgettext( + "terms", + "If you're not connected, we don't store any information on your device, unless you participate in an event anonymously. In this specific case we store the hash of an unique identifier for the event and participation status in your browser so that we may display participation status. Deleting this information will only stop displaying participation status in your browser." + ) %>

- <%= pgettext("terms", "Note: This information is stored in your localStorage and not your cookies.") %> + <%= pgettext( + "terms", + "Note: This information is stored in your localStorage and not your cookies." + ) %> -

<%= - pgettext("terms", "Do we disclose any information to outside parties?") - %>

+

+ <%= pgettext("terms", "Do we disclose any information to outside parties?") %> +

- <%= - pgettext("terms", "No. We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our site, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others rights, property, or safety.") - %> + <%= pgettext( + "terms", + "No. We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our site, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others rights, property, or safety." + ) %>

- <%= - pgettext("terms", "Your content may be downloaded by other instances in the network. Your public events and comments are delivered to the instances following your own instance. Content created through a group is forwarded to all the instances of all the members of the group, insofar as these members reside on a different instance than this one.") - %> + <%= pgettext( + "terms", + "Your content may be downloaded by other instances in the network. Your public events and comments are delivered to the instances following your own instance. Content created through a group is forwarded to all the instances of all the members of the group, insofar as these members reside on a different instance than this one." + ) %>

-

<%= - pgettext("terms", "Site usage by children") - %>

+

<%= pgettext("terms", "Site usage by children") %>

- <%= pgettext("terms", "If this server is in the EU or the EEA: Our site, products and services are all directed to people who are at least 16 years old. If you are under the age of 16, per the requirements of the GDPR (General Data Protection Regulation) do not use this site.") |> raw %> + <%= pgettext( + "terms", + "If this server is in the EU or the EEA: Our site, products and services are all directed to people who are at least 16 years old. If you are under the age of 16, per the requirements of the GDPR (General Data Protection Regulation) do not use this site." + ) + |> raw %>

- <%= pgettext("terms", "If this server is in the USA: Our site, products and services are all directed to people who are at least 13 years old. If you are under the age of 13, per the requirements of COPPA (Children's Online Privacy Protection Act) do not use this site.") |> raw %> + <%= pgettext( + "terms", + "If this server is in the USA: Our site, products and services are all directed to people who are at least 13 years old. If you are under the age of 13, per the requirements of COPPA (Children's Online Privacy Protection Act) do not use this site." + ) + |> raw %>

- <%= pgettext("terms", "Law requirements can be different if this server is in another jurisdiction.") %> + <%= pgettext( + "terms", + "Law requirements can be different if this server is in another jurisdiction." + ) %> +

+

<%= pgettext("terms", "Changes to our Privacy Policy") %>

+

+ <%= pgettext( + "terms", + "If we decide to change our privacy policy, we will post those changes on this page." + ) %> +

+

+ <%= pgettext( + "terms", + "This document is licensed under CC BY-SA. It was last updated June 18, 2020." + ) + |> raw %> +

+

+ <%= pgettext( + "terms", + "Originally adapted from the Mastodon and Discourse privacy policies, also licensed under CC BY-SA." + ) + |> raw %>

-

<%= - pgettext("terms", "Changes to our Privacy Policy") - %>

-

<%= pgettext("terms", "If we decide to change our privacy policy, we will post those changes on this page.") %>

-

<%= pgettext("terms", "This document is licensed under CC BY-SA. It was last updated June 18, 2020.") |> raw %>

-

<%= pgettext("terms", "Originally adapted from the Mastodon and Discourse privacy policies, also licensed under CC BY-SA.") |> raw %>

diff --git a/lib/web/templates/api/terms.html.heex b/lib/web/templates/api/terms.html.heex index a38f84b55..8f7f8366f 100644 --- a/lib/web/templates/api/terms.html.heex +++ b/lib/web/templates/api/terms.html.heex @@ -3,96 +3,324 @@

<%= pgettext("terms", "Short version") %>

- <%= pgettext("terms", "Some terms, technical or otherwise, used in the text below may cover concepts that are difficult to grasp. We have provided a glossary to help you understand them better.") |> raw %> + <%= pgettext( + "terms", + "Some terms, technical or otherwise, used in the text below may cover concepts that are difficult to grasp. We have provided a glossary to help you understand them better." + ) + |> raw %>

-

<%= pgettext("terms", "Here are the important things you need to know about accessing and using the %{instance_name} (%{instance_url}) website and service (collectively, \"Service\"). These are our terms of service (\"Terms\"). Please read them carefully.", %{instance_name: @instance_name, instance_url: @instance_url}) |> raw %>

- <%= pgettext("terms", "When we say “we”, “our”, or “us” in this document, we are referring to the owners, operators and administrators of this Mobilizon instance. The Mobilizon software is provided by the team of Mobilizon contributors, supported by Framasoft, a French not-for-profit organization advocating for Free/Libre Software. Unless explicitly stated, this Mobilizon instance is an independent service using Mobilizon's source code. You may find more information about this instance on the \"About this instance\" page.") |> raw %> + <%= pgettext( + "terms", + "Here are the important things you need to know about accessing and using the %{instance_name} (%{instance_url}) website and service (collectively, \"Service\"). These are our terms of service (\"Terms\"). Please read them carefully.", + %{instance_name: @instance_name, instance_url: @instance_url} + ) + |> raw %> +

+

+ <%= pgettext( + "terms", + "When we say “we”, “our”, or “us” in this document, we are referring to the owners, operators and administrators of this Mobilizon instance. The Mobilizon software is provided by the team of Mobilizon contributors, supported by Framasoft, a French not-for-profit organization advocating for Free/Libre Software. Unless explicitly stated, this Mobilizon instance is an independent service using Mobilizon's source code. You may find more information about this instance on the \"About this instance\" page." + ) + |> raw %>

<%= pgettext("terms", "Accepting these Terms") %>

-

<%= pgettext("terms", "By accessing or using the Service, this means you agree to be bound by all the terms below. If these terms are in any way unclear, please let us know by contacting %{contact}.", %{contact: @instance_contact}) |> raw %>

+

+ <%= pgettext( + "terms", + "By accessing or using the Service, this means you agree to be bound by all the terms below. If these terms are in any way unclear, please let us know by contacting %{contact}.", + %{contact: @instance_contact} + ) + |> raw %> +

<%= pgettext("terms", "Changes to these Terms") %>

- <%= pgettext("terms", "We reserve the right to modify these Terms at any time. For instance, we may need to change these Terms if we come out with a new feature.") %> + <%= pgettext( + "terms", + "We reserve the right to modify these Terms at any time. For instance, we may need to change these Terms if we come out with a new feature." + ) %>

- <%= pgettext("terms", "If we make major changes, we will notify our users in a clear and prominent manner. Minor changes may only be highlighted in the footer of our website. It is your responsibility to check the website regularly for changes to these Terms.") %> + <%= pgettext( + "terms", + "If we make major changes, we will notify our users in a clear and prominent manner. Minor changes may only be highlighted in the footer of our website. It is your responsibility to check the website regularly for changes to these Terms." + ) %>

- <%= pgettext("terms", "If you continue to use the Service after the revised Terms go into effect, you accept the revised Terms.") %> + <%= pgettext( + "terms", + "If you continue to use the Service after the revised Terms go into effect, you accept the revised Terms." + ) %>

<%= pgettext("terms", "Privacy Policy") %>

-

<%= pgettext("terms", "For information about how we collect and use information about users of the Service, please check our privacy policy.") |> raw %>

+

+ <%= pgettext( + "terms", + "For information about how we collect and use information about users of the Service, please check our privacy policy." + ) + |> raw %> +

<%= pgettext("terms", "Creating Accounts") %>

-

<%= pgettext("terms", "When you create an account you agree to maintain the security and confidentiality of your password and accept all risks of unauthorized access to your account data and any other information you provide to %{instance_name}.", %{instance_name: @instance_name}) |> raw %>

-

<%= pgettext("terms", "If you discover or suspect any Service security breaches, please let us know as soon as possible. For security holes in the Mobilizon software itself, please contact its contributors directly.") |> raw %>

-

<%= pgettext("terms", "We are not liable for any loss you may incur as a result of someone else using your email or password, either with or without your knowledge.") %>

+

+ <%= pgettext( + "terms", + "When you create an account you agree to maintain the security and confidentiality of your password and accept all risks of unauthorized access to your account data and any other information you provide to %{instance_name}.", + %{instance_name: @instance_name} + ) + |> raw %> +

+

+ <%= pgettext( + "terms", + "If you discover or suspect any Service security breaches, please let us know as soon as possible. For security holes in the Mobilizon software itself, please contact its contributors directly." + ) + |> raw %> +

+

+ <%= pgettext( + "terms", + "We are not liable for any loss you may incur as a result of someone else using your email or password, either with or without your knowledge." + ) %> +

<%= pgettext("terms", "Your Content & Conduct") %>

-

<%= pgettext("terms", "Our Service allows you and other users to post, link and otherwise make available content. You are responsible for the content that you make available to the Service, including its legality, reliability, and appropriateness.") %>

-

<%= pgettext("terms", "When you post, link or otherwise make available content to the Service, you grant us the right and license to display and distribute your content on or through the Service (including via applications). We may format your content for display throughout the Service, but we will not edit or revise the substance of your content itself. The displaying and distribution of your content happens only according to the visibility rules you have set for the content. We will not modify the visibility of the content you have set.") %>

-

<%= pgettext("terms", "We cannot be held responsible should a programming or administrative error make your content visible to a larger audience than intended. Aside from our limited right to your content, you retain all of your rights to the content you post, link and otherwise make available on or through the Service.") %>

-

<%= pgettext("terms", "You can remove the content that you posted by deleting it. Once you delete your content, it will not appear on the Service, but copies of your deleted content may remain in our system or backups for some period of time. Web server access logs might also be stored for some time in the system.") %>

-

<%= pgettext("terms", "Since Mobilizon is a distributed network, it is possible, depending on the visibility rules set to your content, that your content has been distributed to other Mobilizon instances. When you delete your content, we will request those other instances to also delete the content. Our responsibility on the content being deleted from those other instances ends here. If for some reason, some other instance does not delete the content, we cannot be held responsible.") %>

-

<%= pgettext("terms", "In order to make %{instance_name} a great place for all of us, please do not post, link and otherwise make available on or through the Service any of the following:", %{instance_name: @instance_name}) |> raw %>

+

+ <%= pgettext( + "terms", + "Our Service allows you and other users to post, link and otherwise make available content. You are responsible for the content that you make available to the Service, including its legality, reliability, and appropriateness." + ) %> +

+

+ <%= pgettext( + "terms", + "When you post, link or otherwise make available content to the Service, you grant us the right and license to display and distribute your content on or through the Service (including via applications). We may format your content for display throughout the Service, but we will not edit or revise the substance of your content itself. The displaying and distribution of your content happens only according to the visibility rules you have set for the content. We will not modify the visibility of the content you have set." + ) %> +

+

+ <%= pgettext( + "terms", + "We cannot be held responsible should a programming or administrative error make your content visible to a larger audience than intended. Aside from our limited right to your content, you retain all of your rights to the content you post, link and otherwise make available on or through the Service." + ) %> +

+

+ <%= pgettext( + "terms", + "You can remove the content that you posted by deleting it. Once you delete your content, it will not appear on the Service, but copies of your deleted content may remain in our system or backups for some period of time. Web server access logs might also be stored for some time in the system." + ) %> +

+

+ <%= pgettext( + "terms", + "Since Mobilizon is a distributed network, it is possible, depending on the visibility rules set to your content, that your content has been distributed to other Mobilizon instances. When you delete your content, we will request those other instances to also delete the content. Our responsibility on the content being deleted from those other instances ends here. If for some reason, some other instance does not delete the content, we cannot be held responsible." + ) %> +

+

+ <%= pgettext( + "terms", + "In order to make %{instance_name} a great place for all of us, please do not post, link and otherwise make available on or through the Service any of the following:", + %{instance_name: @instance_name} + ) + |> raw %> +

-

<%= pgettext("terms", "Also, you agree that you will not do any of the following in connection with the Service or other users:") %>

-

- <%= pgettext("terms", "Finally, your use of the Service is also subject to acceptance of the instance's own specific rules regarding the code of conduct and moderation rules. Breaking those rules may also result in your account being disabled or suspended.") |> raw %> + <%= pgettext( + "terms", + "Also, you agree that you will not do any of the following in connection with the Service or other users:" + ) %> +

+ +

+ <%= pgettext( + "terms", + "Finally, your use of the Service is also subject to acceptance of the instance's own specific rules regarding the code of conduct and moderation rules. Breaking those rules may also result in your account being disabled or suspended." + ) + |> raw %>

<%= pgettext("terms", "Our responsibility") %>

- <%= pgettext("terms", "Instance administrators (and community moderators, given the relevant access) are responsible for monitoring and acting on flagged content and other user reports, and have the right and responsibility to remove or edit content that is not aligned to this Instance set of rules, or to suspend, block or ban (temporarily or permanently) any account, community, or instance for breaking these terms, or for other behaviours that they deem inappropriate, threatening, offensive, or harmful.") %> + <%= pgettext( + "terms", + "Instance administrators (and community moderators, given the relevant access) are responsible for monitoring and acting on flagged content and other user reports, and have the right and responsibility to remove or edit content that is not aligned to this Instance set of rules, or to suspend, block or ban (temporarily or permanently) any account, community, or instance for breaking these terms, or for other behaviours that they deem inappropriate, threatening, offensive, or harmful." + ) %>

- <%= pgettext("terms", "Instance administrators should ensure that every community hosted on the instance is properly moderated according to the defined rules.") %> + <%= pgettext( + "terms", + "Instance administrators should ensure that every community hosted on the instance is properly moderated according to the defined rules." + ) %>

<%= pgettext("terms", "Source code") %>

-

<%= pgettext("terms", "This Service runs on a Mobilizon instance. This source code is licensed under an AGPLv3 license which means you are allowed to and even encouraged to take the source code, modify it and use it.") |> raw %>

-

<%= pgettext("terms", "For full details about the Mobilizon software see here.") |> raw %>

+

+ <%= pgettext( + "terms", + "This Service runs on a Mobilizon instance. This source code is licensed under an AGPLv3 license which means you are allowed to and even encouraged to take the source code, modify it and use it." + ) + |> raw %> +

+

+ <%= pgettext( + "terms", + "For full details about the Mobilizon software see here." + ) + |> raw %> +

<%= pgettext("terms", "Hyperlinks and Third Party Content") %>

-

<%= pgettext("terms", "%{instance_name} makes no claim or representation regarding, and accepts no responsibility for third party websites accessible by hyperlink from the Service or websites linking to the Service. When you leave the Service, you should be aware that these Terms and our policies no longer govern. The inclusion of any link does not imply endorsement by %{instance_name} of the site. Use of any such linked website is at the user's own risk.", %{instance_name: @instance_name}) |> raw %>

-

<%= pgettext("terms", "A lot of the content on the Service is from you and others, and we don't review, verify or authenticate it, and it may include inaccuracies or false information. We make no representations, warranties, or guarantees relating to the quality, suitability, truth, accuracy or completeness of any content contained in the Service. You acknowledge sole responsibility for and assume all risk arising from your use of or reliance on any content.") %>

+

+ <%= pgettext( + "terms", + "%{instance_name} makes no claim or representation regarding, and accepts no responsibility for third party websites accessible by hyperlink from the Service or websites linking to the Service. When you leave the Service, you should be aware that these Terms and our policies no longer govern. The inclusion of any link does not imply endorsement by %{instance_name} of the site. Use of any such linked website is at the user's own risk.", + %{instance_name: @instance_name} + ) + |> raw %> +

+

+ <%= pgettext( + "terms", + "A lot of the content on the Service is from you and others, and we don't review, verify or authenticate it, and it may include inaccuracies or false information. We make no representations, warranties, or guarantees relating to the quality, suitability, truth, accuracy or completeness of any content contained in the Service. You acknowledge sole responsibility for and assume all risk arising from your use of or reliance on any content." + ) %> +

<%= pgettext("terms", "Termination") %>

-

<%= pgettext("terms", "If you breach any of these Terms, we have the right to suspend or disable your access to or use of the Service.") %>

+

+ <%= pgettext( + "terms", + "If you breach any of these Terms, we have the right to suspend or disable your access to or use of the Service." + ) %> +

<%= pgettext("terms", "Entire Agreement") %>

-

<%= pgettext("terms", "These Terms constitute the entire agreement between you and %{instance_name} regarding the use of the Service, superseding any prior agreements between you and %{instance_name} relating to your use of the Service.", %{instance_name: @instance_name}) |> raw %>

+

+ <%= pgettext( + "terms", + "These Terms constitute the entire agreement between you and %{instance_name} regarding the use of the Service, superseding any prior agreements between you and %{instance_name} relating to your use of the Service.", + %{instance_name: @instance_name} + ) + |> raw %> +

<%= pgettext("terms", "Feedback") %>

-

<%= pgettext("terms", "We love feedback. Please let us know what you think of the Service, these Terms and, in general, %{instance_name}.", %{instance_name: @instance_name}) |> raw %>

+

+ <%= pgettext( + "terms", + "We love feedback. Please let us know what you think of the Service, these Terms and, in general, %{instance_name}.", + %{instance_name: @instance_name} + ) + |> raw %> +

<%= pgettext("terms", "Questions & Contact Information") %>

-

<%= pgettext("terms", "Questions or comments about the Service may be directed to us at %{contact}", %{contact: @instance_contact}) |> raw %>

-

<%= pgettext("terms", "This document is licensed under CC BY-SA. It was last updated June 22, 2020.") |> raw %>

-

<%= pgettext("terms", "Originally adapted from the Diaspora* and App.net privacy policies, also licensed under CC BY-SA.") |> raw %>

+

+ <%= pgettext( + "terms", + "Questions or comments about the Service may be directed to us at %{contact}", + %{contact: @instance_contact} + ) + |> raw %> +

+

+ <%= pgettext( + "terms", + "This document is licensed under CC BY-SA. It was last updated June 22, 2020." + ) + |> raw %> +

+

+ <%= pgettext( + "terms", + "Originally adapted from the Diaspora* and App.net privacy policies, also licensed under CC BY-SA." + ) + |> raw %> +

diff --git a/lib/web/templates/email/activity/_comment_activity_item.html.heex b/lib/web/templates/email/activity/_comment_activity_item.html.heex index 7b648bb46..26ac07c66 100644 --- a/lib/web/templates/email/activity/_comment_activity_item.html.heex +++ b/lib/web/templates/email/activity/_comment_activity_item.html.heex @@ -1,65 +1,48 @@ <%= case @activity.subject do %> - <% :event_comment_mention -> %> - <%= - dgettext("activity", "%{profile} mentionned you in a comment under event %{event}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - event: " URI.decode()}\"> + <% :event_comment_mention -> %> + <%= dgettext("activity", "%{profile} mentionned you in a comment under event %{event}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + event: " URI.decode()}\"> #{@activity.subject_params["event_title"]} " - } - ) |> raw %> - <% :participation_event_comment -> %> - <%= - dgettext("activity", "%{profile} has posted an announcement under event %{event}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - event: " URI.decode()}\"> + }) + |> raw %> + <% :participation_event_comment -> %> + <%= dgettext("activity", "%{profile} has posted an announcement under event %{event}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + event: " URI.decode()}\"> #{@activity.subject_params["event_title"]} " - } - ) |> raw %> - - <% :event_new_comment -> %> - <%= if @activity.subject_params["comment_reply_to"] do %> - <%= - dgettext("activity", "%{profile} has posted a new reply under your event %{event}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - event: " URI.decode()}#comment-#{@activity.subject_params["comment_reply_to_uuid"]}-#{@activity.subject_params["comment_uuid"]}\"> + }) + |> raw %> + <% :event_new_comment -> %> + <%= if @activity.subject_params["comment_reply_to"] do %> + <%= dgettext("activity", "%{profile} has posted a new reply under your event %{event}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + event: " URI.decode()}#comment-#{@activity.subject_params["comment_reply_to_uuid"]}-#{@activity.subject_params["comment_uuid"]}\"> #{@activity.subject_params["event_title"]} " - } - ) |> raw %> - <% else %> - <%= - dgettext("activity", "%{profile} has posted a new comment under your event %{event}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - event: " URI.decode()}#comment-#{@activity.subject_params["comment_uuid"]}\"> + }) + |> raw %> + <% else %> + <%= dgettext( + "activity", + "%{profile} has posted a new comment under your event %{event}.", + %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + event: " URI.decode()}#comment-#{@activity.subject_params["comment_uuid"]}\"> #{@activity.subject_params["event_title"]} " - } - ) |> raw %> - <% end %> -<% end %> \ No newline at end of file + } + ) + |> raw %> + <% end %> +<% end %> diff --git a/lib/web/templates/email/activity/_discussion_activity_item.html.heex b/lib/web/templates/email/activity/_discussion_activity_item.html.heex index 3a74f1168..36f011e24 100644 --- a/lib/web/templates/email/activity/_discussion_activity_item.html.heex +++ b/lib/web/templates/email/activity/_discussion_activity_item.html.heex @@ -1,66 +1,40 @@ <%= case @activity.subject do %> - <% :discussion_created -> %> - <%= - dgettext("activity", "%{profile} created the discussion %{discussion}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - discussion: " URI.decode()}\"> + <% :discussion_created -> %> + <%= dgettext("activity", "%{profile} created the discussion %{discussion}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + discussion: + " URI.decode()}\"> #{@activity.subject_params["discussion_title"]}" - } - ) |> raw %> - <% :discussion_replied -> %> - <%= - dgettext("activity", "%{profile} replied to the discussion %{discussion}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - discussion: " URI.decode()}\"> + }) + |> raw %> + <% :discussion_replied -> %> + <%= dgettext("activity", "%{profile} replied to the discussion %{discussion}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + discussion: + " URI.decode()}\"> #{@activity.subject_params["discussion_title"]}" - } - ) |> raw %> - <% :discussion_renamed -> %> - <%= - dgettext("activity", "%{profile} renamed the discussion %{discussion}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - discussion: " URI.decode()}\"> + }) + |> raw %> + <% :discussion_renamed -> %> + <%= dgettext("activity", "%{profile} renamed the discussion %{discussion}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + discussion: + " URI.decode()}\"> #{@activity.subject_params["discussion_title"]}" - } - ) |> raw %> - <% :discussion_archived -> %> - <%= - dgettext("activity", "%{profile} archived the discussion %{discussion}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - discussion: " URI.decode()}\"> + }) + |> raw %> + <% :discussion_archived -> %> + <%= dgettext("activity", "%{profile} archived the discussion %{discussion}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + discussion: + " URI.decode()}\"> #{@activity.subject_params["discussion_title"]}" - } - ) |> raw %> - <% :discussion_deleted -> %> - <%= - dgettext("activity", "%{profile} deleted the discussion %{discussion}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - discussion: "#{@activity.subject_params["discussion_title"]}" - } - ) |> raw %> -<% end %> \ No newline at end of file + }) + |> raw %> + <% :discussion_deleted -> %> + <%= dgettext("activity", "%{profile} deleted the discussion %{discussion}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + discussion: "#{@activity.subject_params["discussion_title"]}" + }) + |> raw %> +<% end %> diff --git a/lib/web/templates/email/activity/_event_activity_item.html.heex b/lib/web/templates/email/activity/_event_activity_item.html.heex index 5f32ab87b..9266fc6d0 100644 --- a/lib/web/templates/email/activity/_event_activity_item.html.heex +++ b/lib/web/templates/email/activity/_event_activity_item.html.heex @@ -1,72 +1,50 @@ <%= case @activity.subject do %> - <% :event_created -> %> - <%= - dgettext("activity", "The event %{event} was created by %{profile}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - event: " URI.decode()}\"> + <% :event_created -> %> + <%= dgettext("activity", "The event %{event} was created by %{profile}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + event: " URI.decode()}\"> #{@activity.subject_params["event_title"]} " - } - ) |> raw %> - <% :event_updated -> %> - <%= - dgettext("activity", "The event %{event} was updated by %{profile}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - event: " URI.decode()}\"> + }) + |> raw %> + <% :event_updated -> %> + <%= dgettext("activity", "The event %{event} was updated by %{profile}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + event: " URI.decode()}\"> #{@activity.subject_params["event_title"]} " - } - ) |> raw %> - <% :event_deleted -> %> - <%= - dgettext("activity", "The event %{event} was deleted by %{profile}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - event: "#{@activity.subject_params["event_title"]}" - } - ) |> raw %> - <% :comment_posted -> %> + }) + |> raw %> + <% :event_deleted -> %> + <%= dgettext("activity", "The event %{event} was deleted by %{profile}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + event: "#{@activity.subject_params["event_title"]}" + }) + |> raw %> + <% :comment_posted -> %> <%= if @activity.subject_params["comment_reply_to"] do %> - <%= - dgettext("activity", "%{profile} replied to a comment on the event %{event}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - event: " URI.decode()}\"> + <%= dgettext("activity", "%{profile} replied to a comment on the event %{event}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + event: " URI.decode()}\"> #{@activity.subject_params["event_title"]} " - } - ) |> raw %> + }) + |> raw %> <% else %> - <%= - dgettext("activity", "%{profile} posted a comment on the event %{event}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - event: " URI.decode()}\"> + <%= dgettext("activity", "%{profile} posted a comment on the event %{event}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + event: " URI.decode()}\"> #{@activity.subject_params["event_title"]} " - } - ) |> raw %> + }) + |> raw %> <% end %> -<% end %> \ No newline at end of file +<% end %> diff --git a/lib/web/templates/email/activity/_group_activity_item.html.heex b/lib/web/templates/email/activity/_group_activity_item.html.heex index bf4be4e8e..c428b4696 100644 --- a/lib/web/templates/email/activity/_group_activity_item.html.heex +++ b/lib/web/templates/email/activity/_group_activity_item.html.heex @@ -1,32 +1,22 @@ <%= case @activity.subject do %> - <% :group_created -> %> - <%= - dgettext("activity", "%{profile} created the group %{group}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - group: " URI.decode()}\"> + <% :group_created -> %> + <%= dgettext("activity", "%{profile} created the group %{group}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + group: " URI.decode()}\"> #{@activity.subject_params["group_name"]} " - } - ) |> raw %> - <% :group_updated -> %> - <%= - dgettext("activity", "%{profile} updated the group %{group}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - group: " URI.decode()}\"> + }) + |> raw %> + <% :group_updated -> %> + <%= dgettext("activity", "%{profile} updated the group %{group}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + group: " URI.decode()}\"> #{@activity.subject_params["group_name"]} " - } - ) |> raw %> -<% end %> \ No newline at end of file + }) + |> raw %> +<% end %> diff --git a/lib/web/templates/email/activity/_member_activity_item.html.heex b/lib/web/templates/email/activity/_member_activity_item.html.heex index c8641b19f..ae34bfdd8 100644 --- a/lib/web/templates/email/activity/_member_activity_item.html.heex +++ b/lib/web/templates/email/activity/_member_activity_item.html.heex @@ -1,69 +1,52 @@ <%= case @activity.subject do %> - <% :member_request -> %> - <%= - dgettext("activity", "%{member} requested to join the group.", - %{ - member: "#{@activity.subject_params["member_actor_name"]}", - } - ) |> raw %> - <% :member_invited -> %> - <%= - dgettext("activity", "%{member} was invited by %{profile}.", - %{ - member: "#{@activity.subject_params["member_actor_name"]}", - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - } - ) |> raw %> - <% :member_accepted_invitation -> %> - <%= - dgettext("activity", "%{member} accepted the invitation to join the group.", - %{ - member: "#{@activity.subject_params["member_actor_name"]}", - } - ) |> raw %> - <% :member_rejected_invitation -> %> - <%= - dgettext("activity", "%{member} rejected the invitation to join the group.", - %{ - member: "#{@activity.subject_params["member_actor_name"]}", - } - ) |> raw %> - <% :member_joined -> %> - <%= - dgettext("activity", "%{member} joined the group.", - %{ - member: "#{@activity.subject_params["member_actor_name"]}", - } - ) |> raw %> - <% :member_added -> %> - <%= - dgettext("activity", "%{profile} added the member %{member}.", - %{ - member: "#{@activity.subject_params["member_actor_name"]}", - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - } - ) |> raw %> - <% :member_updated -> %> - <%= - dgettext("activity", "%{profile} updated the member %{member}.", - %{ - member: "#{@activity.subject_params["member_actor_name"]}", - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - } - ) |> raw %> - <% :member_removed -> %> - <%= - dgettext("activity", "%{profile} excluded member %{member}.", - %{ - member: "#{@activity.subject_params["member_actor_name"]}", - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - } - ) |> raw %> - <% :member_quit -> %> - <%= - dgettext("activity", "%{profile} quit the group.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - } - ) |> raw %> -<% end %> \ No newline at end of file + <% :member_request -> %> + <%= dgettext("activity", "%{member} requested to join the group.", %{ + member: "#{@activity.subject_params["member_actor_name"]}" + }) + |> raw %> + <% :member_invited -> %> + <%= dgettext("activity", "%{member} was invited by %{profile}.", %{ + member: "#{@activity.subject_params["member_actor_name"]}", + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}" + }) + |> raw %> + <% :member_accepted_invitation -> %> + <%= dgettext("activity", "%{member} accepted the invitation to join the group.", %{ + member: "#{@activity.subject_params["member_actor_name"]}" + }) + |> raw %> + <% :member_rejected_invitation -> %> + <%= dgettext("activity", "%{member} rejected the invitation to join the group.", %{ + member: "#{@activity.subject_params["member_actor_name"]}" + }) + |> raw %> + <% :member_joined -> %> + <%= dgettext("activity", "%{member} joined the group.", %{ + member: + "#{@activity.subject_params["member_actor_name"]}" + }) + |> raw %> + <% :member_added -> %> + <%= dgettext("activity", "%{profile} added the member %{member}.", %{ + member: "#{@activity.subject_params["member_actor_name"]}", + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}" + }) + |> raw %> + <% :member_updated -> %> + <%= dgettext("activity", "%{profile} updated the member %{member}.", %{ + member: "#{@activity.subject_params["member_actor_name"]}", + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}" + }) + |> raw %> + <% :member_removed -> %> + <%= dgettext("activity", "%{profile} excluded member %{member}.", %{ + member: "#{@activity.subject_params["member_actor_name"]}", + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}" + }) + |> raw %> + <% :member_quit -> %> + <%= dgettext("activity", "%{profile} quit the group.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}" + }) + |> raw %> +<% end %> diff --git a/lib/web/templates/email/activity/_post_activity_item.html.heex b/lib/web/templates/email/activity/_post_activity_item.html.heex index 81733b4ab..1d4e9adc0 100644 --- a/lib/web/templates/email/activity/_post_activity_item.html.heex +++ b/lib/web/templates/email/activity/_post_activity_item.html.heex @@ -1,40 +1,28 @@ <%= case @activity.subject do %> - <% :post_created -> %> - <%= - dgettext("activity", "The post %{post} was created by %{profile}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - post: " URI.decode()}\"> + <% :post_created -> %> + <%= dgettext("activity", "The post %{post} was created by %{profile}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + post: " URI.decode()}\"> #{@activity.subject_params["post_title"]} " - } - ) |> raw %> - <% :post_updated -> %> - <%= - dgettext("activity", "The post %{post} was updated by %{profile}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - post: " URI.decode()}\"> + }) + |> raw %> + <% :post_updated -> %> + <%= dgettext("activity", "The post %{post} was updated by %{profile}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + post: " URI.decode()}\"> #{@activity.subject_params["post_title"]} " - } - ) |> raw %> - <% :post_deleted -> %> - <%= - dgettext("activity", "The post %{post} was deleted by %{profile}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - post: "#{@activity.subject_params["post_title"]}" - } - ) |> raw %> -<% end %> \ No newline at end of file + }) + |> raw %> + <% :post_deleted -> %> + <%= dgettext("activity", "The post %{post} was deleted by %{profile}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + post: "#{@activity.subject_params["post_title"]}" + }) + |> raw %> +<% end %> diff --git a/lib/web/templates/email/activity/_resource_activity_item.html.heex b/lib/web/templates/email/activity/_resource_activity_item.html.heex index 6a894c83a..955cb275b 100644 --- a/lib/web/templates/email/activity/_resource_activity_item.html.heex +++ b/lib/web/templates/email/activity/_resource_activity_item.html.heex @@ -1,118 +1,92 @@ <%= case @activity.subject do %> - <% :resource_created -> %> - <%= if @activity.subject_params["is_folder"] do %> - <%= - dgettext("activity", "%{profile} created the folder %{resource}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - resource: " URI.decode()}\"> + <% :resource_created -> %> + <%= if @activity.subject_params["is_folder"] do %> + <%= dgettext("activity", "%{profile} created the folder %{resource}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + resource: " URI.decode()}\"> #{@activity.subject_params["resource_title"]} " - } - ) |> raw %> - <% else %> - <%= - dgettext("activity", "%{profile} created the resource %{resource}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - resource: " URI.decode()}\"> + }) + |> raw %> + <% else %> + <%= dgettext("activity", "%{profile} created the resource %{resource}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + resource: " URI.decode()}\"> #{@activity.subject_params["resource_title"]} " - } - ) |> raw %> - <% end %> - <% :resource_renamed -> %> - <%= if @activity.subject_params["is_folder"] do %> - <%= - dgettext("activity", "%{profile} renamed the folder from %{old_resource_title} to %{resource}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - resource: " URI.decode()}\"> + }) + |> raw %> + <% end %> + <% :resource_renamed -> %> + <%= if @activity.subject_params["is_folder"] do %> + <%= dgettext( + "activity", + "%{profile} renamed the folder from %{old_resource_title} to %{resource}.", + %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + resource: " URI.decode()}\"> #{@activity.subject_params["resource_title"]} ", - old_resource_title: "#{@activity.subject_params["old_resource_title"]}" - } - ) |> raw %> - <% else %> - <%= - dgettext("activity", "%{profile} renamed the resource from %{old_resource_title} to %{resource}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - resource: " URI.decode()}\"> + old_resource_title: "#{@activity.subject_params["old_resource_title"]}" + } + ) + |> raw %> + <% else %> + <%= dgettext( + "activity", + "%{profile} renamed the resource from %{old_resource_title} to %{resource}.", + %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + resource: " URI.decode()}\"> #{@activity.subject_params["resource_title"]} ", - old_resource_title: "#{@activity.subject_params["old_resource_title"]}" - } - ) |> raw %> - <% end %> - <% :resource_moved -> %> - <%= if @activity.subject_params["is_folder"] do %> - <%= - dgettext("activity", "%{profile} moved the folder %{resource}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - resource: " URI.decode()}\"> + old_resource_title: "#{@activity.subject_params["old_resource_title"]}" + } + ) + |> raw %> + <% end %> + <% :resource_moved -> %> + <%= if @activity.subject_params["is_folder"] do %> + <%= dgettext("activity", "%{profile} moved the folder %{resource}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + resource: " URI.decode()}\"> #{@activity.subject_params["resource_title"]} " - } - ) |> raw %> - <% else %> - <%= - dgettext("activity", "%{profile} moved the resource %{resource}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - resource: " URI.decode()}\"> + }) + |> raw %> + <% else %> + <%= dgettext("activity", "%{profile} moved the resource %{resource}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + resource: " URI.decode()}\"> #{@activity.subject_params["resource_title"]} " - } - ) |> raw %> - <% end %> - <% :resource_deleted -> %> - <%= if @activity.subject_params["is_folder"] do %> - <%= - dgettext("activity", "%{profile} deleted the folder %{resource}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - resource: "#{@activity.subject_params["resource_title"]}" - } - ) |> raw %> - <% else %> - <%= - dgettext("activity", "%{profile} deleted the resource %{resource}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - resource: "#{@activity.subject_params["resource_title"]}" - } - ) |> raw %> - <% end %> -<% end %> \ No newline at end of file + }) + |> raw %> + <% end %> + <% :resource_deleted -> %> + <%= if @activity.subject_params["is_folder"] do %> + <%= dgettext("activity", "%{profile} deleted the folder %{resource}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + resource: "#{@activity.subject_params["resource_title"]}" + }) + |> raw %> + <% else %> + <%= dgettext("activity", "%{profile} deleted the resource %{resource}.", %{ + profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + resource: "#{@activity.subject_params["resource_title"]}" + }) + |> raw %> + <% end %> +<% end %> diff --git a/lib/web/templates/email/actor_suspension_participants.html.heex b/lib/web/templates/email/actor_suspension_participants.html.heex index 62dbea5ae..62f055725 100644 --- a/lib/web/templates/email/actor_suspension_participants.html.heex +++ b/lib/web/templates/email/actor_suspension_participants.html.heex @@ -6,11 +6,19 @@ - +
- @@ -30,12 +38,25 @@
+

- <%= gettext "Your participation to %{event} on %{instance} has been cancelled!", event: @event.title, instance: @instance_name %> + <%= gettext("Your participation to %{event} on %{instance} has been cancelled!", + event: @event.title, + instance: @instance_name + ) %>

- +
- diff --git a/lib/web/templates/email/admin/_role.html.heex b/lib/web/templates/email/admin/_role.html.heex index 67d1a8f95..d13bfbf50 100644 --- a/lib/web/templates/email/admin/_role.html.heex +++ b/lib/web/templates/email/admin/_role.html.heex @@ -1,8 +1,8 @@ <%= case @role do %> - <% :administrator -> %> - <%= gettext "Administrator" %> - <% :moderator -> %> - <%= gettext "Moderator" %> - <% :user -> %> - <%= gettext "User" %> -<% end %> \ No newline at end of file + <% :administrator -> %> + <%= gettext("Administrator") %> + <% :moderator -> %> + <%= gettext("Moderator") %> + <% :user -> %> + <%= gettext("User") %> +<% end %> diff --git a/lib/web/templates/email/admin_user_confirmation.html.heex b/lib/web/templates/email/admin_user_confirmation.html.heex index 6f94a5129..80ff98dcb 100644 --- a/lib/web/templates/email/admin_user_confirmation.html.heex +++ b/lib/web/templates/email/admin_user_confirmation.html.heex @@ -6,11 +6,16 @@
+

- <%= gettext "Your instance's moderation team has decided to suspend %{actor_name} (%{actor_address}). All of their events have been removed and your participation to event %{event} cancelled.", actor_name: @actor.name || @actor.preferred_username, event: @event.title, actor_address: if @actor.domain, do: "@#{@actor.preferred_username}@#{@actor.domain}", else: "@#{@actor.preferred_username}" %> + <%= gettext( + "Your instance's moderation team has decided to suspend %{actor_name} (%{actor_address}). All of their events have been removed and your participation to event %{event} cancelled.", + actor_name: @actor.name || @actor.preferred_username, + event: @event.title, + actor_address: + if(@actor.domain, + do: "@#{@actor.preferred_username}@#{@actor.domain}", + else: "@#{@actor.preferred_username}" + ) + ) %>

- +
- @@ -30,17 +35,29 @@
+

- <%= gettext "An administrator manually confirmed your account" %> + <%= gettext("An administrator manually confirmed your account") %>

- +
- -
+

- <%= gettext("Hi there! We just wanted to inform you that an administrator from %{instance} just manually confirmed your account.", %{instance: @instance_name}) |> raw %> + <%= gettext( + "Hi there! We just wanted to inform you that an administrator from %{instance} just manually confirmed your account.", + %{instance: @instance_name} + ) + |> raw %>

+

<%= gettext("You may now login using your credentials on the service.") %>

@@ -54,8 +71,12 @@ @@ -66,9 +87,20 @@ - diff --git a/lib/web/templates/email/admin_user_email_changed_new.html.heex b/lib/web/templates/email/admin_user_email_changed_new.html.heex index 674e13976..97a7b476a 100644 --- a/lib/web/templates/email/admin_user_email_changed_new.html.heex +++ b/lib/web/templates/email/admin_user_email_changed_new.html.heex @@ -6,11 +6,16 @@
- - <%= gettext "Login on %{instance}", %{instance: @instance_name} %> + + <%= gettext("Login on %{instance}", %{instance: @instance_name}) %>
+

- <%= gettext("If something doesn't feel right to you, please contact the instance administrator through the contact methods %{start_link}on the instance's about page%{end_link}.", %{start_link: "", end_link: ""}) |> raw %> + <%= gettext( + "If something doesn't feel right to you, please contact the instance administrator through the contact methods %{start_link}on the instance's about page%{end_link}.", + %{ + start_link: "", + end_link: "" + } + ) + |> raw %>

- +
- @@ -30,19 +35,38 @@
+

- <%= gettext "An administrator manually changed the email attached to your account" %> + <%= gettext("An administrator manually changed the email attached to your account") %>

- +
- - diff --git a/lib/web/templates/email/admin_user_email_changed_old.html.heex b/lib/web/templates/email/admin_user_email_changed_old.html.heex index 9eaf23f83..513b4779b 100644 --- a/lib/web/templates/email/admin_user_email_changed_old.html.heex +++ b/lib/web/templates/email/admin_user_email_changed_old.html.heex @@ -6,11 +6,16 @@
+

- <%= gettext("Hi there! We just wanted to inform you that an administrator from %{instance} just manually changed your account email from %{old_email} to %{new_email} (this one).", %{instance: @instance_name, old_email: @old_email, new_email: @new_email}) |> raw %> + <%= gettext( + "Hi there! We just wanted to inform you that an administrator from %{instance} just manually changed your account email from %{old_email} to %{new_email} (this one).", + %{instance: @instance_name, old_email: @old_email, new_email: @new_email} + ) + |> raw %>

+

- <%= gettext("If something doesn't feel right to you, please contact the instance administrator through the contact methods %{start_link}on the instance's about page%{end_link}.", %{start_link: "", end_link: ""}) |> raw %> + <%= gettext( + "If something doesn't feel right to you, please contact the instance administrator through the contact methods %{start_link}on the instance's about page%{end_link}.", + %{ + start_link: "", + end_link: "" + } + ) + |> raw %>

- +
- @@ -30,19 +35,38 @@
+

- <%= gettext "An administrator manually changed the email attached to your account" %> + <%= gettext("An administrator manually changed the email attached to your account") %>

- +
- - diff --git a/lib/web/templates/email/admin_user_role_changed.html.heex b/lib/web/templates/email/admin_user_role_changed.html.heex index f273be2c6..5dfcb85b1 100644 --- a/lib/web/templates/email/admin_user_role_changed.html.heex +++ b/lib/web/templates/email/admin_user_role_changed.html.heex @@ -6,11 +6,16 @@
+

- <%= gettext("Hi there! We just wanted to inform you that an administrator from %{instance} just manually changed your account email from %{old_email} (this one) to %{new_email}.", %{instance: @instance_name, old_email: @old_email, new_email: @new_email}) |> raw %> + <%= gettext( + "Hi there! We just wanted to inform you that an administrator from %{instance} just manually changed your account email from %{old_email} (this one) to %{new_email}.", + %{instance: @instance_name, old_email: @old_email, new_email: @new_email} + ) + |> raw %>

+

- <%= gettext("If something doesn't feel right to you, please contact the instance administrator through the contact methods %{start_link}on the instance's about page%{end_link}.", %{start_link: "", end_link: ""}) |> raw %> + <%= gettext( + "If something doesn't feel right to you, please contact the instance administrator through the contact methods %{start_link}on the instance's about page%{end_link}.", + %{ + start_link: "", + end_link: "" + } + ) + |> raw %>

- +
- @@ -30,21 +35,33 @@
+

- <%= gettext "An administrator changed your role" %> + <%= gettext("An administrator changed your role") %>

- +
- -
+

- <%= gettext("Hi there! We just wanted to inform you that an administrator from %{instance} just changed your account role.", %{instance: @instance_name}) |> raw %> + <%= gettext( + "Hi there! We just wanted to inform you that an administrator from %{instance} just changed your account role.", + %{instance: @instance_name} + ) + |> raw %>

+ - diff --git a/lib/web/templates/email/anonymous_participation_confirmation.html.heex b/lib/web/templates/email/anonymous_participation_confirmation.html.heex index 07ad8ae6a..8f13ea212 100644 --- a/lib/web/templates/email/anonymous_participation_confirmation.html.heex +++ b/lib/web/templates/email/anonymous_participation_confirmation.html.heex @@ -6,11 +6,16 @@
- <%= gettext "Old role" %> + <%= gettext("Old role") %> <%= render("admin/_role.html", role: @old_role) %> @@ -52,7 +69,7 @@
- <%= gettext "New role" %> + <%= gettext("New role") %> <%= render("admin/_role.html", role: @new_role) %> @@ -62,9 +79,20 @@
+

- <%= gettext("If something doesn't feel right to you, please contact the instance administrator through the contact methods %{start_link}on the instance's about page%{end_link}.", %{start_link: "", end_link: ""}) |> raw %> + <%= gettext( + "If something doesn't feel right to you, please contact the instance administrator through the contact methods %{start_link}on the instance's about page%{end_link}.", + %{ + start_link: "", + end_link: "" + } + ) + |> raw %>

- +
- @@ -30,12 +35,20 @@
+

- <%= gettext "Confirm your e-mail" %> + <%= gettext("Confirm your e-mail") %>

- +
- @@ -47,9 +60,17 @@ @@ -58,16 +79,28 @@ - - diff --git a/lib/web/templates/email/before_event_notification.html.heex b/lib/web/templates/email/before_event_notification.html.heex index 0c37dc2c0..1013b4c12 100644 --- a/lib/web/templates/email/before_event_notification.html.heex +++ b/lib/web/templates/email/before_event_notification.html.heex @@ -6,11 +6,16 @@
+

- <%= gettext("Hi there! You just registered to join this event: « %{title} ». Please confirm the e-mail address you provided:", title: @participant.event.title) |> raw %> + <%= gettext( + "Hi there! You just registered to join this event: « %{title} ». Please confirm the e-mail address you provided:", + title: @participant.event.title + ) + |> raw %>

- +
- <%= gettext "Confirm my e-mail address" %> - + + <%= gettext("Confirm my e-mail address") %> + +
+

- <%= ngettext "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", 1 %> + <%= ngettext( + "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", + "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", + 1 + ) %>

+

- <%= gettext "If you didn't trigger this email, you may safely ignore it." %> + <%= gettext("If you didn't trigger this email, you may safely ignore it.") %>

- +
- @@ -30,12 +35,16 @@
+

- <%= gettext "An event is upcoming!" %> + <%= gettext("An event is upcoming!") %>

- +
- @@ -47,9 +56,17 @@ @@ -58,9 +75,15 @@ - diff --git a/lib/web/templates/email/date/event_tz_date.html.heex b/lib/web/templates/email/date/event_tz_date.html.heex index 95970b390..679f6f66a 100644 --- a/lib/web/templates/email/date/event_tz_date.html.heex +++ b/lib/web/templates/email/date/event_tz_date.html.heex @@ -1,8 +1,21 @@ <%= if @event.options.timezone == nil do %> - <%= @date |> datetime_tz_convert(@timezone) |> datetime_to_string(@locale , :short) %> + <%= @date |> datetime_tz_convert(@timezone) |> datetime_to_string(@locale, :short) %> <% else %> - <%= @date |> datetime_tz_convert(@event.options.timezone) |> datetime_to_string(@locale, :short) %>
+ + <%= @date + |> datetime_tz_convert(@event.options.timezone) + |> datetime_to_string(@locale, :short) %> + +
<%= if @event.options.timezone != @timezone do %> - <%= gettext "🌐 %{timezone} %{offset}", timezone: @event.options.timezone, offset: @date |> datetime_tz_convert(@event.options.timezone) |> Cldr.DateTime.Formatter.zone_gmt() %> + + <%= gettext("🌐 %{timezone} %{offset}", + timezone: @event.options.timezone, + offset: + @date + |> datetime_tz_convert(@event.options.timezone) + |> Cldr.DateTime.Formatter.zone_gmt() + ) %> + <% end %> <% end %> diff --git a/lib/web/templates/email/date/event_tz_date_range.html.heex b/lib/web/templates/email/date/event_tz_date_range.html.heex index d76e9abff..c5a22096a 100644 --- a/lib/web/templates/email/date/event_tz_date_range.html.heex +++ b/lib/web/templates/email/date/event_tz_date_range.html.heex @@ -1,14 +1,42 @@ <%= cond do %> - <%= @end_date == nil -> %> - <%= render("date/event_tz_date.html", date: @start_date, event: @event, timezone: @timezone, locale: @locale) %> + <% @end_date == nil -> %> + <%= render("date/event_tz_date.html", + date: @start_date, + event: @event, + timezone: @timezone, + locale: @locale + ) %> <% is_same_day?(@start_date, @end_date) -> %> - <%= gettext "On %{date} from %{start_time} to %{end_time}", date: datetime_to_date_string(@start_date, @locale), start_time: datetime_to_time_string(@start_date, @locale), end_time: datetime_to_time_string(@end_date, @locale) %>
- <%= if @event.options.timezone != @timezone do %> - <%= gettext "🌐 %{timezone} %{offset}", timezone: @event.options.timezone, offset: Cldr.DateTime.Formatter.zone_gmt(@start_date) %> - <% end %> + + <%= gettext("On %{date} from %{start_time} to %{end_time}", + date: datetime_to_date_string(@start_date, @locale), + start_time: datetime_to_time_string(@start_date, @locale), + end_time: datetime_to_time_string(@end_date, @locale) + ) %> + +
+ <%= if @event.options.timezone != @timezone do %> + + <%= gettext("🌐 %{timezone} %{offset}", + timezone: @event.options.timezone, + offset: Cldr.DateTime.Formatter.zone_gmt(@start_date) + ) %> + + <% end %> <% true -> %> - <%= gettext "From the %{start} to the %{end}", start: datetime_to_string(@start_date, @locale, :short), end: datetime_to_string(@end_date, @locale, :short) %>
- <%= if @event.options.timezone != @timezone do %> - <%= gettext "🌐 %{timezone} %{offset}", timezone: @event.options.timezone, offset: Cldr.DateTime.Formatter.zone_gmt(@start_date) %> - <% end %> + + <%= gettext("From the %{start} to the %{end}", + start: datetime_to_string(@start_date, @locale, :short), + end: datetime_to_string(@end_date, @locale, :short) + ) %> + +
+ <%= if @event.options.timezone != @timezone do %> + + <%= gettext("🌐 %{timezone} %{offset}", + timezone: @event.options.timezone, + offset: Cldr.DateTime.Formatter.zone_gmt(@start_date) + ) %> + + <% end %> <% end %> diff --git a/lib/web/templates/email/email.html.heex b/lib/web/templates/email/email.html.heex index 789baa6f5..d8b34772e 100644 --- a/lib/web/templates/email/email.html.heex +++ b/lib/web/templates/email/email.html.heex @@ -1,22 +1,22 @@ - +<%= @subject %> - + @@ -54,11 +54,18 @@
+

- <%= gettext "Get ready for %{title}", title: @participant.event.title %> + <%= gettext("Get ready for %{title}", title: @participant.event.title) %>

- +
- <%= gettext "Go to event page" %> - + + <%= gettext("Go to event page") %> + +
+

- <%= gettext "If you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button." %> + <%= gettext( + "If you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button." + ) %>

- +
@@ -80,16 +87,30 @@
- - {"#{ + + {"#{@instance_name}"}
- +
-
+

- <%= gettext "Warning" %> + <%= gettext("Warning") %>

-
-

<%= gettext "This is a demonstration site to test Mobilizon." %>

-

<%= gettext("Please do not use it for real purposes.") |> raw() %>

+
+

+ <%= gettext("This is a demonstration site to test Mobilizon.") %> +

+

+ <%= gettext("Please do not use it for real purposes.") |> raw() %> +

@@ -109,16 +130,26 @@
- +
-
+

- <%= gettext "Need help? Is something not working as expected?" %> + <%= gettext("Need help? Is something not working as expected?") %>

-

- <%= gettext "Ask the community on Framacolibri" %> -

+

+ + <%= gettext("Ask the community on Framacolibri") %> + +

@@ -137,10 +168,14 @@
- +
- diff --git a/lib/web/templates/email/email_anonymous_activity.html.heex b/lib/web/templates/email/email_anonymous_activity.html.heex index 411e777cb..00fed2939 100644 --- a/lib/web/templates/email/email_anonymous_activity.html.heex +++ b/lib/web/templates/email/email_anonymous_activity.html.heex @@ -6,9 +6,14 @@
+ <%= if @offer_unsupscription do %>

@@ -149,8 +184,14 @@

<% end %>

- <%= gettext("%{instance} is powered by Mobilizon.", instance: @instance_name) |> raw %>
-
<%= gettext "Learn more about Mobilizon here!" %> + <%= gettext("%{instance} is powered by Mobilizon.", + instance: @instance_name + ) + |> raw %> +
+ + <%= gettext("Learn more about Mobilizon here!") %> +

- +
-
+

<%= @subject %>

@@ -30,27 +35,30 @@
- +
diff --git a/lib/web/templates/email/email_changed_new.html.heex b/lib/web/templates/email/email_changed_new.html.heex index 86613762a..0baf06d15 100644 --- a/lib/web/templates/email/email_changed_new.html.heex +++ b/lib/web/templates/email/email_changed_new.html.heex @@ -6,11 +6,16 @@
-
- <%= - dgettext("activity", "%{profile} has posted an announcement under event %{event}.", - %{ - profile: "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", - event: " URI.decode()}\"> + + <%= dgettext( + "activity", + "%{profile} has posted an announcement under event %{event}.", + %{ + profile: + "#{Mobilizon.Actors.Actor.display_name_and_username(@activity.author)}", + event: " URI.decode()}\"> #{@activity.subject_params["event_title"]} " - } - ) |> raw %> + } + ) + |> raw %>
@@ -63,9 +71,17 @@
- +
- <%= gettext "Visit event page" %> - + + <%= gettext("Visit event page") %> + +
- +
- @@ -30,12 +35,20 @@
+

- <%= gettext "Confirm new email" %> + <%= gettext("Confirm new email") %>

- +
- @@ -47,8 +60,14 @@
+

- <%= gettext("Hi there! It seems like you wanted to change the email address linked to your account on %{instance}. If you still wish to do so, please click the button below to confirm the change. You will then be able to log in to %{instance} with this new email address.", %{instance: @instance_name}) |> raw %> + <%= gettext( + "Hi there! It seems like you wanted to change the email address linked to your account on %{instance}. If you still wish to do so, please click the button below to confirm the change. You will then be able to log in to %{instance} with this new email address.", + %{instance: @instance_name} + ) + |> raw %>

@@ -59,9 +78,13 @@ - diff --git a/lib/web/templates/email/email_changed_old.html.heex b/lib/web/templates/email/email_changed_old.html.heex index 164155a46..55b578f18 100644 --- a/lib/web/templates/email/email_changed_old.html.heex +++ b/lib/web/templates/email/email_changed_old.html.heex @@ -6,11 +6,16 @@
- - <%= gettext "Verify your email address" %> + + <%= gettext("Verify your email address") %>
+

- <%= gettext "If you didn't trigger the change yourself, please ignore this message." %> + <%= gettext("If you didn't trigger the change yourself, please ignore this message.") %>

- +
- @@ -30,12 +35,20 @@
+

- <%= gettext "New email confirmation" %> + <%= gettext("New email confirmation") %>

- +
- @@ -57,9 +70,16 @@ - diff --git a/lib/web/templates/email/email_direct_activity.html.heex b/lib/web/templates/email/email_direct_activity.html.heex index 82b472c25..c979e680f 100644 --- a/lib/web/templates/email/email_direct_activity.html.heex +++ b/lib/web/templates/email/email_direct_activity.html.heex @@ -6,9 +6,14 @@
+

- <%= gettext("The email address for your account on %{host} is being changed to:", host: @instance_name) |> raw %> + <%= gettext( + "The email address for your account on %{host} is being changed to:", + host: @instance_name + ) + |> raw %>

+

- <%= gettext("If you did not trigger this change yourself, it is likely that someone has gained access to your %{host} account. Please log in and change your password immediately. If you cannot login, contact the admin on %{host}.", host: @instance_name) %> + <%= gettext( + "If you did not trigger this change yourself, it is likely that someone has gained access to your %{host} account. Please log in and change your password immediately. If you cannot login, contact the admin on %{host}.", + host: @instance_name + ) %>

- +
-
+

<%= @subject %>

@@ -30,10 +35,14 @@
- +
- @@ -52,96 +71,167 @@ @@ -150,9 +240,21 @@ - diff --git a/lib/web/templates/email/event_group_follower_notification.html.heex b/lib/web/templates/email/event_group_follower_notification.html.heex index 5c941e28e..6feabd81e 100644 --- a/lib/web/templates/email/event_group_follower_notification.html.heex +++ b/lib/web/templates/email/event_group_follower_notification.html.heex @@ -6,11 +6,18 @@
+

<%= case @recap do %> <% :one_day -> %> @@ -41,9 +50,19 @@ <% :one_week -> %> <% dgettext("activity", "Here's your weekly activity recap") %> <% :one_hour -> %> - <%= dngettext("activity", "There has been an activity!", "There has been some activity!", @total_number_activities) %> + <%= dngettext( + "activity", + "There has been an activity!", + "There has been some activity!", + @total_number_activities + ) %> <% false -> %> - <%= dngettext("activity", "There has been an activity!", "There has been some activity!", @total_number_activities) %> + <%= dngettext( + "activity", + "There has been an activity!", + "There has been some activity!", + @total_number_activities + ) %> <% end %>

- + +
+
<% end %> - - <%= if length(group_activities) > 5 do %> - - - - -
- - - - -
- URI.decode() }/timeline"} target="_blank" style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"> - <%= dngettext "activity", "View one more activity", "View %{count} more activities", length(group_activities) - 5, %{count: length(group_activities) - 5} %> - -
-
- <% end %> - +
    + <%= for activity <- Enum.take(group_activities, 5) do %> +
  • +

    + <%= case activity.type do %> + <% :discussion -> %> + <%= render("activity/_discussion_activity_item.html", + activity: activity + ) %> + <% :event -> %> + <%= render("activity/_event_activity_item.html", + activity: activity + ) %> + <% :group -> %> + <%= render("activity/_group_activity_item.html", + activity: activity + ) %> + <% :member -> %> + <%= render("activity/_member_activity_item.html", + activity: activity + ) %> + <% :post -> %> + <%= render("activity/_post_activity_item.html", + activity: activity + ) %> + <% :resource -> %> + <%= render("activity/_resource_activity_item.html", + activity: activity + ) %> + <% :comment -> %> + <%= render("activity/_comment_activity_item.html", + activity: activity + ) %> + <% end %> +

    + <%= unless @single_activity do %> + + <%= datetime_to_string(activity.inserted_at, @locale, :short) %> + + <% end %> +
  • + <% end %> +
+ <%= if length(group_activities) > 5 do %> + + + + +
+ + + + +
+ URI.decode()}/timeline" + } + target="_blank" + style="font-size: 20px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;" + > + <%= dngettext( + "activity", + "View one more activity", + "View %{count} more activities", + length(group_activities) - 5, + %{count: length(group_activities) - 5} + ) %> + +
+
+ <% end %> + <% end %>
+

- <%= dgettext("activity", "Don't want to receive activity notifications? You may change frequency or disable them in %{tag_start}your settings%{tag_end}.", %{tag_start: "", tag_end: ""}) |> raw %> + <%= dgettext( + "activity", + "Don't want to receive activity notifications? You may change frequency or disable them in %{tag_start}your settings%{tag_end}.", + %{ + tag_start: "", + tag_end: "" + } + ) + |> raw %>

- +
- @@ -30,11 +37,20 @@
+

- <%= gettext "%{group} scheduled a new event", group: Mobilizon.Actors.Actor.display_name(@group) %> + <%= gettext("%{group} scheduled a new event", + group: Mobilizon.Actors.Actor.display_name(@group) + ) %>

- +
-
- <%= render("participation/event_card.html", event: @event, timezone: @timezone, locale: @locale, action: "event") %> + + <%= render("participation/event_card.html", + event: @event, + timezone: @timezone, + locale: @locale, + action: "event" + ) %>
diff --git a/lib/web/templates/email/event_participation_approved.html.heex b/lib/web/templates/email/event_participation_approved.html.heex index e3b578b2c..06b00b895 100644 --- a/lib/web/templates/email/event_participation_approved.html.heex +++ b/lib/web/templates/email/event_participation_approved.html.heex @@ -6,11 +6,16 @@
- +
- @@ -30,19 +35,30 @@
+

- <%= gettext "You're going!" %> + <%= gettext("You're going!") %>

- +
- - @@ -54,9 +70,15 @@ @@ -65,9 +87,15 @@ - diff --git a/lib/web/templates/email/event_participation_confirmed.html.heex b/lib/web/templates/email/event_participation_confirmed.html.heex index 41fd6ba0e..26e0f623d 100644 --- a/lib/web/templates/email/event_participation_confirmed.html.heex +++ b/lib/web/templates/email/event_participation_confirmed.html.heex @@ -6,11 +6,16 @@
+

- <%= gettext("You recently requested to attend %{title}.", title: @event.title) |> raw %> + <%= gettext("You recently requested to attend %{title}.", title: @event.title) + |> raw %>

+

- <%= gettext "Good news: one of the event organizers just approved your request. Update your calendar, because you're on the guest list now!" %> + <%= gettext( + "Good news: one of the event organizers just approved your request. Update your calendar, because you're on the guest list now!" + ) %>

- +
- <%= gettext "Visit event page" %> - + + <%= gettext("Visit event page") %> + +
+

- <%= gettext "Would you wish to update or cancel your attendance, simply access the event page through the link above and click on the Attending button." %> + <%= gettext( + "Would you wish to update or cancel your attendance, simply access the event page through the link above and click on the Attending button." + ) %>

- +
- @@ -30,19 +35,30 @@
+

- <%= gettext "You're going!" %> + <%= gettext("You're going!") %>

- +
- - @@ -54,9 +70,15 @@ @@ -65,9 +87,15 @@ - diff --git a/lib/web/templates/email/event_participation_rejected.html.heex b/lib/web/templates/email/event_participation_rejected.html.heex index 53e2e9695..44e503948 100644 --- a/lib/web/templates/email/event_participation_rejected.html.heex +++ b/lib/web/templates/email/event_participation_rejected.html.heex @@ -6,11 +6,16 @@
+

- <%= gettext("You recently requested to attend %{title}.", title: @event.title) |> raw %> + <%= gettext("You recently requested to attend %{title}.", title: @event.title) + |> raw %>

+

- <%= gettext "You have now confirmed your participation. Update your calendar, because you're on the guest list now!" %> + <%= gettext( + "You have now confirmed your participation. Update your calendar, because you're on the guest list now!" + ) %>

- +
- <%= gettext "Visit event page" %> - + + <%= gettext("Visit event page") %> + +
+

- <%= gettext "Would you wish to update or cancel your attendance, simply access the event page through the link above and click on the Attending button." %> + <%= gettext( + "Would you wish to update or cancel your attendance, simply access the event page through the link above and click on the Attending button." + ) %>

- +
- @@ -30,19 +35,28 @@
+

- <%= gettext "Sorry! You're not going." %> + <%= gettext("Sorry! You're not going.") %>

- +
- - diff --git a/lib/web/templates/email/event_updated.html.heex b/lib/web/templates/email/event_updated.html.heex index ef2cf54e1..5b11f8166 100644 --- a/lib/web/templates/email/event_updated.html.heex +++ b/lib/web/templates/email/event_updated.html.heex @@ -6,11 +6,16 @@
+

- <%= gettext("You issued a request to attend %{title}.", title: @event.title) |> raw %> + <%= gettext("You issued a request to attend %{title}.", title: @event.title) + |> raw %>

+

- <%= gettext "Unfortunately, the organizers rejected your request." %> + <%= gettext("Unfortunately, the organizers rejected your request.") %>

- +
- @@ -30,29 +35,43 @@
+

- <%= gettext "Event update!" %> + <%= gettext("Event update!") %>

- +
- -
+

- <%= gettext("There have been changes for %{title} so we'd thought we'd let you know.", title: @old_event.title) |> raw %> + <%= gettext( + "There have been changes for %{title} so we'd thought we'd let you know.", + title: @old_event.title + ) + |> raw %>

+ <%= if MapSet.member?(@changes, :status) do %> @@ -61,7 +80,7 @@ <%= if MapSet.member?(@changes, :title) do %> <% end %> <%= if MapSet.member?(@changes, :ends_on) && !is_nil(@event.ends_on) do %> <% end %> <%= if MapSet.member?(@changes, :physical_address) do %> <%= unless is_nil(@event.physical_address) do %> <% else %> <% end %> @@ -117,9 +146,15 @@ @@ -128,9 +163,17 @@ - diff --git a/lib/web/templates/email/group_invite.html.heex b/lib/web/templates/email/group_invite.html.heex index d65966423..68ccbfa83 100644 --- a/lib/web/templates/email/group_invite.html.heex +++ b/lib/web/templates/email/group_invite.html.heex @@ -6,11 +6,16 @@
- <%= case @event.status do %> + <%= case @event.status do %> <% :confirmed -> %> - <%= gettext "This event has been confirmed" %> + <%= gettext("This event has been confirmed") %> <% :tentative -> %> - <%= gettext "This event has yet to be confirmed: organizers will let you know if they do confirm it." %> + <%= gettext( + "This event has yet to be confirmed: organizers will let you know if they do confirm it." + ) %> <% :cancelled -> %> - <%= gettext "This event has been cancelled by its organizers. Sorry!" %> + <%= gettext("This event has been cancelled by its organizers. Sorry!") %> <% end %>
- <%= gettext "Event title" %> + <%= gettext("Event title") %> <%= @event.title %> @@ -71,27 +90,37 @@ <%= if MapSet.member?(@changes, :begins_on) do %>
- <%= gettext "Start" %> + <%= gettext("Start") %> - <%= render("date/event_tz_date.html", event: @event, date: @event.begins_on, timezone: @timezone, locale: @locale) %> + <%= render("date/event_tz_date.html", + event: @event, + date: @event.begins_on, + timezone: @timezone, + locale: @locale + ) %>
- <%= gettext "End" %> + <%= gettext("End") %> - <%= render("date/event_tz_date.html", event: @event, date: @event.ends_on, timezone: @timezone, locale: @locale) %> + <%= render("date/event_tz_date.html", + event: @event, + date: @event.ends_on, + timezone: @timezone, + locale: @locale + ) %>
- <%= gettext "Location" %> + <%= gettext("Location") %> @@ -101,7 +130,7 @@ - <%= gettext "Location address was removed" %> + <%= gettext("Location address was removed") %>
- +
- <%= gettext "Visit the updated event page" %> - + + <%= gettext("Visit the updated event page") %> + +
+

- <%= ngettext "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", 1 %> + <%= ngettext( + "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", + "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", + 1 + ) %>

- +
- @@ -30,19 +35,34 @@
+

- <%= gettext "Come along!" %> + <%= gettext("Come along!") %>

- +
- - @@ -55,8 +75,12 @@
+

- <%= gettext("%{inviter} just invited you to join their group %{link_start}%{group}%{link_end}", group: @group.name, inviter: @inviter.name, link_start: "", link_end: "") |> raw %> + <%= gettext( + "%{inviter} just invited you to join their group %{link_start}%{group}%{link_end}", + group: @group.name, + inviter: @inviter.name, + link_start: "", + link_end: "" + ) + |> raw %>

+

- <%= gettext "To accept this invitation, head over to your groups." %> + <%= gettext("To accept this invitation, head over to your groups.") %>

diff --git a/lib/web/templates/email/group_member_removal.html.heex b/lib/web/templates/email/group_member_removal.html.heex index 1c0574df3..88f09d106 100644 --- a/lib/web/templates/email/group_member_removal.html.heex +++ b/lib/web/templates/email/group_member_removal.html.heex @@ -6,11 +6,16 @@
- - <%= gettext "See my groups" %> + + <%= gettext("See my groups") %>
- +
- @@ -30,19 +35,35 @@
+

- <%= gettext "So long, and thanks for the fish!" %> + <%= gettext("So long, and thanks for the fish!") %>

- +
- - diff --git a/lib/web/templates/email/group_membership_approval.html.heex b/lib/web/templates/email/group_membership_approval.html.heex index a45c8f8bf..aafa72415 100644 --- a/lib/web/templates/email/group_membership_approval.html.heex +++ b/lib/web/templates/email/group_membership_approval.html.heex @@ -6,11 +6,16 @@
+

- <%= gettext("You have been removed from group %{link_start}%{group}%{link_end}. You will not be able to access this group's private content anymore.", group: @group.name, link_start: "", link_end: "") |> raw %> + <%= gettext( + "You have been removed from group %{link_start}%{group}%{link_end}. You will not be able to access this group's private content anymore.", + group: @group.name, + link_start: "", + link_end: "" + ) + |> raw %>

+

- <%= gettext "If you feel this is an error, you may contact the group's administrators so that they can add you back." %> + <%= gettext( + "If you feel this is an error, you may contact the group's administrators so that they can add you back." + ) %>

- +
- @@ -30,12 +35,23 @@
+

- <%= gettext "You're in!" %> + <%= gettext("You're in!") %>

- +
- @@ -48,8 +64,14 @@
+

- <%= gettext("Your membership request for group %{link_start}%{group}%{link_end} has been approved.", group: Mobilizon.Actors.Actor.display_name(@group), link_start: "", link_end: "") |> raw %> + <%= gettext( + "Your membership request for group %{link_start}%{group}%{link_end} has been approved.", + group: Mobilizon.Actors.Actor.display_name(@group), + link_start: + "", + link_end: "" + ) + |> raw %>

diff --git a/lib/web/templates/email/group_membership_rejection.html.heex b/lib/web/templates/email/group_membership_rejection.html.heex index a818a1296..565e3bea3 100644 --- a/lib/web/templates/email/group_membership_rejection.html.heex +++ b/lib/web/templates/email/group_membership_rejection.html.heex @@ -6,11 +6,16 @@
- - <%= gettext "View the group" %> + + <%= gettext("View the group") %>
- +
- @@ -30,12 +35,23 @@
+

- <%= gettext "Sorry, not this time!" %> + <%= gettext("Sorry, not this time!") %>

- +
- diff --git a/lib/web/templates/email/group_suspension.html.heex b/lib/web/templates/email/group_suspension.html.heex index 8c5ced29d..7524bd584 100644 --- a/lib/web/templates/email/group_suspension.html.heex +++ b/lib/web/templates/email/group_suspension.html.heex @@ -6,11 +6,19 @@
+

- <%= gettext("Your membership request for group %{link_start}%{group}%{link_end} has been rejected.", group: Mobilizon.Actors.Actor.display_name(@group), link_start: "", link_end: "") |> raw %> + <%= gettext( + "Your membership request for group %{link_start}%{group}%{link_end} has been rejected.", + group: Mobilizon.Actors.Actor.display_name(@group), + link_start: + "", + link_end: "" + ) + |> raw %>

- +
- @@ -30,28 +38,53 @@
+

- <%= gettext "The group %{group} has been suspended on %{instance}!", group: (@group.name || @group.preferred_username), instance: @instance_name %> + <%= gettext("The group %{group} has been suspended on %{instance}!", + group: @group.name || @group.preferred_username, + instance: @instance_name + ) %>

- +
- <%= if is_nil(@group.domain) do %> - <% else %> - diff --git a/lib/web/templates/email/instance_follow.html.heex b/lib/web/templates/email/instance_follow.html.heex index f48e2ebf8..87f4ca93a 100644 --- a/lib/web/templates/email/instance_follow.html.heex +++ b/lib/web/templates/email/instance_follow.html.heex @@ -6,11 +6,16 @@
+

- <%= gettext("Your instance's moderation team has decided to suspend %{group_name} (%{group_address}). You are no longer a member of this group.", group_name: @group.name, group_address: (if @group.domain, do: "@#{@group.preferred_username}@#{@group.domain}", else: "@#{@group.preferred_username}")) |> raw %> + <%= gettext( + "Your instance's moderation team has decided to suspend %{group_name} (%{group_address}). You are no longer a member of this group.", + group_name: @group.name, + group_address: + if(@group.domain, + do: "@#{@group.preferred_username}@#{@group.domain}", + else: "@#{@group.preferred_username}" + ) + ) + |> raw %>

+

- <%= gettext "As this group was located on this instance, all of it's data has been irretrievably deleted." %> + <%= gettext( + "As this group was located on this instance, all of it's data has been irretrievably deleted." + ) %>

+

- <%= gettext "As this group was located on another instance, it will continue to work for other instances than this one." %> + <%= gettext( + "As this group was located on another instance, it will continue to work for other instances than this one." + ) %>

- +
- @@ -30,30 +35,67 @@
+

- <%= gettext "Want to connect?" %> + <%= gettext("Want to connect?") %>

- +
- <%= if @follower.type == :Application do %> - - - + + + <% end %> - @@ -66,15 +108,27 @@
+

- <%= if @follower.type == :Application do %><%= gettext("%{name} (%{domain}) just requested to follow your instance.", name: @follower.name, domain: @follower.domain) |> raw %><% else %><%= gettext("%{name} just requested to follow your instance.", name: Mobilizon.Actors.Actor.display_name_and_username(@follower)) |> raw %><% end %> + <%= if @follower.type == :Application do %> + <%= gettext("%{name} (%{domain}) just requested to follow your instance.", + name: @follower.name, + domain: @follower.domain + ) + |> raw %> + <% else %> + <%= gettext("%{name} just requested to follow your instance.", + name: Mobilizon.Actors.Actor.display_name_and_username(@follower) + ) + |> raw %> + <% end %>
- <%= if @follower.type == :Application do %><%= gettext "If you accept, this instance will receive all of your public events." %><% else %><%= gettext "If you accept, this profile will receive all of your public events." %><% end %> + <%= if @follower.type == :Application do %> + <%= gettext("If you accept, this instance will receive all of your public events.") %> + <% else %> + <%= gettext("If you accept, this profile will receive all of your public events.") %> + <% end %>

-

- <%= gettext "Note: %{name} (%{domain}) following you doesn't necessarily imply that you follow this instance, but you can ask to follow them too.", name: @follower.name, domain: @follower.domain %> -

-
+

+ <%= gettext( + "Note: %{name} (%{domain}) following you doesn't necessarily imply that you follow this instance, but you can ask to follow them too.", + name: @follower.name, + domain: @follower.domain + ) %> +

+
+

- <%= if @follower.type == :Application do %><%= gettext "To accept this invitation, head over to the instance's admin settings." %><% else %><%= gettext "To accept this invitation, head over to the profile's admin page." %><% end %> + <%= if @follower.type == :Application do %> + <%= gettext( + "To accept this invitation, head over to the instance's admin settings." + ) %> + <% else %> + <%= gettext("To accept this invitation, head over to the profile's admin page.") %> + <% end %>

- <%= if @follower.type == :Application do %> - - <%= gettext "View the details" %> - - <% else %> - - <%= gettext "View the details" %> - - <% end %> + <%= if @follower.type == :Application do %> + + <%= gettext("View the details") %> + + <% else %> + + <%= gettext("View the details") %> + + <% end %>
diff --git a/lib/web/templates/email/notification_each_week.html.heex b/lib/web/templates/email/notification_each_week.html.heex index 7b4a78b63..288010db9 100644 --- a/lib/web/templates/email/notification_each_week.html.heex +++ b/lib/web/templates/email/notification_each_week.html.heex @@ -6,11 +6,16 @@
- +
- @@ -30,34 +35,65 @@
+

- <%= gettext "On the agenda this week" %> + <%= gettext("On the agenda this week") %>

- +
- - - diff --git a/lib/web/templates/email/on_day_notification.html.heex b/lib/web/templates/email/on_day_notification.html.heex index e3afee8e0..9c37baa51 100644 --- a/lib/web/templates/email/on_day_notification.html.heex +++ b/lib/web/templates/email/on_day_notification.html.heex @@ -6,11 +6,16 @@
+

- <%= ngettext "You have one event this week:", "You have %{total} events this week:", @total, total: @total %> + <%= ngettext( + "You have one event this week:", + "You have %{total} events this week:", + @total, + total: @total + ) %>

+ <%= if @total > 1 do %>
    <%= for participation <- @participations do %>
  • - <%= render("participation/event_card.html", event: participation.event, timezone: @timezone, locale: @locale, action: "participation") %> + <%= render("participation/event_card.html", + event: participation.event, + timezone: @timezone, + locale: @locale, + action: "participation" + ) %>
  • <% end %>
<% else %> - <%= render("participation/event_card.html", event: @participation.event, timezone: @timezone, locale: @locale, action: "participation") %> + <%= render("participation/event_card.html", + event: @participation.event, + timezone: @timezone, + locale: @locale, + action: "participation" + ) %> <% end %>
+

- <%= ngettext "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", @total %> + <%= ngettext( + "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", + "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", + @total + ) %>

- +
- @@ -30,34 +35,62 @@
+

- <%= gettext "What's up today?" %> + <%= gettext("What's up today?") %>

- +
- - - diff --git a/lib/web/templates/email/participation/card/_metadata.html.heex b/lib/web/templates/email/participation/card/_metadata.html.heex index af7b78e2b..9d2a87402 100644 --- a/lib/web/templates/email/participation/card/_metadata.html.heex +++ b/lib/web/templates/email/participation/card/_metadata.html.heex @@ -1,7 +1,11 @@
+

- <%= ngettext "You have one event today:", "You have %{total} events today:", @total, total: @total %> + <%= ngettext("You have one event today:", "You have %{total} events today:", @total, + total: @total + ) %>

+ <%= if @total > 1 do %>
    <%= for participation <- @participations do %>
  • - <%= render("participation/event_card.html", event: participation.event, timezone: @timezone, locale: @locale, action: "participation") %> + <%= render("participation/event_card.html", + event: participation.event, + timezone: @timezone, + locale: @locale, + action: "participation" + ) %>
  • <% end %>
<% else %> - <%= render("participation/event_card.html", event: @participation.event, timezone: @timezone, locale: @locale, action: "participation") %> + <%= render("participation/event_card.html", + event: @participation.event, + timezone: @timezone, + locale: @locale, + action: "participation" + ) %> <% end %>
+

- <%= ngettext "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", @total %> + <%= ngettext( + "Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.", + "Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.", + @total + ) %>

- @@ -9,31 +13,80 @@ -
+
+
-