Commit 13fe58e1 by Sarina Canelake

Merge pull request #7637 from louyihua/misc_i18n_1

Better i18n for LMS
parents f38b90fd 9a0da7d6
...@@ -392,7 +392,6 @@ ...@@ -392,7 +392,6 @@
<header> <header>
<h2 id="unenrollment-modal-title"> <h2 id="unenrollment-modal-title">
<span id='track-info'></span> <span id='track-info'></span>
<span id='unenroll_course_number'></span>?
<span id='refund-info'></span> <span id='refund-info'></span>
<span class="sr">, <span class="sr">,
## Translators: this text gives status on if the modal interface (a menu or piece of UI that takes the full focus of the screen) is open or not ## Translators: this text gives status on if the modal interface (a menu or piece of UI that takes the full focus of the screen) is open or not
......
...@@ -70,7 +70,8 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -70,7 +70,8 @@ site_status_msg = get_site_status_msg(course_id)
% endif % endif
%if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff: %if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff:
<li> <li>
<a href="${reverse('sysadmin')}">Sysadmin</a> ## Translators: This is short for "System administration".
<a href="${reverse('sysadmin')}">${_("Sysadmin")}</a>
</li> </li>
%endif %endif
</%block> </%block>
......
...@@ -21,8 +21,11 @@ from courseware.courses import course_image_url, get_course_about_section ...@@ -21,8 +21,11 @@ from courseware.courses import course_image_url, get_course_about_section
alt="${course.display_number_with_default | h} ${get_course_about_section(course, 'title')} Cover Image"/> alt="${course.display_number_with_default | h} ${get_course_about_section(course, 'title')} Cover Image"/>
</div> </div>
<div class="enrollment-details"> <div class="enrollment-details">
<div class="sub-title">${_("Confirm your enrollment for:")} <div class="sub-title">
<span class="course-date-label">${_("course dates")}</span> ${_("Confirm your enrollment for: {span_start}course dates{span_end}").format(
span_start='<span class="course-date-label">',
span_end='</span>'
)}
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
...@@ -37,11 +40,14 @@ from courseware.courses import course_image_url, get_course_about_section ...@@ -37,11 +40,14 @@ from courseware.courses import course_image_url, get_course_about_section
<hr> <hr>
<div> <div>
% if reg_code_already_redeemed: % if reg_code_already_redeemed:
<% dashboard_url = reverse('dashboard')%>
<p class="enrollment-text"> <p class="enrollment-text">
${_("You've clicked a link for an enrollment code that has already been used." ${_("You've clicked a link for an enrollment code that has already been used."
" Check your <a href={dashboard_url}>course dashboard</a> to see if you're enrolled in the course," " Check your {link_start}course dashboard{link_end} to see if you're enrolled in the course,"
" or contact your company's administrator.").format(dashboard_url=dashboard_url)} " or contact your company's administrator."
).format(
link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
link_end='</a>'
)}
</p> </p>
% elif redemption_success: % elif redemption_success:
<p class="enrollment-text"> <p class="enrollment-text">
...@@ -49,23 +55,23 @@ from courseware.courses import course_image_url, get_course_about_section ...@@ -49,23 +55,23 @@ from courseware.courses import course_image_url, get_course_about_section
" This course has now been added to your dashboard.").format(course_name=course.display_name)} " This course has now been added to your dashboard.").format(course_name=course.display_name)}
</p> </p>
% elif registered_for_course: % elif registered_for_course:
<% dashboard_url = reverse('dashboard')%>
<p class="enrollment-text"> <p class="enrollment-text">
${_("You're already enrolled for this course." ${_("You're already enrolled for this course."
" Visit your <a href={dashboard_url}>dashboard</a> to see the course.").format(dashboard_url=dashboard_url)} " Visit your {link_start}dashboard{link_end} to see the course."
).format(
link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
link_end='</a>'
)}
</p> </p>
% elif course_full: % elif course_full:
<% dashboard_url = reverse('dashboard')%>
<p class="enrollment-text"> <p class="enrollment-text">
${_("The course you are enrolling for is full.")} ${_("The course you are enrolling for is full.")}
</p> </p>
% elif enrollment_closed: % elif enrollment_closed:
<% dashboard_url = reverse('dashboard')%>
<p class="enrollment-text"> <p class="enrollment-text">
${_("The course you are enrolling for is closed.")} ${_("The course you are enrolling for is closed.")}
</p> </p>
% elif redeem_code_error: % elif redeem_code_error:
<% dashboard_url = reverse('dashboard')%>
<p class="enrollment-text"> <p class="enrollment-text">
${_("There was an error processing your redeem code.")} ${_("There was an error processing your redeem code.")}
</p> </p>
......
...@@ -24,8 +24,11 @@ from courseware.courses import course_image_url, get_course_about_section ...@@ -24,8 +24,11 @@ from courseware.courses import course_image_url, get_course_about_section
)}" /> )}" />
</div> </div>
<div class="enrollment-details"> <div class="enrollment-details">
<div class="sub-title">${_("Confirm your enrollment for:")} <div class="sub-title">
<span class="course-date-label">${_("course dates")}</span> ${_("Confirm your enrollment for: {span_start}course dates{span_end}").format(
span_start='<span class="course-date-label">',
span_end='</span>'
)}
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
...@@ -50,7 +53,7 @@ from courseware.courses import course_image_url, get_course_about_section ...@@ -50,7 +53,7 @@ from courseware.courses import course_image_url, get_course_about_section
"to see if you're enrolled in the course, or contact your " "to see if you're enrolled in the course, or contact your "
"company's administrator." "company's administrator."
).format( ).format(
link_start='<a href="{url}">'.format(url=reverse('dashboard')), link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
link_end='</a>', link_end='</a>',
)} )}
</p> </p>
...@@ -69,7 +72,7 @@ from courseware.courses import course_image_url, get_course_about_section ...@@ -69,7 +72,7 @@ from courseware.courses import course_image_url, get_course_about_section
"You're already enrolled for this course. " "You're already enrolled for this course. "
"Visit your {link_start}dashboard{link_end} to see the course." "Visit your {link_start}dashboard{link_end} to see the course."
).format( ).format(
link_start='<a href="{url}">'.format(url=reverse('dashboard')), link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
link_end='</a>', link_end='</a>',
)} )}
</p> </p>
......
...@@ -113,16 +113,14 @@ from django.utils.translation import ugettext as _ ...@@ -113,16 +113,14 @@ from django.utils.translation import ugettext as _
${form_html} ${form_html}
</div> </div>
<p> <p>
${_('After this purchase is complete,')}<br/><b>${order.user.username}</b> ${_('After this purchase is complete, {username} will be enrolled in this course.').format(username=u'<br/><b>{username}</b>'.format(username=order.user.username))}
${_('will be enrolled in this course.')}
</p> </p>
</div> </div>
% else: % else:
<div name="payment"> <div name="payment">
${form_html} ${form_html}
<p> <p>
${_('After this purchase is complete,')}<br/><b>${order.user.username}</b> ${_('After this purchase is complete, {username} will be enrolled in this course.').format(username=u'<br/><b>{username}</b>'.format(username=order.user.username))}
${_('will be enrolled in this course.')}
</p> </p>
</div> </div>
<div name="billing" class="hidden"> <div name="billing" class="hidden">
......
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