From 9dd5cb86c192af9339fb1e7d9e55c0482878b258 Mon Sep 17 00:00:00 2001 From: Truong David Date: Thu, 25 Oct 2018 15:32:03 -0400 Subject: [PATCH] Fix translation issue related to message showed on courseware progress page related to certification and course mode. Part 2 of 2. Use ugettext_lazy instead of ugettext to ensure the strings shown are in the language the user chose. Otherwise the strings are in the platform language. Keep the original ugettext for function financial_assistance_form. The test for that function fails if the text is not in english. --- lms/djangoapps/courseware/views/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/courseware/views/views.py b/lms/djangoapps/courseware/views/views.py index a5f6d4c3f0..8906b253f0 100644 --- a/lms/djangoapps/courseware/views/views.py +++ b/lms/djangoapps/courseware/views/views.py @@ -21,7 +21,8 @@ from django.urls import reverse from django.utils.decorators import method_decorator from django.utils.http import urlquote_plus from django.utils.text import slugify -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import ugettext from django.views.decorators.cache import cache_control from django.views.decorators.clickjacking import xframe_options_exempt from django.views.decorators.csrf import ensure_csrf_cookie @@ -1692,7 +1693,7 @@ def financial_assistance_form(request): 'defaultValue': '', 'required': True, 'options': enrolled_courses, - 'instructions': _( + 'instructions': ugettext( 'Select the course for which you want to earn a verified certificate. If' ' the course does not appear in the list, make sure that you have enrolled' ' in the audit track for the course.'