Commit e1ad295a by George Song Committed by GitHub

Merge pull request #15764 from pepeportela/teltek/i18n_certificate_date_utils

Teltek/i18n certificate date utils
parents 66fe1c9a 2bea8be0
...@@ -43,6 +43,7 @@ from openedx.core.lib.courses import course_image_url ...@@ -43,6 +43,7 @@ from openedx.core.lib.courses import course_image_url
from student.models import LinkedInAddToProfileConfiguration from student.models import LinkedInAddToProfileConfiguration
from util import organizations_helpers as organization_api from util import organizations_helpers as organization_api
from util.views import handle_500 from util.views import handle_500
from util.date_utils import strftime_localized
from xmodule.modulestore.django import modulestore from xmodule.modulestore.django import modulestore
from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule.modulestore.exceptions import ItemNotFoundError
...@@ -98,7 +99,7 @@ def _update_certificate_context(context, user_certificate, platform_name): ...@@ -98,7 +99,7 @@ def _update_certificate_context(context, user_certificate, platform_name):
# Translators: The format of the date includes the full name of the month # Translators: The format of the date includes the full name of the month
context['certificate_date_issued'] = _('{month} {day}, {year}').format( context['certificate_date_issued'] = _('{month} {day}, {year}').format(
month=user_certificate.modified_date.strftime("%B"), month=strftime_localized(user_certificate.modified_date, "%B"),
day=user_certificate.modified_date.day, day=user_certificate.modified_date.day,
year=user_certificate.modified_date.year year=user_certificate.modified_date.year
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment