diff --git a/lms/djangoapps/certificates/views/webview.py b/lms/djangoapps/certificates/views/webview.py index 5f9afcb479..4518a02884 100644 --- a/lms/djangoapps/certificates/views/webview.py +++ b/lms/djangoapps/certificates/views/webview.py @@ -108,11 +108,7 @@ def _update_certificate_context(context, course, user_certificate, platform_name # Translators: The format of the date includes the full name of the month date = display_date_for_certificate(course, user_certificate) - context['certificate_date_issued'] = _(u'{month} {day}, {year}').format( - month=strftime_localized(date, "%B"), - day=date.day, - year=date.year - ) + context['certificate_date_issued'] = strftime_localized(date, settings.CERTIFICATE_DATE_FORMAT) # Translators: This text represents the verification of the certificate context['document_meta_description'] = _(u'This is a valid {platform_name} certificate for {user_name}, ' diff --git a/lms/envs/common.py b/lms/envs/common.py index 63c9cdabe9..e14b252dc5 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1047,6 +1047,10 @@ DJFS = { 'url_root': '/static/django-pyfs', } +# Set certificate issued date format. It supports all formats supported by +# `common.djangoapps.util.date_utils.strftime_localized`. +CERTIFICATE_DATE_FORMAT = "%B %-d, %Y" + ### Dark code. Should be enabled in local settings for devel. ENABLE_MULTICOURSE = False # set to False to disable multicourse display (see lib.util.views.edXhome)