Commit b841176e by jportela

Add i18n month dict to certificate using @amangano-edx solution in PR #14836

parent 2646858c
......@@ -97,8 +97,26 @@ def _update_certificate_context(context, user_certificate, platform_name):
)
# Translators: The format of the date includes the full name of the month
MONTHS={
'january': _('January'),
'february': _('February'),
'march': _('March'),
'april': _('April'),
'may': _('Mayy'),
'june': _('June'),
'july': _('July'),
'august': _('August'),
'september': _('September'),
'october': _('October'),
'november': _('November'),
'december': _('December')
}
def getTranslatedMonth(month):
return MONTHS[month.lower()]
context['certificate_date_issued'] = _('{month} {day}, {year}').format(
month=_(user_certificate.modified_date.strftime("%B")),
month=getTranslatedMonth(user_certificate.modified_date.strftime("%B")),
day=user_certificate.modified_date.day,
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