Commit eda45d37 by Sarina Canelake

Merge pull request #9192 from edx/sarina/fix-i18n

Add more context to translation strings
parents 98bd1d39 71d5180b
......@@ -13,6 +13,7 @@
delete this.server_api['sort_order']; // Sort order is not specified for the Team API
this.registerSortableField('name', gettext('name'));
// Translators: This refers to the number of teams (a count of how many teams there are)
this.registerSortableField('team_count', gettext('team count'));
},
......
......@@ -75,6 +75,7 @@ from django.utils.http import urlquote_plus
</div>
%elif is_generating:
<div class="msg-content">
# Translators: This message appears to users when the system is processessing course certificates, which can take a few hours.
<h2 class="title">${_("We're working on it...")}</h2>
<p class="copy">${_("We're creating your certificate. You can keep working in your courses and a link to it will appear here and on your Dashboard when it is ready.")}</p>
</div>
......@@ -108,7 +109,10 @@ from django.utils.http import urlquote_plus
<span class="eligibility_msg">${_("{student_name}, you are no longer eligible for credit in this course.").format(student_name=student.profile.name)}</span>
%elif credit_course_requirements['eligibility_status'] == 'eligible':
<span class="eligibility_msg">${_("{student_name}, you have met the requirements for credit in this course.").format(student_name=student.profile.name)}
${_("{link} to purchase course credit.").format(link="<a href={url}>{url_name}</a>".format(url = reverse('dashboard'), url_name = _('Go to your dashboard')))}
${_("{a_start}Go to your dashboard{a_end} to purchase course credit.").format(
a_start=u"<a href={url}>".format(url=reverse('dashboard')),
a_end="</a>"
)}
</span>
%elif credit_course_requirements['eligibility_status'] == 'partial_eligible':
<span>${_("{student_name}, you have not yet met the requirements for credit.").format(student_name=student.profile.name)}</span>
......@@ -173,7 +177,7 @@ from django.utils.http import urlquote_plus
${ section['display_name'] }
%if total > 0 or earned > 0:
<span class="sr">
${_("{earned:.3n} of {total:.3n} possible points").format( earned = float(earned), total = float(total) )}
${_("{earned} of {total} possible points").format(earned='{:.3n}'.format(float(earned)), total='{:.3n}'.format(float(total)))}
</span>
%endif
</a>
......
......@@ -30,10 +30,12 @@
</p>
<p>
${_(u"Congratulations! You are eligible to receive course credit for successfully completing your edX course! Click {link} to get your credit now.").format(
link=u'<a href="{dashboard_url}">here</a>'.format(
${_(u"Congratulations! You are eligible to receive course credit for successfully completing your {platform_name} course! {link_start}Get your credit now.{link_end}").format(
link_start=u'<a href="{dashboard_url}">'.format(
dashboard_url=dashboard_link
)
),
link_end=u'</a>',
platform_name=settings.PLATFORM_NAME
)}
</p>
......@@ -42,16 +44,18 @@
</p>
<p>
${_(u'To get course credit, simply go to your {link} and click the <b>Get Credit</b> button. No application, transcript, or grade report is required.').format(
link=u'<a href="{dashboard_url}">edX dashboard</a>'.format(
${_(u'To get course credit, simply go to your {link_start}{platform_name} dashboard{link_end} and click the <b>Get Credit</b> button. No application, transcript, or grade report is required.').format(
link_start=u'<a href="{dashboard_url}">'.format(
dashboard_url=dashboard_link
)
),
link_end=u'</a>',
platform_name=settings.PLATFORM_NAME
)}
</p>
<p>
${_(u"We hope you enjoyed the course, and we hope to see you in future edX courses!")}<br/>
${_(u"The edX team")}
${_(u"We hope you enjoyed the course, and we hope to see you in future {platform_name} courses!").format(platform_name=settings.PLATFORM_NAME)}<br/>
${_(u"The {platform_name} Team").format(platform_name=settings.PLATFORM_NAME)}
</p>
</td>
</tr>
......@@ -61,8 +65,10 @@
<tr>
<td class="cn-footer-content">
<p>
${_(u"For more information on credit at edX, click {link}.").format(
link=u'<a href="https://www.edx.org/gfa">here</a>'
${_(u"{link_start}Click here for more information on credit at {platform_name}{link_end}.").format(
link_start=u'<a href="https://www.edx.org/gfa">',
link_end=u'</a>',
platform_name=settings.PLATFORM_NAME
)}
</p>
</td>
......
......@@ -7,7 +7,7 @@
%>
<%namespace name='static' file='../static_content.html'/>
% if credit_status["provider_name"]:
<% provider_link='<a href="{}" target="_blank">{}</a>'.format(credit_status["provider_status_url"],credit_status["provider_name"]) %>
<% provider_link='<a href="{}" target="_blank">{}</a>'.format(credit_status["provider_status_url"], credit_status["provider_name"]) %>
% endif
% if credit_status["eligible"]:
......@@ -21,10 +21,7 @@
</p>
% if not credit_status["purchased"] and not credit_status["error"] :
<p class="message-copy credit-eligibility-msg">
${_("You are now eligible for credit. {congrats}").format(
congrats="<b>Congratulations</b>",
)
}
${_("You are now eligible for credit. <b>Congratulations!</b>")}
</p>
<div class="purchase_credit">
<a class="btn credit-btn purchase-credit-btn" href="${settings.ECOMMERCE_PUBLIC_URL_ROOT}/credit/checkout/${credit_status['course_key']}" target="_blank" data-course-key="${credit_status['course_key']}">${_("Get credit")}</a>
......@@ -32,16 +29,20 @@
% elif credit_status["request_status"] in [None, "pending"] and not credit_status["error"] :
% if credit_status["request_status"] == "pending":
<p class="message-copy credit-request-pending-msg">
${_("Thank you. Your credit is processing. Please see {link} for more information.").format(
link=provider_link,
## Translators: link_to_provider_site is a link to an external webpage. The text of the link will be the name of a
## credit provider, such as 'State University' or 'Happy Fun Company'
${_("Thank you. Your credit is processing. Please see {link_to_provider_site} for more information.").format(
link_to_provider_site=provider_link,
)
}
</p>
<button class="btn credit-btn pending-credit-btn" data-course-key="${credit_status['course_key']}" data-user="${user.username}" data-provider="${credit_status['provider_id']}">${_("Learn more")}</button>
% elif credit_status["request_status"] is None:
<p class="message-copy credit-request-pending-msg">
${_("Thank you for your purchase. Please proceed to {link} to finalize your credit.").format(
link=provider_link,
## Translators: link_to_provider_site is a link to an external webpage. The text of the link will be the name of a
## credit provider, such as 'State University' or 'Happy Fun Company'
${_("Thank you for your purchase. Please proceed to {link_to_provider_site} to finalize your credit.").format(
link_to_provider_site=provider_link,
)
}
</p>
......@@ -51,17 +52,20 @@
<form id="credit-pending-form"> </form>
% elif credit_status["request_status"] == "approved" and not credit_status["error"] :
<p class="message-copy credit-request-approved-msg">
${_("Your credit has been processed and approved. {congrats}. Please see {link} for more information.").format(
congrats="<b>Congratulations</b>",
link=provider_link,
## Translators: link_to_provider_site is a link to an external webpage. The text of the link will be the name of a
## credit provider, such as 'State University' or 'Happy Fun Company'
${_("Your credit has been processed and approved. <b>Congratulations</b>. Please see {link_to_provider_site} for more information.").format(
link_to_provider_site=provider_link,
)
}
</p>
<a class="btn credit-btn" href="${credit_status['provider_status_url']}" target="_blank">${_("Access credit")}</a>
% elif credit_status["request_status"] == "rejected" and not credit_status["error"] :
<p class="message-copy credit-request-rejected-msg">
${_("Your credit has been processed but denied. Please contact {link} for more information.").format(
link=provider_link,
## Translators: link_to_provider_site is a link to an external webpage. The text of the link will be the name of a
## credit provider, such as 'State University' or 'Happy Fun Company'
${_("Your credit has been processed but denied. Please contact {link_to_provider_site} for more information.").format(
link_to_provider_site=provider_link,
)
}
</p>
......
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