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.
This commit is contained in:
Truong David
2018-10-25 15:32:03 -04:00
parent a8e3624d9f
commit 9dd5cb86c1

View File

@@ -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.'