## Translators: start_link and end_link will be replaced with HTML tags;
## please do not translate these.
-
${_('Your current verification will expire before the verification deadline for this course. {start_link}Re-verify your identity now{end_link} using a webcam and a government-issued ID.').format(start_link=''.format(href=reverse('verify_student_reverify')), end_link='')}
+
${Text(_('Your current verification will expire before the verification deadline for this course. {start_link}Re-verify your identity now{end_link} using a webcam and a government-issued ID.')).format(start_link=HTML(''.format(href=reverse('verify_student_reverify'))), end_link=HTML(''))}
% endif
% endif
@@ -330,13 +330,23 @@ from student.helpers import (
${_("Pursue a {cert_name_long} to highlight the knowledge and skills you gain in this course.").format(cert_name_long=cert_name_long)}
- ${_("It's official. It's easily shareable. It's a proven motivator to complete the course. {link_start}Learn more about the verified {cert_name_long}{link_end}.").format(link_start=''.format(marketing_link('WHAT_IS_VERIFIED_CERT'), enrollment.course_id), link_end="", cert_name_long=cert_name_long)}
+ ${Text(_("It's official. It's easily shareable. "
+ "It's a proven motivator to complete the course. {line_break}"
+ "{link_start}Learn more about the verified {cert_name_long}{link_end}.")).format(
+ line_break=HTML(' '),
+ link_start=HTML(''.format(
+ marketing_link('WHAT_IS_VERIFIED_CERT'),
+ enrollment.course_id
+ )),
+ link_end=HTML(''),
+ cert_name_long=cert_name_long
+ )}
- ${_("You must successfully complete {link_start}{prc_display}{link_end} before you begin this course.").format(
- link_start=''.format(prc_target),
- link_end='',
+ ${Text(_("You must successfully complete {link_start}{prc_display}{link_end} before you begin this course.")).format(
+ link_start=HTML(''.format(prc_target)),
+ link_end=HTML(''),
prc_display=course_requirements['courses'][0]['display'],
)}
@@ -41,22 +44,30 @@ from xmodule.tabs import CourseTabList
%>
% if discussion_link:
-
${_('For questions on course lectures, homework, tools, or materials for this course, post in the {link_start}course discussion forum{link_end}.').format(
- link_start=''.format(url=discussion_link),
- link_end='',
+
${Text(_('For {strong_start}questions on course lectures, homework, tools, or materials for this course{strong_end}, post in the {link_start}course discussion forum{link_end}.')).format(
+ strong_start=HTML(''),
+ strong_end=HTML(''),
+ link_start=HTML('').format(
+ url=discussion_link
+ ),
+ link_end=HTML(''),
)}
% endif
-
${_('Have general questions about {platform_name}? You can find lots of helpful information in the {platform_name} {link_start}FAQ{link_end}.').format(
- link_start=''.format(
+
${_('Have a question about something specific? You can contact the {platform_name} general support team directly:').format(
+
${Text(_('Have a {strong_start}question about something specific{strong_end}? You can contact the {platform_name} general support team directly:')).format(
+ strong_start=HTML(''),
+ strong_end=HTML(''),
platform_name=static.get_platform_name()
)}
@@ -99,7 +110,7 @@ from xmodule.tabs import CourseTabList
% if course:
-
+
% endif
- ${_(
+ ${Text(_(
'Thank you for your inquiry or feedback. We typically respond to a request '
'within one business day (Monday to Friday, {open_time} UTC to {close_time} UTC.) In the meantime, please '
'review our {link_start}detailed FAQs{link_end} where most questions have '
'already been answered.'
- ).format(
+ )).format(
open_time=open_time,
close_time=close_time,
- link_start=''.format(marketing_link('FAQ')),
- link_end=''
+ link_start=HTML('').format(marketing_link('FAQ')),
+ link_end=HTML('')
)}
@@ -201,29 +212,32 @@ from xmodule.tabs import CourseTabList
$("#feedback_link_problem").click(function(event) {
showFeedback(
event,
- "${_('problem')}",
- "${_('Report a Problem')}",
- "${_('Brief description of the problem')}" + "*",
- "${_('Details of the problem you are encountering')}" + "*" + "" +
- "${_('Include error messages, steps which lead to the issue, etc.')}" + ""
+ "${_('problem') | n, js_escaped_string}",
+ "${_('Report a Problem') | n, js_escaped_string}",
+ "${_('Brief description of the problem') + '*' | n, js_escaped_string}" ,
+ "${Text(_('Details of the problem you are encountering{asterisk}{begin_span}Include error messages, steps which lead to the issue, etc.{end_span}')).format(
+ asterisk='*',
+ begin_span=HTML(''),
+ end_span=HTML(''),
+ ) | n, js_escaped_string}"
);
});
$("#feedback_link_suggestion").click(function(event) {
showFeedback(
event,
- "${_('suggestion')}",
- "${_('Make a Suggestion')}",
- "${_('Brief description of your suggestion')}" + "*",
- "${_('Details')}" + "*"
+ "${_('suggestion') | n, js_escaped_string}",
+ "${_('Make a Suggestion') | n, js_escaped_string}",
+ "${_('Brief description of your suggestion') + '*' | n, js_escaped_string}",
+ "${_('Details') + '*' | n, js_escaped_string}"
);
});
$("#feedback_link_question").click(function(event) {
showFeedback(
event,
- "${_('question')}",
- "${_('Ask a Question')}",
- "${_('Brief summary of your question')}" + "*",
- "${_('Details')}" + "*"
+ "${_('question') | n, js_escaped_string}",
+ "${_('Ask a Question') | n, js_escaped_string}",
+ "${_('Brief summary of your question') + '*' | n, js_escaped_string}",
+ "${_('Details') + '*' | n, js_escaped_string}"
);
});
$("#feedback_form").submit(function() {
@@ -251,21 +265,21 @@ from xmodule.tabs import CourseTabList
$("#feedback_error").html(responseData.error).stop().css("display", "block");
} else {
// If no data (or malformed data) is returned, a server error occurred
- htmlStr = "${_('An error has occurred.')}";
+ htmlStr = "${_('An error has occurred.') | n, js_escaped_string}";
% if settings.FEEDBACK_SUBMISSION_EMAIL:
- htmlStr += " " + _.template(
- "${_('Please {link_start}send us e-mail{link_end}.')}", {interpolate: /\{(.+?)\}/g})(
- {link_start: '', link_end: ''}
- );
+ htmlStr += " " + "${Text(_('Please {link_start}send us e-mail{link_end}.')).format(
+ link_start=HTML(''),
+ link_end=HTML(''),
+ ) | n, js_escaped_string}";
% else:
// If no email is configured, we can't do much other than
// ask the user to try again later
- htmlStr += " " + "${_('Please try again later.')}";
+ htmlStr += " " + "${_('Please try again later.') | n, js_escaped_string}";
% endif
$("#feedback_error").html(htmlStr).stop().css("display", "block");
% if settings.FEEDBACK_SUBMISSION_EMAIL:
$("#feedback_email").click(function(e) {
- mailto = "mailto:" + "${settings.FEEDBACK_SUBMISSION_EMAIL}" +
+ mailto = "mailto:" + "${settings.FEEDBACK_SUBMISSION_EMAIL | n, js_escaped_string}" +
"?subject=" + $("#feedback_form input[name='subject']").val() +
"&body=" + $("#feedback_form textarea[name='details']").val();
window.open(mailto);
diff --git a/lms/templates/navigation-edx.html b/lms/templates/navigation-edx.html
index 7665fb80f2..f24fe5ba71 100644
--- a/lms/templates/navigation-edx.html
+++ b/lms/templates/navigation-edx.html
@@ -1,4 +1,5 @@
## mako
+<%page expression_filter="h"/>
<%namespace name='static' file='static_content.html'/>
<%namespace file='main.html' import="login_query"/>
<%!
@@ -48,9 +49,9 @@ site_status_msg = get_site_status_msg(course_id)
% if course and not disable_courseware_header: