From 94af663683cc9da811bd891faf962d9ffb040978 Mon Sep 17 00:00:00 2001 From: Waheed Ahmed Date: Fri, 14 Mar 2014 16:38:47 +0500 Subject: [PATCH] Submission history view not internationalized. LMS-2167 --- lms/djangoapps/courseware/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index aefa9faffd..854ba5e5f6 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -2,6 +2,7 @@ import logging import urllib from collections import defaultdict +from django.utils.translation import ugettext as _ from django.conf import settings from django.core.context_processors import csrf @@ -721,9 +722,12 @@ def submission_history(request, course_id, student_username, location): student_id=student.id ) except User.DoesNotExist: - return HttpResponse(escape("User {0} does not exist.".format(student_username))) + return HttpResponse(escape(_(u'User {username} does not exist.').format(username=student_username))) except StudentModule.DoesNotExist: - return HttpResponse(escape("{0} has never accessed problem {1}".format(student_username, location))) + return HttpResponse(escape(_(u'User {username} has never accessed problem {location}').format( + username=student_username, + location=location + ))) history_entries = StudentModuleHistory.objects.filter( student_module=student_module