diff --git a/cms/envs/common.py b/cms/envs/common.py index 030609e26f..cd92f17b1d 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -25,7 +25,7 @@ Longer TODO: import sys import lms.envs.common -from lms.envs.common import USE_TZ, TECH_SUPPORT_EMAIL +from lms.envs.common import USE_TZ, TECH_SUPPORT_EMAIL, PLATFORM_NAME, BUGS_EMAIL from path import path ############################ FEATURE CONFIGURATION ############################# diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 0b061f5a94..9b96b90dee 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -1037,7 +1037,11 @@ def password_reset(request): 'error': _('Invalid e-mail or user')})) -def password_reset_confirm_wrapper(request, uidb36=None, token=None): +def password_reset_confirm_wrapper( + request, + uidb36=None, + token=None, +): ''' A wrapper around django.contrib.auth.views.password_reset_confirm. Needed because we want to set the user as active at this step. ''' @@ -1049,7 +1053,12 @@ def password_reset_confirm_wrapper(request, uidb36=None, token=None): user.save() except (ValueError, User.DoesNotExist): pass - return password_reset_confirm(request, uidb36=uidb36, token=token) + # we also want to pass settings.PLATFORM_NAME in as extra_context + + extra_context = {"platform_name": settings.PLATFORM_NAME} + return password_reset_confirm( + request, uidb36=uidb36, token=token, extra_context=extra_context + ) def reactivation_email_for_user(user): diff --git a/lms/templates/registration/password_reset_complete.html b/lms/templates/registration/password_reset_complete.html index 3f301102b5..6ccb75ed26 100644 --- a/lms/templates/registration/password_reset_complete.html +++ b/lms/templates/registration/password_reset_complete.html @@ -1,4 +1,3 @@ -<%! from django.utils.translation import ugettext as _ %> {% load i18n %} {% load compressed %} {% load staticfiles %} @@ -6,7 +5,7 @@ - ${_("Your Password Reset is Complete")} + {% trans "Your Password Reset is Complete" %} {% compressed_css 'application' %} @@ -54,13 +53,15 @@
-

${_("Your Password Reset is Complete")}

+

{% trans "Your Password Reset is Complete" %}

{% block content %}
-

${_('Your password has been set. You may go ahead and {link_start}log in{link_end} now.').format(link_start='', link_end='')}

+ {% blocktrans with link_start='' link_end='' %} + Your password has been set. You may go ahead and {{ link_start }}log in{{ link_end }} now. + {% endblocktrans %}
{% endblock %}
diff --git a/lms/templates/registration/password_reset_confirm.html b/lms/templates/registration/password_reset_confirm.html index 6a568545d1..989d7984b4 100644 --- a/lms/templates/registration/password_reset_confirm.html +++ b/lms/templates/registration/password_reset_confirm.html @@ -1,11 +1,15 @@ -<%! from django.utils.translation import ugettext as _ %> +{% load i18n %} {% load compressed %} {% load staticfiles %} - ${_("Reset Your {platform_name} Password").format(platform_name=settings.PLATFORM_NAME)} + + {% blocktrans with platform_name=platform_name %} + Reset Your {{ platform_name }} Password + {% endblocktrans %} + {% compressed_css 'application' %} @@ -53,78 +57,97 @@
-

${_("Reset Your {platform_name} Password").format(platform_name=settings.PLATFORM_NAME)}

+

+ {% blocktrans with platform_name=platform_name %} + Reset Your {{ platform_name }} Password + {% endblocktrans %} +

{% if validlink %}
-

${_("Password Reset Form")}

+

{% trans "Password Reset Form" %}

{% csrf_token %}

- ${_('Please enter your new password twice so we can verify you typed it in correctly.
' - 'Required fields are noted by bold text and an asterisk (*).')} + {% trans 'Please enter your new password twice so we can verify you typed it in correctly.
Required fields are noted by bold text and an asterisk (*).' %}

- ${_("Required Information")} + {% trans "Required Information" %}
  1. - +
  2. - +
- +
{% else %}
-

${_("Your Password Reset Was Unsuccessful")}

+

{% trans "Your Password Reset Was Unsuccessful" %}

-

${_('The password reset link was invalid, possibly because the link has already been used. Please return to the login page and start the password reset process again.')}

+

+ {% blocktrans with start_link='' end_link='' %} + The password reset link was invalid, possibly because the link has already been used. Please return to the {{ start_link }}login page{{ end_link }} and start the password reset process again. + {% endblocktrans %} +

{% endif %}
diff --git a/lms/templates/wiki/includes/cheatsheet.html b/lms/templates/wiki/includes/cheatsheet.html index f8507d2011..660a83402a 100644 --- a/lms/templates/wiki/includes/cheatsheet.html +++ b/lms/templates/wiki/includes/cheatsheet.html @@ -1,21 +1,24 @@ -<%! from django.utils.translation import ugettext as _ %> +{% load i18n %}