diff --git a/common/djangoapps/student/tests/test_email.py b/common/djangoapps/student/tests/test_email.py index d54afdcdaa..25d6bc8265 100644 --- a/common/djangoapps/student/tests/test_email.py +++ b/common/djangoapps/student/tests/test_email.py @@ -380,8 +380,6 @@ class EmailChangeRequestTests(EventTestMixin, EmailTemplateTagMixin, CacheIsolat ), u'If this is correct, please confirm your new e-mail address by visiting:', u'http://edx.org/email_confirm/{key}'.format(key=registration_key), - u'If you didn\'t request this, you don\'t need to do anything;', - u'you won\'t receive any more email from us.', u'Please do not reply to this e-mail; if you require assistance,', u'check the help section of the édX web site.', ], @@ -403,7 +401,6 @@ class EmailChangeRequestTests(EventTestMixin, EmailTemplateTagMixin, CacheIsolat html = message.alternatives[0][0] assert message.subject == subject - for body in text, html: for fragment in body_fragments: assert fragment in body diff --git a/common/djangoapps/student/tests/test_reset_password.py b/common/djangoapps/student/tests/test_reset_password.py index 09387d3244..28e2e64175 100644 --- a/common/djangoapps/student/tests/test_reset_password.py +++ b/common/djangoapps/student/tests/test_reset_password.py @@ -124,8 +124,10 @@ class ResetPasswordTests(EventTestMixin, CacheIsolationTestCase): cache.clear() @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', "Test only valid in LMS") - @ddt.data('plain_text', 'html') - def test_reset_password_email(self, body_type): + @ddt.data(('plain_text', "You're receiving this e-mail because you requested a password reset"), + ('html', "You're receiving this e-mail because you requested a password reset")) + @ddt.unpack + def test_reset_password_email(self, body_type, expected_output): """Tests contents of reset password email, and that user is not active""" good_req = self.request_factory.post('/password_reset/', {'email': self.user.email}) good_req.user = self.user @@ -157,7 +159,7 @@ class ResetPasswordTests(EventTestMixin, CacheIsolationTestCase): body = bodies[body_type] self.assertIn("Password reset", sent_message.subject) - self.assertIn("You're receiving this e-mail because you requested a password reset", body) + self.assertIn(expected_output, body) self.assertEquals(sent_message.from_email, from_email) self.assertEquals(len(sent_message.to), 1) self.assertIn(self.user.email, sent_message.to) diff --git a/common/templates/student/edx_ace/accountrecovery/email/body.html b/common/templates/student/edx_ace/accountrecovery/email/body.html index 2d499de139..c6ebe8a644 100644 --- a/common/templates/student/edx_ace/accountrecovery/email/body.html +++ b/common/templates/student/edx_ace/accountrecovery/email/body.html @@ -7,28 +7,34 @@

- {% trans "Create Password" %} + {% trans "Create Password" as tmsg %}{{ tmsg | force_escape }}

+ {% filter force_escape %} {% blocktrans %}You're receiving this e-mail because you requested to create a password for your user account at {{ platform_name }}.{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}We've restored access to your {{ platform_name }} account using the recovery email you provided at registration.{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}Once you've created a password [below], you will be able to log in to {{ platform_name }} with this email ({{ email }}) and your new password.{% endblocktrans %} + {% endfilter %}

- {% trans "If you didn't request this change, you can disregard this email - we have not yet reset your password." %} + {% trans "If you didn't request this change, you can disregard this email - we have not yet reset your password." as tmsg %}{{ tmsg | force_escape }}

- + ## xss-lint: disable=django-trans-missing-escape {% trans "Create Password" as course_cta_text %} {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text course_cta_url=reset_link %} diff --git a/common/templates/student/edx_ace/emailchange/email/body.html b/common/templates/student/edx_ace/emailchange/email/body.html index 93cc842e14..f99a68169b 100644 --- a/common/templates/student/edx_ace/emailchange/email/body.html +++ b/common/templates/student/edx_ace/emailchange/email/body.html @@ -7,18 +7,22 @@

- {% trans "Email Change" %} + {% trans "Email Change" as tmsg %}{{ tmsg | force_escape }}

+ {% filter force_escape %} {% blocktrans %}We received a request to change the e-mail associated with your {{ platform_name }} account from {{ old_email }} to {{ new_email }}. If this is correct, please confirm your new e-mail address by visiting:{% endblocktrans %} + {% endfilter %}

- + ## xss-lint: disable=django-trans-missing-escape {% trans "Confirm Email Change" as course_cta_text %} {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text course_cta_url=confirm_link %}

+ {% filter force_escape %} {% blocktrans %}If you didn't request this, you don't need to do anything; you won't receive any more email from us. Please do not reply to this e-mail; if you require assistance, check the help section of the {{ platform_name }} web site.{% endblocktrans %} + {% endfilter %}

diff --git a/common/templates/student/edx_ace/emailchangeconfirmation/email/body.html b/common/templates/student/edx_ace/emailchangeconfirmation/email/body.html index fbb93ed949..9fc9f5929c 100644 --- a/common/templates/student/edx_ace/emailchangeconfirmation/email/body.html +++ b/common/templates/student/edx_ace/emailchangeconfirmation/email/body.html @@ -7,17 +7,23 @@

+ {% filter force_escape %} {% blocktrans %}Email Change Confirmation for {{ platform_name }}{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}This is to confirm that you changed the e-mail associated with {{ platform_name }} from {{ old_email }} to {{ new_email }}. If you did not make this request, please contact us immediately. Contact information is listed at:{% endblocktrans %} + {% endfilter %}

{{ contact_link }}

+ {% filter force_escape %} {% blocktrans %}We keep a log of old e-mails, so if this request was unintentional, we can investigate.{% endblocktrans %} + {% endfilter %}

diff --git a/common/templates/student/edx_ace/passwordreset/email/body.html b/common/templates/student/edx_ace/passwordreset/email/body.html index 1b67cf1c63..4236456da5 100644 --- a/common/templates/student/edx_ace/passwordreset/email/body.html +++ b/common/templates/student/edx_ace/passwordreset/email/body.html @@ -7,29 +7,33 @@

- {% trans "Password Reset" %} + {% trans "Password Reset" as tmsg %}{{ tmsg | force_escape }}

+ {% filter force_escape %} {% blocktrans %}You're receiving this e-mail because you requested a password reset for your user account at {{ platform_name }}.{% endblocktrans %} + {% endfilter %}

{% if failed %}

+ {% filter force_escape %} {% blocktrans %}However, there is currently no user account associated with your email address: {{ email_address }}.{% endblocktrans %} + {% endfilter %}

- {% trans "If you did not request this change, you can ignore this email." %} + {% trans "If you did not request this change, you can ignore this email." as tmsg %}{{ tmsg | force_escape }}

{% else %}

- {% trans "If you didn't request this change, you can disregard this email - we have not yet reset your password." %} + {% trans "If you didn't request this change, you can disregard this email - we have not yet reset your password." as tmsg %}{{ tmsg | force_escape }}

- + ## xss-lint: disable=django-trans-missing-escape {% trans "Change my Password" as course_cta_text %} {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text course_cta_url=reset_link %} diff --git a/lms/templates/instructor/edx_ace/accountcreationandenrollment/email/body.html b/lms/templates/instructor/edx_ace/accountcreationandenrollment/email/body.html index 237309ad7a..518c37db8a 100644 --- a/lms/templates/instructor/edx_ace/accountcreationandenrollment/email/body.html +++ b/lms/templates/instructor/edx_ace/accountcreationandenrollment/email/body.html @@ -7,32 +7,44 @@

- {% blocktrans %} - Welcome to {{ course_name }} - {% endblocktrans %} + {% filter force_escape %} + {% blocktrans %}Welcome to {{ course_name }}{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}To get started, please visit https://{{ site_name }}.{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}The login information for your account follows:{% endblocktrans %} + {% endfilter %}
+ {% filter force_escape %} {% blocktrans %}email: {{ email_address }}{% endblocktrans %} + {% endfilter %}
+ {% filter force_escape %} {% blocktrans %}password: {{ password }}{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}It is recommended that you change your password.{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}Sincerely yours, The {{ course_name }} Team{% endblocktrans %} + {% endfilter %}

diff --git a/lms/templates/instructor/edx_ace/addbetatester/email/body.html b/lms/templates/instructor/edx_ace/addbetatester/email/body.html index 8ebf41ce2e..fd834980ce 100644 --- a/lms/templates/instructor/edx_ace/addbetatester/email/body.html +++ b/lms/templates/instructor/edx_ace/addbetatester/email/body.html @@ -7,43 +7,60 @@

+ {% filter force_escape %} {% blocktrans %} You have been invited to be a beta tester for {{ course_name }} at {{ site_name }} {% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}The invitation has been sent by a member of the course staff.{% endblocktrans %} + {% endfilter %}

{% if auto_enroll %}

+ {% filter force_escape %} {% blocktrans %}To start accessing course materials, please visit:{% endblocktrans %} + {% endfilter %}

{% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=display_name|default:course.display_name_with_default course_cta_url=course_url %} {% elif course_about_url is not None %}

+ {% filter force_escape %} {% blocktrans %}To enroll in this course and begin the beta test:{% endblocktrans %} + {% endfilter %}

- + {% filter force_escape %} {% blocktrans asvar course_cta_text %}Visit {{ course_name }}{% endblocktrans %} + {% endfilter %} + {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text course_cta_url=course_about_url %} {% else %}

+ {% filter force_escape %} {% blocktrans %}To enroll in this course and begin the beta test:{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} + {% blocktrans asvar course_cta_text %}Visit {{ site_name }} + {% endblocktrans %} + {%endfilter%} - {% blocktrans asvar course_cta_text %}Visit {{ site_name }}{% endblocktrans %} {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text course_cta_url=course_url %} {% endif %}

+ {% filter force_escape %} {% blocktrans %}This email was automatically sent from {{ site_name }} to {{ email_address }}{% endblocktrans %} + {% endfilter %}

diff --git a/lms/templates/instructor/edx_ace/allowedenroll/email/body.html b/lms/templates/instructor/edx_ace/allowedenroll/email/body.html index 7ffa67deeb..c4aa9f011f 100644 --- a/lms/templates/instructor/edx_ace/allowedenroll/email/body.html +++ b/lms/templates/instructor/edx_ace/allowedenroll/email/body.html @@ -7,25 +7,33 @@

+ {% filter force_escape %} {% blocktrans %}You have been invited to {{ course_name }}{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}You have been invited to join {{ course_name }} at {{ site_name }} by a member of the course staff.{% endblocktrans %} + {% endfilter %}

{% if is_shib_course %} {% if auto_enroll %}

+ {% filter force_escape %} {% blocktrans %}To access this course click on the button below and login:{% endblocktrans %} + {% endfilter %}

{% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_name course_cta_url=course_url %} {% elif course_about_url is not None %}

+ {% filter force_escape %} {% blocktrans %}To access this course visit it and register:{% endblocktrans %} + {% endfilter %}

@@ -33,27 +41,37 @@ {% endif %} {% else %}

+ {% filter force_escape %} {% blocktrans %}Please finish your registration and fill out the registration form making sure to use {{ email_address }} in the Email field:{% endblocktrans %} + {% endfilter %}

- + ## xss-lint: disable=django-trans-missing-escape {% trans "Finish Your Registration" as button_cta_text %} {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=button_cta_text course_cta_url=registration_url %}

{% if auto_enroll %} + {% filter force_escape %} {% blocktrans %}Once you have registered and activated your account, you will see {{ course_name }} listed on your dashboard.{% endblocktrans %} + {% endfilter %} {% elif course_about_url is not None %} + {% filter force_escape %} {% blocktrans %}Once you have registered and activated your account, you will be able to access this course:{% endblocktrans %} + {% endfilter %} {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_name course_cta_url=course_about_url %} {% else %} + {% filter force_escape %} {% blocktrans %}You can then enroll in {{ course_name }}.{% endblocktrans %} + {% endfilter %} {% endif %}

{% endif %}

+ {% filter force_escape %} {% blocktrans %}This email was automatically sent from {{ site_name }} to {{ email_address }}{% endblocktrans %} + {% endfilter %}

diff --git a/lms/templates/instructor/edx_ace/allowedunenroll/email/body.html b/lms/templates/instructor/edx_ace/allowedunenroll/email/body.html index e49430bfe6..9b454eeb4b 100644 --- a/lms/templates/instructor/edx_ace/allowedunenroll/email/body.html +++ b/lms/templates/instructor/edx_ace/allowedunenroll/email/body.html @@ -7,16 +7,22 @@

+ {% filter force_escape %} {% blocktrans %}You have been unenrolled from {{ course_name }}{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}You have been unenrolled from the course {{ course_name }} by a member of the course staff. Please disregard the invitation previously sent.{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}This email was automatically sent from {{ site_name }} to {{ email_address }}{% endblocktrans %} + {% endfilter %}

diff --git a/lms/templates/instructor/edx_ace/enrolledunenroll/email/body.html b/lms/templates/instructor/edx_ace/enrolledunenroll/email/body.html index 94fe97c06c..ca11b94636 100644 --- a/lms/templates/instructor/edx_ace/enrolledunenroll/email/body.html +++ b/lms/templates/instructor/edx_ace/enrolledunenroll/email/body.html @@ -7,23 +7,31 @@

+ {% filter force_escape %} {% blocktrans %} You have been unenrolled from {{ course_name }} {% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}You have been unenrolled from {{ course_name }} at {{ site_name }} by a member of the course staff. This course will no longer appear on your {{ site_name }} dashboard.{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}Your other courses have not been affected.{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}This email was automatically sent from {{ site_name }} to {{ full_name }}{% endblocktrans %} + {% endfilter %}

diff --git a/lms/templates/instructor/edx_ace/enrollenrolled/email/body.html b/lms/templates/instructor/edx_ace/enrollenrolled/email/body.html index 59e3dae7bf..7255ffc7c9 100644 --- a/lms/templates/instructor/edx_ace/enrollenrolled/email/body.html +++ b/lms/templates/instructor/edx_ace/enrollenrolled/email/body.html @@ -7,13 +7,17 @@

+ {% filter force_escape %} {% blocktrans %} You have been enrolled in {{ course_name }} {% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}You have been enrolled in {{ course_name }} at {{ site_name }} by a member of the course staff. This course will now appear on your {{ site_name }} dashboard.{% endblocktrans %} + {% endfilter %}

@@ -21,7 +25,9 @@ {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text course_cta_url=course_url %}

+ {% filter force_escape %} {% blocktrans %}This email was automatically sent from {{ site_name }} to {{ full_name }}{% endblocktrans %} + {% endfilter %}

diff --git a/lms/templates/instructor/edx_ace/removebetatester/email/body.html b/lms/templates/instructor/edx_ace/removebetatester/email/body.html index befac35377..6008945835 100644 --- a/lms/templates/instructor/edx_ace/removebetatester/email/body.html +++ b/lms/templates/instructor/edx_ace/removebetatester/email/body.html @@ -7,26 +7,36 @@

+ {% filter force_escape %} {% blocktrans %}You have been removed as a beta tester for {{ course_name }} at {{ site_name }}{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}You have been removed as a beta tester for {{ course_name }} at {{ site_name }} by a member of the course staff.{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}This course will remain on your dashboard, but you will no longer be part of the beta testing group.{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}Your other courses have not been affected.{% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans %}This email was automatically sent from {{ site_name }} to {{ email_address }}{% endblocktrans %} + {% endfilter %}

diff --git a/lms/templates/verify_student/edx_ace/verificationexpiry/email/body.html b/lms/templates/verify_student/edx_ace/verificationexpiry/email/body.html index def23d702c..7d598582ee 100644 --- a/lms/templates/verify_student/edx_ace/verificationexpiry/email/body.html +++ b/lms/templates/verify_student/edx_ace/verificationexpiry/email/body.html @@ -7,29 +7,39 @@

- {% trans "Expired ID Verification" %} + {% trans "Expired ID Verification" as tmsg %}{{ tmsg | force_escape }}

+ {% filter force_escape %} {% blocktrans %}Hello {{full_name}},{% endblocktrans %} + {% endfilter %}
+ {% filter force_escape %} {% blocktrans %}Your {{platform_name}} ID verification has expired. {% endblocktrans %} + {% endfilter %}

- {% trans "You must have a valid ID verification to take proctored exams and qualify for certificates."%} - {% trans "Follow the link below to submit your photos and renew your ID verification." %} - {% trans "You can also do this from your dashboard." %} + {% trans "You must have a valid ID verification to take proctored exams and qualify for certificates." as tmsg %}{{ tmsg | force_escape }} + {% trans "Follow the link below to submit your photos and renew your ID verification." as tmsg %}{{ tmsg | force_escape }} + {% trans "You can also do this from your dashboard." as tmsg %}{{ tmsg | force_escape }}

+ {% filter force_escape %} {% blocktrans %}Resubmit Verification : {{lms_verification_link}} {% endblocktrans %} + {% endfilter %}
+ {% filter force_escape %} {% blocktrans %}ID verification FAQ : {{help_center_link}} {% endblocktrans %} + {% endfilter %}

- {% trans "Thank you," %} + {% trans "Thank you," as tmsg %}{{ tmsg | force_escape }}
+ {% filter force_escape %} {% blocktrans %}The {{ platform_name }} Team {% endblocktrans %} + {% endfilter %}

diff --git a/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/base_body.html b/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/base_body.html index 0f0a0d09eb..044514b40d 100644 --- a/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/base_body.html +++ b/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/base_body.html @@ -63,7 +63,7 @@ {% blocktrans %}Go to {{ platform_name }} Home Page{% endblocktrans %} + height="30" alt="{% filter force_escape %}{% blocktrans %}Go to {{ platform_name }} Home Page{% endblocktrans %}{% endfilter %}"/> {% trans "Sign In" %} @@ -97,7 +97,7 @@ {% blocktrans %}{{ platform_name }} on LinkedIn{% endblocktrans %} + width="32" height="32" alt="{% filter force_escape %}{% blocktrans %}{{ platform_name }} on LinkedIn{% endblocktrans %}{% endfilter %}"/> {% endif %} @@ -105,7 +105,7 @@ {% blocktrans %}{{ platform_name }} on Twitter{% endblocktrans %} + width="32" height="32" alt="{% filter force_escape %}{% blocktrans %}{{ platform_name }} on Twitter{% endblocktrans %}{% endfilter %}"/> {% endif %} @@ -113,7 +113,7 @@ {% blocktrans %}{{ platform_name }} on Facebook{% endblocktrans %} + width="32" height="32" alt="{% filter force_escape %}{% blocktrans %}{{ platform_name }} on Facebook{% endblocktrans %}{% endfilter %}"/> {% endif %} @@ -121,7 +121,7 @@ {% blocktrans %}{{ platform_name }} on Google Plus{% endblocktrans %} + width="32" height="32" alt="{% filter force_escape %}{% blocktrans %}{{ platform_name }} on Google Plus{% endblocktrans %}{% endfilter %}"/> {% endif %} @@ -129,7 +129,7 @@ {% blocktrans %}{{ platform_name }} on Reddit{% endblocktrans %} + width="32" height="32" alt="{% filter force_escape %}{% blocktrans %}{{ platform_name }} on Reddit{% endblocktrans %}{% endfilter %}"/> {% endif %} @@ -143,14 +143,14 @@ {% if mobile_store_urls.apple %} {% trans {% endif %} {% if mobile_store_urls.google %} {% trans {% endif %} @@ -171,9 +171,9 @@ - © {% now "Y" %} {{ platform_name }}, {% trans "All rights reserved" %}.
+ © {% now "Y" %} {{ platform_name }}, {% trans "All rights reserved" as tmsg %}{{ tmsg | force_escape }}.

- {% trans "Our mailing address is" %}:
+ {% trans "Our mailing address is" as tmsg %}{{ tmsg | force_escape }}:
{{ contact_mailing_address }} diff --git a/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/base_head.html b/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/base_head.html index 41c4967540..8f7e0f8573 100644 --- a/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/base_head.html +++ b/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/base_head.html @@ -4,7 +4,7 @@ {% get_current_language as LANGUAGE_CODE %} {% block title %} - {% trans "edX Email" %} + {% trans "edX Email" as tmsg %}{{ tmsg | force_escape }} {% endblock %} diff --git a/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/upsell_cta.html b/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/upsell_cta.html index 913a9a58d0..afdcc6a607 100644 --- a/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/upsell_cta.html +++ b/openedx/core/djangoapps/ace_common/templates/ace_common/edx_ace/common/upsell_cta.html @@ -3,10 +3,12 @@ {% if show_upsell %}

+ {% filter force_escape %} {% blocktrans trimmed %} Don't miss the opportunity to highlight your new knowledge and skills by earning a verified certificate. Upgrade by {{ user_schedule_upgrade_deadline_time }}. {% endblocktrans %} + {% endfilter %}

- {% trans "Upgrade Now" %} + {% trans "Upgrade Now" as tmsg %}{{ tmsg | force_escape }}

{% endif %} diff --git a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.html b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.html index 3dd1a3b3a9..bae28373ad 100644 --- a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.html +++ b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.html @@ -1,10 +1,13 @@ {% extends 'ace_common/edx_ace/common/base_body.html' %} {% load i18n %} +{% load django_markup %} {% block preview_text %} + {% filter force_escape %} {% blocktrans trimmed %} Welcome to week {{ week_num }} of {{ course_name }}! {% endblocktrans %} + {% endfilter %} {% endblock %} {% block content %} @@ -12,10 +15,11 @@

- {% blocktrans trimmed %} - We hope you're enjoying {{ course_name }}! + {% blocktrans trimmed asvar tmsg %} + We hope you're enjoying {start_strong}{{ course_name }}{end_strong}! We want to let you know what you can look forward to in week {{ week_num }}: {% endblocktrans %} + {% interpolate_html tmsg start_strong=''|safe end_strong=''|safe %}

+ {% filter force_escape %} {% blocktrans trimmed %} With self-paced courses, you learn on your own schedule. We encourage you to spend time with the course each week. Your focused attention will pay off in the end! {% endblocktrans %} + {% endfilter %}

- + ## xss-lint: disable=django-trans-missing-escape {% trans "Resume your course now" as course_cta_text %} {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text%} diff --git a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day10/email/body.html b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day10/email/body.html index b0d186bc2c..60ab43b6cc 100644 --- a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day10/email/body.html +++ b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day10/email/body.html @@ -1,17 +1,22 @@ {% extends 'ace_common/edx_ace/common/base_body.html' %} {% load i18n %} +{% load django_markup %} {% block preview_text %} {% if course_ids|length > 1 %} + {% filter force_escape %} {% blocktrans trimmed %} Many {{ platform_name }} learners are completing more problems every week, and participating in the discussion forums. What do you want to do to keep learning? {% endblocktrans %} + {% endfilter %} {% else %} + {% filter force_escape %} {% blocktrans trimmed %} Many {{ platform_name }} learners in {{course_name}} are completing more problems every week, and participating in the discussion forums. What do you want to do to keep learning? {% endblocktrans %} + {% endfilter %} {% endif %} {% endblock %} @@ -19,22 +24,25 @@
-

{% trans "Keep up the momentum!" %}

+

{% trans "Keep up the momentum!" as tmsg %}{{ tmsg | force_escape }}

{% if course_ids|length > 1 %} + {% filter force_escape %} {% blocktrans trimmed %} Many {{ platform_name }} learners are completing more problems every week, and participating in the discussion forums. What do you want to do to keep learning? {% endblocktrans %} + {% endfilter %} {% else %} - {% blocktrans trimmed %} - Many {{ platform_name }} learners in {{course_name}} are completing more problems every week, and + {% blocktrans trimmed asvar tmsg %} + Many {{ platform_name }} learners in {start_strong}{{course_name}}{end_strong} are completing more problems every week, and participating in the discussion forums. What do you want to do to keep learning? {% endblocktrans %} + {% interpolate_html tmsg start_strong=''|safe end_strong=''|safe %} {% endif %}

- + ## xss-lint: disable=django-trans-missing-escape {% trans "Keep learning" as course_cta_text %} {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text%} diff --git a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day3/email/body.html b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day3/email/body.html index c47c2e7305..745e6fa6d2 100644 --- a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day3/email/body.html +++ b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day3/email/body.html @@ -1,17 +1,22 @@ {% extends 'ace_common/edx_ace/common/base_body.html' %} {% load i18n %} +{% load django_markup %} {% block preview_text %} {% if course_ids|length > 1 %} + {% filter force_escape %} {% blocktrans trimmed %} Remember when you enrolled in {{ course_name }}, and other courses on {{ platform_name }}? We do, and we’re glad to have you! Come see what everyone is learning. {% endblocktrans %} + {% endfilter %} {% else %} + {% filter force_escape %} {% blocktrans trimmed %} Remember when you enrolled in {{ course_name }} on {{ platform_name }}? We do, and we’re glad to have you! Come see what everyone is learning. {% endblocktrans %} + {% endfilter %} {% endif %} {% endblock %} @@ -19,22 +24,24 @@
-

{% trans "Keep learning today" %}.

+

{% trans "Keep learning today" as tmsg %}{{ tmsg | force_escape}}.

{% if course_ids|length > 1 %} - {% blocktrans trimmed %} - Remember when you enrolled in {{ course_name }}, and other courses on {{ platform_name }}? We do, and we’re glad + {% blocktrans trimmed asvar tmsg %} + Remember when you enrolled in {start_strong}{{ course_name }}{end_strong}, and other courses on {{ platform_name }}? We do, and we’re glad to have you! Come see what everyone is learning. {% endblocktrans %} + {% interpolate_html tmsg start_strong=''|safe end_strong=''|safe %} {% else %} - {% blocktrans trimmed %} - Remember when you enrolled in {{ course_name }} on {{ platform_name }}? We do, and we’re glad + {% blocktrans trimmed asvar tmsg %} + Remember when you enrolled in {start_strong}{{ course_name }}{end_strong} on {{ platform_name }}? We do, and we’re glad to have you! Come see what everyone is learning. {% endblocktrans %} + {% interpolate_html tmsg start_strong=''|safe end_strong=''|safe %} {% endif %}

- + ## xss-lint: disable=django-trans-missing-escape {% trans "Start learning now" as course_cta_text %} {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text%} diff --git a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html index 2b42a50de1..7ced5182ba 100644 --- a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html +++ b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html @@ -1,10 +1,12 @@ {% extends 'ace_common/edx_ace/common/base_body.html' %} {% load i18n %} +{% load django_markup %} {% load static %} {% load ace %} {% block preview_text %} {% if course_ids|length > 1 %} + {% filter force_escape %} {% blocktrans trimmed %} We hope you are enjoying learning with us so far on {{ platform_name }}! A verified certificate allows you to highlight your new knowledge and skills. An {{ platform_name }} certificate is official and easily @@ -12,7 +14,9 @@ Upgrade by {{ user_schedule_upgrade_deadline_time }}. {% endblocktrans %} + {% endfilter %} {% else %} + {% filter force_escape %} {% blocktrans trimmed %} We hope you are enjoying learning with us so far in {{ first_course_name }}! A verified certificate allows you to highlight your new knowledge and skills. An {{ platform_name }} certificate is official and easily @@ -20,6 +24,7 @@ Upgrade by {{ user_schedule_upgrade_deadline_time }}. {% endblocktrans %} + {% endfilter %} {% endif %} {% endblock %} @@ -27,32 +32,35 @@ diff --git a/openedx/core/djangoapps/user_api/templates/user_api/edx_ace/deletionnotificationmessage/email/body.html b/openedx/core/djangoapps/user_api/templates/user_api/edx_ace/deletionnotificationmessage/email/body.html index 1ad6cb6aaa..0e9ff89f9e 100644 --- a/openedx/core/djangoapps/user_api/templates/user_api/edx_ace/deletionnotificationmessage/email/body.html +++ b/openedx/core/djangoapps/user_api/templates/user_api/edx_ace/deletionnotificationmessage/email/body.html @@ -6,30 +6,40 @@
-

{% trans "Upgrade now" %}

+

{% trans "Upgrade now" as tmsg %}{{ tmsg | force_escape }}

{% if course_ids|length > 1 %} - {% blocktrans trimmed %} - We hope you are enjoying learning with us so far on {{ platform_name }}! A + {% blocktrans trimmed asvar tmsg %} + We hope you are enjoying learning with us so far on {start_strong}{{ platform_name }}{end_strong}! A verified certificate allows you to highlight your new knowledge and skills. An {{ platform_name }} certificate is official and easily shareable. {% endblocktrans %} + {% interpolate_html tmsg start_strong=''|safe end_strong=''|safe %} {% else %} - {% blocktrans trimmed %} - We hope you are enjoying learning with us so far in {{ first_course_name }}! A + {% blocktrans trimmed asvar tmsg %} + We hope you are enjoying learning with us so far in {start_strong}{{ first_course_name }}{end_strong}! A verified certificate allows you to highlight your new knowledge and skills. An {{ platform_name }} certificate is official and easily shareable. {% endblocktrans %} + {% interpolate_html tmsg start_strong=''|safe end_strong=''|safe %} {% endif %}

- {% blocktrans trimmed %} - Upgrade by {{ user_schedule_upgrade_deadline_time }}. + {% blocktrans trimmed asvar tmsg %} + Upgrade by {start_strong}{{ user_schedule_upgrade_deadline_time }}{end_strong}. {% endblocktrans %} + {% interpolate_html tmsg start_strong=''|safe end_strong=''|safe %}

{% if course_ids|length > 1 and course_ids|length < 10 %}

- {% trans "You are eligible to upgrade in these courses:" %} + {% trans "You are eligible to upgrade in these courses:" as tmsg %}{{ tmsg | force_escape }}

    {% for course_link in course_links %} @@ -65,7 +73,7 @@ {% trans 'Example of a verified certificate' %}

    @@ -101,7 +109,7 @@ display: inline-block; "> {# old email clients require the use of the font tag :( #} - {% trans "Upgrade now" %} + {% trans "Upgrade now" as tmsg %}{{ tmsg | force_escape }}

+ {% filter force_escape %} {% blocktrans trimmed %} Hello {{full_name}}, {% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans trimmed %} We received a deletion request for your account on {{platform_name}}. We're sorry to see you go! {% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans trimmed %} Your account will be deleted shortly. Account deletion, including removal from email lists, may take a few weeks to fully process through our system. If you want to opt-out of emails before then, please unsubscribe from the footer of any email. {% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans trimmed %} This is an informational email only. If you did not initiate this request, please contact {{contact_email}}. {% endblocktrans %} + {% endfilter %}

+ {% filter force_escape %} {% blocktrans trimmed %} Best, {{ platform_name }} {% endblocktrans %} + {% endfilter %}