diff --git a/lms/templates/shoppingcart/receipt.html b/lms/templates/shoppingcart/receipt.html
index e6e2c9dbcf..48901d9989 100644
--- a/lms/templates/shoppingcart/receipt.html
+++ b/lms/templates/shoppingcart/receipt.html
@@ -1,7 +1,8 @@
<%inherit file="shopping_cart_flow.html" />
-<%! from django.utils.translation import ugettext as _ %>
-<%! from django.core.urlresolvers import reverse %>
<%!
+from django.utils.translation import ugettext as _
+from django.utils.translation import ungettext
+from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section, get_course_by_id
%>
@@ -29,18 +30,36 @@ from courseware.courses import course_image_url, get_course_about_section, get_c
## we will show the button View Dashboard
<% dashboard_url = reverse('dashboard') %>
${_("View Dashboard")}
- ${_("You have successfully been enrolled for {appended_course_names}. The following receipt has been emailed to"
- " {appended_recipient_emails}").format(appended_course_names=appended_course_names, appended_recipient_emails=appended_recipient_emails)}
+
+ ${_("You have successfully been enrolled for {course_names}. "
+ "The following receipt has been emailed to {receipient_emails}").format(
+ course_names="{course_names}".format(
+ course_names=appended_course_names
+ ),
+ receipient_emails="{receipient_emails}".format(
+ receipient_emails=appended_recipient_emails
+ ),
+ )}
+
% elif order_type == 'business':
- % if total_registration_codes > 1 :
- <% code_plural_form = 'codes' %>
- % else:
- <% code_plural_form = 'code' %>
- % endif
- ${_("You have successfully purchased {total_registration_codes} course registration codes "
- "for {appended_course_names}. "
- "The following receipt has been emailed to {appended_recipient_emails}"
- ).format(total_registration_codes=total_registration_codes, appended_course_names=appended_course_names, appended_recipient_emails=appended_recipient_emails)}
+ ${_("You have successfully purchased {items} for {course_names}. "
+ "The following receipt has been emailed to {receipient_emails}"
+ ).format(
+ items="{items}".format(
+ items=ungettext(
+ "{number} course registration code",
+ "{number} course registration codes",
+ total_registration_codes
+ ).format(number=total_registration_codes)
+ ),
+ course_names="{course_names}".format(
+ course_names=appended_course_names
+ ),
+ receipient_emails="{receipient_emails}".format(
+ receipient_emails=appended_recipient_emails,
+ )
+ )
+ }
% endif
@@ -93,7 +112,7 @@ from courseware.courses import course_image_url, get_course_about_section, get_c
${_('Company Name')}: