diff --git a/lms/templates/provider/authorize.html b/lms/templates/provider/authorize.html
index f3f34b08ed..e3867b036f 100644
--- a/lms/templates/provider/authorize.html
+++ b/lms/templates/provider/authorize.html
@@ -1,59 +1,66 @@
-{% extends "main_django.html" %}
+## mako
-{% load scope i18n %}
+<%!
+from django.utils.translation import ugettext as _
+from provider.templatetags.scope import scopes
+from django.core.urlresolvers import reverse
+%>
-{% block bodyclass %}oauth2{% endblock %}
+<%inherit file="../main.html"/>
-{% block body %}
+<%block name="bodyclass">oauth2%block>
+
+<%block name="body">
- {% if not error %}
+ % if not error:
- {% blocktrans with application_name=client.name %}
- {{ application_name }} would like to access your data with the following permissions:
- {% endblocktrans %}
+ ${_(
+ "{application_name} would like to access your data with the following permissions:"
+ .format(application_name=client.name)
+ )}
- {% for permission in oauth_data.scope|scopes %}
+ % for permission in scopes(oauth_data['scope']):
-
- {% if permission == "openid" %}
- {% trans "Read your user ID" %}
- {% elif permission == "profile" %}
- {% trans "Read your user profile" %}
- {% elif permission == "email" %}
- {% trans "Read your email address" %}
- {% elif permission == "course_staff" %}
- {% trans "Read the list of courses in which you are a staff member." %}
- {% elif permission == "course_instructor" %}
- {% trans "Read the list of courses in which you are an instructor." %}
- {% elif permission == "permissions" %}
- {% trans "To see if you are a global staff user" %}
- {% else %}
- {% blocktrans %}Manage your data: {{ permission }}{% endblocktrans %}
- {% endif %}
+ % if permission == "openid":
+ ${_("Read your user ID")}
+ % elif permission == "profile":
+ ${_("Read your user profile")}
+ % elif permission == "email":
+ ${_("Read your email address")}
+ % elif permission == "course_staff":
+ ${_("Read the list of courses in which you are a staff member.")}
+ % elif permission == "course_instructor":
+ ${_("Read the list of courses in which you are an instructor.")}
+ % elif permission == "permissions":
+ ${_("To see if you are a global staff user")}
+ % else:
+ ${_("Manage your data: {permission}".format(permission=permission))}
+ % endif
- {% endfor %}
+ % endfor
-
- {% else %}
+ % else:
- {{ error }}
- {{ error_description }}
+ ${error}
+ ${error_description}
- {% endif %}
+ % endif
-{% endblock %}
+%block>