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
b841176e
Commit
b841176e
authored
Aug 04, 2017
by
jportela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add i18n month dict to certificate using @amangano-edx solution in PR #14836
parent
2646858c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletions
+19
-1
lms/djangoapps/certificates/views/webview.py
+19
-1
No files found.
lms/djangoapps/certificates/views/webview.py
View file @
b841176e
...
@@ -97,8 +97,26 @@ def _update_certificate_context(context, user_certificate, platform_name):
...
@@ -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
# 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
(
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
,
day
=
user_certificate
.
modified_date
.
day
,
year
=
user_certificate
.
modified_date
.
year
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