From 8c55e11d1f69172b1c25558a14906a19dc03d003 Mon Sep 17 00:00:00 2001 From: Mahyar Damavand Date: Wed, 16 Oct 2019 11:59:42 +0330 Subject: [PATCH] Fix code quality test failures --- common/djangoapps/student/tests/test_email.py | 2 +- .../edx_ace/accountactivation/email/body.html | 26 ++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/common/djangoapps/student/tests/test_email.py b/common/djangoapps/student/tests/test_email.py index 4fb45df0ec..7e0137dd84 100644 --- a/common/djangoapps/student/tests/test_email.py +++ b/common/djangoapps/student/tests/test_email.py @@ -103,7 +103,7 @@ class ActivationEmailTests(EmailTemplateTagMixin, CacheIsolationTestCase): # sent from an OpenEdX installation. OPENEDX_FRAGMENTS = [ ( - u"You're almost there! Use the link below to activate your account to access engaging, " + u"Use the link below to activate your account to access engaging, " u"high-quality {platform_name} courses. Note that you will not be able to log back into your " u"account until you have activated it.".format( platform_name=settings.PLATFORM_NAME diff --git a/common/templates/student/edx_ace/accountactivation/email/body.html b/common/templates/student/edx_ace/accountactivation/email/body.html index d4497672da..d6970cbba9 100644 --- a/common/templates/student/edx_ace/accountactivation/email/body.html +++ b/common/templates/student/edx_ace/accountactivation/email/body.html @@ -1,5 +1,6 @@ {% extends 'ace_common/edx_ace/common/base_body.html' %} +{% load django_markup %} {% load i18n %} {% load static %} {% block content %} @@ -8,7 +9,9 @@

- {% blocktrans %}This is a routed Account Activation email for {{ routed_user }} ({{ routed_user_email }}): {{ routed_profile_name }}{% endblocktrans %} + {% filter force_escape %} + {% blocktrans %}This is a routed Account Activation email for {{ routed_user }} ({{ routed_user_email }}): {{ routed_profile_name }}{% endblocktrans %} + {% endfilter %}

@@ -17,28 +20,35 @@

- {% trans "Account Activation" %} + {% trans "Account Activation" as header_msg %}{{ header_msg | force_escape }}

- {% blocktrans %}You're almost there! Use the link below to activate your account to access engaging, high-quality {{ platform_name }} courses. Note that you will not be able to log back into your account until you have activated it.{% endblocktrans %} + {% filter force_escape %} + {% blocktrans %}You're almost there! Use the link below to activate your account to access engaging, high-quality {{ platform_name }} courses. Note that you will not be able to log back into your account until you have activated it.{% endblocktrans %} + {% endfilter %}

- {% trans "Activate Your Account" as course_cta_text %} + {% trans "Activate Your Account" as course_cta_text %}{{ course_cta_text | force_escape }} {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text course_cta_url=confirm_activation_link %}

- {% blocktrans %}Enjoy learning with {{ platform_name }}.{% endblocktrans %} + {% filter force_escape %} + {% blocktrans %}Enjoy learning with {{ platform_name }}.{% endblocktrans %} + {% endfilter %}

- {% blocktrans %}If you need help, please use our web form at {{ support_url }} or email {{ support_email }}.{% endblocktrans %} + {% blocktrans trimmed asvar assist_msg %} + If you need help, please use our web form at {start_anchor_web}{{ support_url }}{end_anchor} or email {start_anchor_email}{{ support_email }}{end_anchor}. + {% endblocktrans %} + {% interpolate_html assist_msg start_anchor_web=''|safe start_anchor_email=''|safe end_anchor=''|safe %}

@@ -48,7 +58,9 @@

- {% blocktrans %}This email message was automatically sent by {{ lms_url }} because someone attempted to create an account on {{ platform_name }} using this email address.{% endblocktrans %} + {% filter force_escape %} + {% blocktrans %}This email message was automatically sent by {{ lms_url }} because someone attempted to create an account on {{ platform_name }} using this email address.{% endblocktrans %} + {% endfilter %}