Commit 54a26cff by jportela

Add i18n month with strftime_localized in certificate views

parent a35e9744
......@@ -97,26 +97,8 @@ 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': _('May'),
'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=getTranslatedMonth(user_certificate.modified_date.strftime("%B")),
month=strftime_localized(user_certificate.modified_date,"%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