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
c28bed2b
Commit
c28bed2b
authored
Dec 30, 2014
by
David Baumgold
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6376 from edx/improve-i18n-dashboard-course-listing
Improve i18n on the LMS dashboard course listing page
parents
4020313e
4ec0295b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
25 deletions
+42
-25
common/djangoapps/student/tests/test_verification_status.py
+2
-2
lms/templates/dashboard/_dashboard_course_listing.html
+40
-23
No files found.
common/djangoapps/student/tests/test_verification_status.py
View file @
c28bed2b
...
@@ -214,8 +214,8 @@ class TestCourseVerificationStatus(UrlResetMixin, ModuleStoreTestCase):
...
@@ -214,8 +214,8 @@ class TestCourseVerificationStatus(UrlResetMixin, ModuleStoreTestCase):
BANNER_ALT_MESSAGES
=
{
BANNER_ALT_MESSAGES
=
{
None
:
"Honor"
,
None
:
"Honor"
,
VERIFY_STATUS_NEED_TO_VERIFY
:
"ID
Verified Pending Ribbon/Badge
"
,
VERIFY_STATUS_NEED_TO_VERIFY
:
"ID
verification pending
"
,
VERIFY_STATUS_SUBMITTED
:
"ID
Verified Pending Ribbon/Badge
"
,
VERIFY_STATUS_SUBMITTED
:
"ID
verification pending
"
,
VERIFY_STATUS_APPROVED
:
"ID Verified Ribbon/Badge"
,
VERIFY_STATUS_APPROVED
:
"ID Verified Ribbon/Badge"
,
VERIFY_STATUS_MISSED_DEADLINE
:
"Honor"
VERIFY_STATUS_MISSED_DEADLINE
:
"Honor"
}
}
...
...
lms/templates/dashboard/_dashboard_course_listing.html
View file @
c28bed2b
<
%
page
args=
"course, enrollment, show_courseware_link, cert_status, show_email_settings, course_mode_info, show_refund_option, is_paid_course, is_course_blocked, verification_status"
/>
<
%
page
args=
"course, enrollment, show_courseware_link, cert_status, show_email_settings, course_mode_info, show_refund_option, is_paid_course, is_course_blocked, verification_status"
/>
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<
%!
<
%!
from
django
.
core
.
urlresolvers
import
reverse
from
django
.
utils
.
translation
import
ugettext
as
_
from
courseware
.
courses
import
course_image_url
,
get_course_about_section
from
django
.
utils
.
translation
import
ungettext
from
student
.
helpers
import
(
from
django
.
core
.
urlresolvers
import
reverse
VERIFY_STATUS_NEED_TO_VERIFY
,
from
markupsafe
import
escape
VERIFY_STATUS_SUBMITTED
,
from
courseware
.
courses
import
course_image_url
,
get_course_about_section
VERIFY_STATUS_APPROVED
,
from
student
.
helpers
import
(
VERIFY_STATUS_MISSED_DEADLINE
VERIFY_STATUS_NEED_TO_VERIFY
,
)
VERIFY_STATUS_SUBMITTED
,
VERIFY_STATUS_APPROVED
,
VERIFY_STATUS_MISSED_DEADLINE
)
%
>
%
>
<
%
<
%
...
@@ -56,13 +58,15 @@
...
@@ -56,13 +58,15 @@
% if verification_status.get('status') in [VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED]:
% if verification_status.get('status') in [VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED]:
<span
class=
"sts-enrollment"
title=
"${_("
Your
verification
is
pending
")}"
>
<span
class=
"sts-enrollment"
title=
"${_("
Your
verification
is
pending
")}"
>
<span
class=
"label"
>
${_("Enrolled as: ")}
</span>
<span
class=
"label"
>
${_("Enrolled as: ")}
</span>
<img
class=
"deco-graphic"
src=
"${static.url('images/verified-ribbon.png')}"
alt=
"ID Verified Pending Ribbon/Badge"
/>
## Translators: This text describes that the student has enrolled for a Verified Certificate, but verification of identity is pending.
<div
class=
"sts-enrollment-value"
>
${_("Verified Pending")}
</div>
<img
class=
"deco-graphic"
src=
"${static.url('images/verified-ribbon.png')}"
alt=
"${_("
ID
verification
pending
")}"
/>
## Translators: The student is enrolled for a Verified Certificate, but verification of identity is pending.
<div
class=
"sts-enrollment-value"
>
${_("Verified: Pending Verification")}
</div>
</span>
</span>
% elif verification_status.get('status') == VERIFY_STATUS_APPROVED:
% elif verification_status.get('status') == VERIFY_STATUS_APPROVED:
<span
class=
"sts-enrollment"
title=
"${_("
You
'
re
enrolled
as
a
verified
student
")}"
>
<span
class=
"sts-enrollment"
title=
"${_("
You
'
re
enrolled
as
a
verified
student
")}"
>
<span
class=
"label"
>
${_("Enrolled as: ")}
</span>
<span
class=
"label"
>
${_("Enrolled as: ")}
</span>
<img
class=
"deco-graphic"
src=
"${static.url('images/verified-ribbon.png')}"
alt=
"
ID Verified Ribbon/Badge
"
/>
<img
class=
"deco-graphic"
src=
"${static.url('images/verified-ribbon.png')}"
alt=
"
${_("
ID
Verified
Ribbon
/
Badge
")}
"
/>
<div
class=
"sts-enrollment-value"
>
${_("Verified")}
</div>
<div
class=
"sts-enrollment-value"
>
${_("Verified")}
</div>
</span>
</span>
% else:
% else:
...
@@ -74,7 +78,7 @@
...
@@ -74,7 +78,7 @@
% else:
% else:
<span
class=
"sts-enrollment"
title=
"${_("
You
'
re
enrolled
as
a
verified
student
")}"
>
<span
class=
"sts-enrollment"
title=
"${_("
You
'
re
enrolled
as
a
verified
student
")}"
>
<span
class=
"label"
>
${_("Enrolled as: ")}
</span>
<span
class=
"label"
>
${_("Enrolled as: ")}
</span>
<img
class=
"deco-graphic"
src=
"${static.url('images/verified-ribbon.png')}"
alt=
"
ID Verified Ribbon/Badge
"
/>
<img
class=
"deco-graphic"
src=
"${static.url('images/verified-ribbon.png')}"
alt=
"
${_("
ID
Verified
Ribbon
/
Badge
")}
"
/>
<div
class=
"sts-enrollment-value"
>
${_("Verified")}
</div>
<div
class=
"sts-enrollment-value"
>
${_("Verified")}
</div>
</span>
</span>
% endif
% endif
...
@@ -134,7 +138,11 @@
...
@@ -134,7 +138,11 @@
<div
class=
"verification-reminder"
>
<div
class=
"verification-reminder"
>
% if verification_status['days_until_deadline'] is not None:
% if verification_status['days_until_deadline'] is not None:
<h4
class=
"message-title"
>
${_('Verification not yet complete.')}
</h4>
<h4
class=
"message-title"
>
${_('Verification not yet complete.')}
</h4>
<p
class=
"message-copy"
>
${_('You only have {days} days left to verify for this course.').format(days=verification_status['days_until_deadline'])}
</p>
<p
class=
"message-copy"
>
${ungettext(
'You only have {days} day left to verify for this course.',
'You only have {days} days left to verify for this course.',
verification_status['days_until_deadline']
).format(days=verification_status['days_until_deadline'])}
</p>
% else:
% else:
<h4
class=
"message-title"
>
${_('Almost there!')}
</h4>
<h4
class=
"message-title"
>
${_('Almost there!')}
</h4>
<p
class=
"message-copy"
>
${_('You still need to verify for this course.')}
</p>
<p
class=
"message-copy"
>
${_('You still need to verify for this course.')}
</p>
...
@@ -177,7 +185,7 @@
...
@@ -177,7 +185,7 @@
% else:
% else:
<a
class=
"action action-upgrade"
href=
"${reverse('course_modes_choose', kwargs={'course_id': unicode(course.id)})}?upgrade=True"
data-course-id=
"${course.id | h}"
data-user=
"${user.username | h}"
>
<a
class=
"action action-upgrade"
href=
"${reverse('course_modes_choose', kwargs={'course_id': unicode(course.id)})}?upgrade=True"
data-course-id=
"${course.id | h}"
data-user=
"${user.username | h}"
>
% endif
% endif
<img
class=
"deco-graphic"
src=
"${static.url('images/vcert-ribbon-s.png')}"
alt=
"
ID Verified Ribbon/Badge
"
>
<img
class=
"deco-graphic"
src=
"${static.url('images/vcert-ribbon-s.png')}"
alt=
"
${_("
ID
Verified
Ribbon
/
Badge
")}
"
>
<span
class=
"wrapper-copy"
>
<span
class=
"wrapper-copy"
>
<span
class=
"copy"
id=
"upgrade-to-verified"
>
${_("Upgrade to Verified Track")}
</span>
<span
class=
"copy"
id=
"upgrade-to-verified"
>
${_("Upgrade to Verified Track")}
</span>
</span>
</span>
...
@@ -189,14 +197,23 @@
...
@@ -189,14 +197,23 @@
%endif
%endif
% if is_course_blocked:
% if is_course_blocked:
<p
id=
"block-course-msg"
class=
"course-block"
>
<p
id=
"block-course-msg"
class=
"course-block"
>
${_("You can no longer access this course because payment has not yet been received. You "
${_("You can no longer access this course because payment has not yet been received. "
"can {link_start}contact the account holder{link_end} to request payment, or you can "
"You can {contact_link_start}contact the account holder{contact_link_end} "
"{unenroll_link_start}unenroll{unenroll_link_end} from this course").format(
"to request payment, or you can "
link_start='
<a
href=
"#"
>
',
"{unenroll_link_start}unenroll{unenroll_link_end} "
link_end='
</a>
',
"from this course").format(
unenroll_link_start='
<a
id=
"unregister_block_course"
rel=
"leanModal"
data-course-id=
"${course.id | h}"
data-course-number=
"${course.number | h}"
href=
"#unenroll-modal"
>
',
contact_link_start='
<a
href=
"#"
>
',
unenroll_link_end="
</a>
"
contact_link_end='
</a>
',
)}
unenroll_link_start=(
'
<a
id=
"unregister_block_course"
rel=
"leanModal"
'
'
data-course-id=
"{course_id}"
data-course-number=
"{course_number}"
'
'
href=
"#unenroll-modal"
>
'.format(
course_id=escape(course.id),
course_number=escape(course.number),
)
),
unenroll_link_end="
</a>
",
)}
</p>
</p>
%endif
%endif
...
...
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