${_("You've clicked a link for an enrollment code that has already been used." - " Check your course dashboard to see if you're enrolled in the course," - " or contact your company's administrator.").format(dashboard_url=dashboard_url)} + " Check your {link_start}course dashboard{link_end} to see if you're enrolled in the course," + " or contact your company's administrator." + ).format( + link_start=u''.format(url=reverse('dashboard')), + link_end='' + )}
% elif redemption_success:@@ -49,23 +55,23 @@ from courseware.courses import course_image_url, get_course_about_section " This course has now been added to your dashboard.").format(course_name=course.display_name)}
% elif registered_for_course: - <% dashboard_url = reverse('dashboard')%>${_("You're already enrolled for this course." - " Visit your dashboard to see the course.").format(dashboard_url=dashboard_url)} + " Visit your {link_start}dashboard{link_end} to see the course." + ).format( + link_start=u''.format(url=reverse('dashboard')), + link_end='' + )}
% elif course_full: - <% dashboard_url = reverse('dashboard')%>${_("The course you are enrolling for is full.")}
% elif enrollment_closed: - <% dashboard_url = reverse('dashboard')%>${_("The course you are enrolling for is closed.")}
% elif redeem_code_error: - <% dashboard_url = reverse('dashboard')%>${_("There was an error processing your redeem code.")}
diff --git a/lms/templates/shoppingcart/registration_code_redemption.html b/lms/templates/shoppingcart/registration_code_redemption.html index 4af7ec31a3..8552d9d407 100644 --- a/lms/templates/shoppingcart/registration_code_redemption.html +++ b/lms/templates/shoppingcart/registration_code_redemption.html @@ -24,8 +24,11 @@ from courseware.courses import course_image_url, get_course_about_section )}" />
- ${_('After this purchase is complete,')}
${order.user.username}
- ${_('will be enrolled in this course.')}
+ ${_('After this purchase is complete, {username} will be enrolled in this course.').format(username=u'
{username}'.format(username=order.user.username))}
- ${_('After this purchase is complete,')}
${order.user.username}
- ${_('will be enrolled in this course.')}
+ ${_('After this purchase is complete, {username} will be enrolled in this course.').format(username=u'
{username}'.format(username=order.user.username))}