Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
54a26cff
Commit
54a26cff
authored
Aug 04, 2017
by
jportela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add i18n month with strftime_localized in certificate views
parent
a35e9744
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
19 deletions
+1
-19
lms/djangoapps/certificates/views/webview.py
+1
-19
No files found.
lms/djangoapps/certificates/views/webview.py
View file @
54a26cff
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment