Commit 9a0da7d6 by louyihua

Better i18n

Combine sentences in several pages for better translation.
parent b6265c44
......@@ -392,7 +392,6 @@
<header>
<h2 id="unenrollment-modal-title">
<span id='track-info'></span>
<span id='unenroll_course_number'></span>?
<span id='refund-info'></span>
<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
......
......@@ -70,7 +70,8 @@ site_status_msg = get_site_status_msg(course_id)
% endif
%if settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff:
<li>
<a href="${reverse('sysadmin')}">Sysadmin</a>
## Translators: This is short for "System administration".
<a href="${reverse('sysadmin')}">${_("Sysadmin")}</a>
</li>
%endif
</%block>
......
......@@ -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"/>
</div>
<div class="enrollment-details">
<div class="sub-title">${_("Confirm your enrollment for:")}
<span class="course-date-label">${_("course dates")}</span>
<div class="sub-title">
${_("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>
......@@ -37,11 +40,14 @@ from courseware.courses import course_image_url, get_course_about_section
<hr>
<div>
% if reg_code_already_redeemed:
<% dashboard_url = reverse('dashboard')%>
<p class="enrollment-text">
${_("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,"
" or contact your company's administrator.").format(dashboard_url=dashboard_url)}
" Check your {link_start}course dashboard{link_end} to see if you're enrolled in the course,"
" or contact your company's administrator."
).format(
link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
link_end='</a>'
)}
</p>
% elif redemption_success:
<p class="enrollment-text">
......@@ -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)}
</p>
% elif registered_for_course:
<% dashboard_url = reverse('dashboard')%>
<p class="enrollment-text">
${_("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>
% elif course_full:
<% dashboard_url = reverse('dashboard')%>
<p class="enrollment-text">
${_("The course you are enrolling for is full.")}
</p>
% elif enrollment_closed:
<% dashboard_url = reverse('dashboard')%>
<p class="enrollment-text">
${_("The course you are enrolling for is closed.")}
</p>
% elif redeem_code_error:
<% dashboard_url = reverse('dashboard')%>
<p class="enrollment-text">
${_("There was an error processing your redeem code.")}
</p>
......
......@@ -24,8 +24,11 @@ from courseware.courses import course_image_url, get_course_about_section
)}" />
</div>
<div class="enrollment-details">
<div class="sub-title">${_("Confirm your enrollment for:")}
<span class="course-date-label">${_("course dates")}</span>
<div class="sub-title">
${_("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>
......@@ -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 "
"company's administrator."
).format(
link_start='<a href="{url}">'.format(url=reverse('dashboard')),
link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
link_end='</a>',
)}
</p>
......@@ -69,7 +72,7 @@ from courseware.courses import course_image_url, get_course_about_section
"You're already enrolled for this course. "
"Visit your {link_start}dashboard{link_end} to see the course."
).format(
link_start='<a href="{url}">'.format(url=reverse('dashboard')),
link_start=u'<a href="{url}">'.format(url=reverse('dashboard')),
link_end='</a>',
)}
</p>
......
......@@ -113,16 +113,14 @@ from django.utils.translation import ugettext as _
${form_html}
</div>
<p>
${_('After this purchase is complete,')}<br/><b>${order.user.username}</b>
${_('will be enrolled in this course.')}
${_('After this purchase is complete, {username} will be enrolled in this course.').format(username=u'<br/><b>{username}</b>'.format(username=order.user.username))}
</p>
</div>
% else:
<div name="payment">
${form_html}
<p>
${_('After this purchase is complete,')}<br/><b>${order.user.username}</b>
${_('will be enrolled in this course.')}
${_('After this purchase is complete, {username} will be enrolled in this course.').format(username=u'<br/><b>{username}</b>'.format(username=order.user.username))}
</p>
</div>
<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