Commit 0d3c4499 by Calen Pennington Committed by Adam Palay

LMS i18n from Tsinghua

parent 8573ac39
...@@ -17,3 +17,5 @@ input_encoding = utf-8 ...@@ -17,3 +17,5 @@ input_encoding = utf-8
input_encoding = utf-8 input_encoding = utf-8
[mako: common/templates/**.html] [mako: common/templates/**.html]
input_encoding = utf-8 input_encoding = utf-8
[mako: cms/templates/emails/**.txt]
input_encoding = utf-8
{ {
"locales" : ["en", "es"], "locales" : ["en", "zh_CN"],
"dummy-locale" : "fr" "dummy-locale" : "fr"
} }
...@@ -90,8 +90,8 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase): ...@@ -90,8 +90,8 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase):
""" """
Ensure that the response has the course navigator. Ensure that the response has the course navigator.
""" """
self.assertTrue("course info" in resp.content.lower()) self.assertContains(resp, "Course Info")
self.assertTrue("courseware" in resp.content.lower()) self.assertContains(resp, "courseware")
def test_course_navigator(self): def test_course_navigator(self):
"""" """"
......
...@@ -120,9 +120,8 @@ class PageLoaderTestCase(LoginEnrollmentTestCase): ...@@ -120,9 +120,8 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
self.assertEqual(response.redirect_chain[0][1], 302) self.assertEqual(response.redirect_chain[0][1], 302)
if check_content: if check_content:
unavailable_msg = "this module is temporarily unavailable" self.assertNotContains(response, "this module is temporarily unavailable")
self.assertEqual(response.content.find(unavailable_msg), -1) self.assertNotIsInstance(descriptor, ErrorDescriptor)
self.assertFalse(isinstance(descriptor, ErrorDescriptor))
@override_settings(MODULESTORE=TEST_DATA_XML_MODULESTORE) @override_settings(MODULESTORE=TEST_DATA_XML_MODULESTORE)
......
...@@ -166,7 +166,7 @@ XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds ...@@ -166,7 +166,7 @@ XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds
############################# SET PATH INFORMATION ############################# ############################# SET PATH INFORMATION #############################
PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /mitx/lms PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/lms
REPO_ROOT = PROJECT_ROOT.dirname() REPO_ROOT = PROJECT_ROOT.dirname()
COMMON_ROOT = REPO_ROOT / "common" COMMON_ROOT = REPO_ROOT / "common"
ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /mitx is in ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /mitx is in
...@@ -381,6 +381,8 @@ LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html ...@@ -381,6 +381,8 @@ LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html
USE_I18N = True USE_I18N = True
USE_L10N = True USE_L10N = True
# Localization strings (e.g. django.po) are under this directory
LOCALE_PATHS = (REPO_ROOT + '/conf/locale',) # edx-platform/conf/locale/
# Messages # Messages
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
...@@ -486,6 +488,9 @@ MIDDLEWARE_CLASSES = ( ...@@ -486,6 +488,9 @@ MIDDLEWARE_CLASSES = (
'course_wiki.course_nav.Middleware', 'course_wiki.course_nav.Middleware',
# Detects user-requested locale from 'accept-language' header in http request
'django.middleware.locale.LocaleMiddleware',
'django.middleware.transaction.TransactionMiddleware', 'django.middleware.transaction.TransactionMiddleware',
# 'debug_toolbar.middleware.DebugToolbarMiddleware', # 'debug_toolbar.middleware.DebugToolbarMiddleware',
......
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" /> <%inherit file="main.html" />
...@@ -7,7 +8,7 @@ ...@@ -7,7 +8,7 @@
<section class="basic_stats"> <section class="basic_stats">
<div class="edx_summary"> <div class="edx_summary">
<h2>edX-wide Summary</h2> <h2>${_("edX-wide Summary")}</h2>
<table style="margin-left:auto;margin-right:auto;width:50%"> <table style="margin-left:auto;margin-right:auto;width:50%">
% for key in results["scalars"]: % for key in results["scalars"]:
<tr> <tr>
......
<%! from django.utils.translation import ugettext as _ %>
<div class="annotatable-wrapper"> <div class="annotatable-wrapper">
<div class="annotatable-header"> <div class="annotatable-header">
% if display_name is not UNDEFINED and display_name is not None: % if display_name is not UNDEFINED and display_name is not None:
...@@ -8,8 +10,8 @@ ...@@ -8,8 +10,8 @@
% if instructions_html is not UNDEFINED and instructions_html is not None: % if instructions_html is not UNDEFINED and instructions_html is not None:
<div class="annotatable-section shaded"> <div class="annotatable-section shaded">
<div class="annotatable-section-title"> <div class="annotatable-section-title">
Instructions ${_("Instructions")}
<a class="annotatable-toggle annotatable-toggle-instructions expanded" href="javascript:void(0)">Collapse Instructions</a> <a class="annotatable-toggle annotatable-toggle-instructions expanded" href="javascript:void(0)">${_("Collapse Instructions")}</a>
</div> </div>
<div class="annotatable-section-body annotatable-instructions"> <div class="annotatable-section-body annotatable-instructions">
${instructions_html} ${instructions_html}
...@@ -19,8 +21,8 @@ ...@@ -19,8 +21,8 @@
<div class="annotatable-section"> <div class="annotatable-section">
<div class="annotatable-section-title"> <div class="annotatable-section-title">
Guided Discussion ${_("Guided Discussion")}
<a class="annotatable-toggle annotatable-toggle-annotations" href="javascript:void(0)">Hide Annotations</a> <a class="annotatable-toggle annotatable-toggle-annotations" href="javascript:void(0)">${_("Hide Annotations")}</a>
</div> </div>
<div class="annotatable-section-body annotatable-content"> <div class="annotatable-section-body annotatable-content">
${content_html} ${content_html}
......
<%! from django.utils.translation import ugettext as _ %>
<section id="combined-open-ended" class="combined-open-ended" data-location="${location}" data-ajax-url="${ajax_url}" data-allow_reset="${allow_reset}" data-state="${state}" data-task-count="${task_count}" data-task-number="${task_number}" data-accept-file-upload = "${accept_file_upload}"> <section id="combined-open-ended" class="combined-open-ended" data-location="${location}" data-ajax-url="${ajax_url}" data-allow_reset="${allow_reset}" data-state="${state}" data-task-count="${task_count}" data-task-number="${task_number}" data-accept-file-upload = "${accept_file_upload}">
<div class="status-container"> <div class="status-container">
${status|n} ${status|n}
...@@ -12,8 +13,8 @@ ...@@ -12,8 +13,8 @@
% endfor % endfor
</div> </div>
<input type="button" value="Reset" class="reset-button" name="reset"/> <input type="button" value="${_("Reset")}" class="reset-button" name="reset"/>
<input type="button" value="Next Step" class="next-step-button" name="reset"/> <input type="button" value="${_("Next Step")}" class="next-step-button" name="reset"/>
</div> </div>
<section class="legend-container"> <section class="legend-container">
......
<%! from django.utils.translation import ugettext as _ %>
<section class="legend-container"> <section class="legend-container">
<div class="legenditem"> <div class="legenditem">
Legend ${_("Legend")}
</div> </div>
% for i in xrange(0,len(legend_list)): % for i in xrange(0,len(legend_list)):
<%legend_title=legend_list[i]['name'] %> <%legend_title=legend_list[i]['name'] %>
......
<%! from django.utils.translation import ugettext as _ %>
<div class="status-elements"> <div class="status-elements">
<section id="combined-open-ended-status" class="combined-open-ended-status"> <section id="combined-open-ended-status" class="combined-open-ended-status">
<div class="statusitem"> <div class="statusitem">
Status ${_("Status")}
</div> </div>
%for i in xrange(0,len(status_list)): %for i in xrange(0,len(status_list)):
<%status=status_list[i]%> <%status=status_list[i]%>
......
<%! from django.utils.translation import ugettext as _ %>
% for co in context_list: % for co in context_list:
% if co['grader_type'] in grader_type_image_dict: % if co['grader_type'] in grader_type_image_dict:
<%grader_type=co['grader_type']%> <%grader_type=co['grader_type']%>
...@@ -18,7 +19,7 @@ ...@@ -18,7 +19,7 @@
%if len(co['feedback'])>2: %if len(co['feedback'])>2:
<div class="collapsible evaluation-response"> <div class="collapsible evaluation-response">
<header> <header>
<a href="#">See full feedback</a> <a href="#">${_("See full feedback")}</a>
</header> </header>
<section class="feedback-full"> <section class="feedback-full">
${co['feedback']} ${co['feedback']}
...@@ -32,22 +33,22 @@ ...@@ -32,22 +33,22 @@
<input type="hidden" value="${co['submission_id']}" class="submission_id" /> <input type="hidden" value="${co['submission_id']}" class="submission_id" />
<div class="collapsible evaluation-response"> <div class="collapsible evaluation-response">
<header> <header>
<a href="#">Respond to Feedback</a> <a href="#">${_("Respond to Feedback")}</a>
</header> </header>
<section id="evaluation" class="evaluation"> <section id="evaluation" class="evaluation">
<p>How accurate do you find this feedback?</p> <p>${_("How accurate do you find this feedback?")}</p>
<div class="evaluation-scoring"> <div class="evaluation-scoring">
<ul class="scoring-list"> <ul class="scoring-list">
<li><input type="radio" name="evaluation-score" id="evaluation-score-5" value="5" /> <label for="evaluation-score-5"> Correct</label></li> <li><input type="radio" name="evaluation-score" id="evaluation-score-5" value="5" /> <label for="evaluation-score-5"> ${_("Correct")}</label></li>
<li><input type="radio" name="evaluation-score" id="evaluation-score-4" value="4" /> <label for="evaluation-score-4"> Partially Correct</label></li> <li><input type="radio" name="evaluation-score" id="evaluation-score-4" value="4" /> <label for="evaluation-score-4"> ${_("Partially Correct")}</label></li>
<li><input type="radio" name="evaluation-score" id="evaluation-score-3" value="3" /> <label for="evaluation-score-3"> No Opinion</label></li> <li><input type="radio" name="evaluation-score" id="evaluation-score-3" value="3" /> <label for="evaluation-score-3"> ${_("No Opinion")}</label></li>
<li><input type="radio" name="evaluation-score" id="evaluation-score-2" value="2" /> <label for="evaluation-score-2"> Partially Incorrect</label></li> <li><input type="radio" name="evaluation-score" id="evaluation-score-2" value="2" /> <label for="evaluation-score-2"> ${_("Partially Incorrect")}</label></li>
<li><input type="radio" name="evaluation-score" id="evaluation-score-1" value="1" /> <label for="evaluation-score-1"> Incorrect</label></li> <li><input type="radio" name="evaluation-score" id="evaluation-score-1" value="1" /> <label for="evaluation-score-1"> ${_("Incorrect")}</label></li>
</ul> </ul>
</div> </div>
<p>Additional comments:</p> <p>${_("Additional comments:")}</p>
<textarea rows="${rows}" cols="${cols}" name="feedback" class="feedback-on-feedback" id="feedback"></textarea> <textarea rows="${rows}" cols="${cols}" name="feedback" class="feedback-on-feedback" id="feedback"></textarea>
<input type="button" value="Submit Feedback" class="submit-evaluation-button" name="reset"/> <input type="button" value="${_("Submit Feedback")}" class="submit-evaluation-button" name="reset"/>
</section> </section>
</div> </div>
</div> </div>
...@@ -55,4 +56,4 @@ ...@@ -55,4 +56,4 @@
</section> </section>
<br/> <br/>
%endif %endif
%endfor %endfor
\ No newline at end of file
<%! from django.utils.translation import ugettext as _ %>
<section id="openended_${id}" class="open-ended-child" data-state="${state}" data-child-type="${child_type}"> <section id="openended_${id}" class="open-ended-child" data-state="${state}" data-child-type="${child_type}">
<div class="error"></div> <div class="error"></div>
<div class="prompt"> <div class="prompt">
${prompt|n} ${prompt|n}
</div> </div>
<h4>Response</h4> <h4>${_("Response")}</h4>
<textarea rows="${rows}" cols="${cols}" name="answer" class="answer short-form-response" id="input_${id}">${previous_answer|h}</textarea> <textarea rows="${rows}" cols="${cols}" name="answer" class="answer short-form-response" id="input_${id}">${previous_answer|h}</textarea>
<div class="message-wrapper"></div> <div class="message-wrapper"></div>
<div class="grader-status"> <div class="grader-status">
% if state == 'initial': % if state == 'initial':
<span class="unanswered" style="display:inline-block;" id="status_${id}">Unanswered</span> <span class="unanswered" style="display:inline-block;" id="status_${id}">${_(Unanswered)}</span>
% elif state == 'assessing': % elif state == 'assessing':
<span class="grading" id="status_${id}">Submitted for grading. <span class="grading" id="status_${id}">${_("Submitted for grading.")}
% if eta_message is not None: % if eta_message is not None:
${eta_message} ${eta_message}
% endif % endif
...@@ -26,8 +27,8 @@ ...@@ -26,8 +27,8 @@
<div class="file-upload"></div> <div class="file-upload"></div>
<input type="button" value="Submit" class="submit-button" name="show"/> <input type="button" value="${_("Submit")}" class="submit-button" name="show"/>
<input name="skip" class="skip-button" type="button" value="Skip Post-Assessment"/> <input name="skip" class="skip-button" type="button" value="${_("Skip Post-Assessment")}"/>
<div class="open-ended-action"></div> <div class="open-ended-action"></div>
......
<%! from django.utils.translation import ugettext as _ %>
<section> <section>
<div class="shortform"> <div class="shortform">
<div class="result-errors"> <div class="result-errors">
There was an error with your submission. Please contact course staff. ${_("There was an error with your submission. Please contact course staff.")}
</div> </div>
</div> </div>
<div class="longform"> <div class="longform">
...@@ -9,4 +10,4 @@ ...@@ -9,4 +10,4 @@
${errors} ${errors}
</div> </div>
</div> </div>
</section> </section>
\ No newline at end of file
<%! from django.utils.translation import ugettext as _ %>
<div class="external-grader-message"> <div class="external-grader-message">
${msg|n} ${msg|n}
<div class="collapsible evaluation-response"> <div class="collapsible evaluation-response">
<header> <header>
<a href="#">Respond to Feedback</a> <a href="#">${_("Respond to Feedback")}</a>
</header> </header>
<section id="evaluation_${id}" class="evaluation"> <section id="evaluation_${id}" class="evaluation">
<p>How accurate do you find this feedback?</p> <p>${_("How accurate do you find this feedback?")}</p>
<div class="evaluation-scoring"> <div class="evaluation-scoring">
<ul class="scoring-list"> <ul class="scoring-list">
<li><input type="radio" name="evaluation-score" id="evaluation-score-5" value="5" /> <label for="evaluation-score-5"> Correct</label></li> <li><input type="radio" name="evaluation-score" id="evaluation-score-5" value="5" /> <label for="evaluation-score-5"> ${_("Correct")}</label></li>
<li><input type="radio" name="evaluation-score" id="evaluation-score-4" value="4" /> <label for="evaluation-score-4"> Partially Correct</label></li> <li><input type="radio" name="evaluation-score" id="evaluation-score-4" value="4" /> <label for="evaluation-score-4"> ${_("Partially Correct")}</label></li>
<li><input type="radio" name="evaluation-score" id="evaluation-score-3" value="3" /> <label for="evaluation-score-3"> No Opinion</label></li> <li><input type="radio" name="evaluation-score" id="evaluation-score-3" value="3" /> <label for="evaluation-score-3"> ${_("No Opinion")}</label></li>
<li><input type="radio" name="evaluation-score" id="evaluation-score-2" value="2" /> <label for="evaluation-score-2"> Partially Incorrect</label></li> <li><input type="radio" name="evaluation-score" id="evaluation-score-2" value="2" /> <label for="evaluation-score-2"> ${_("Partially Incorrect")}</label></li>
<li><input type="radio" name="evaluation-score" id="evaluation-score-1" value="1" /> <label for="evaluation-score-1"> Incorrect</label></li> <li><input type="radio" name="evaluation-score" id="evaluation-score-1" value="1" /> <label for="evaluation-score-1"> ${_("Incorrect")}</label></li>
</ul> </ul>
</div> </div>
<p>Additional comments:</p> <p>${_("Additional comments:")}</p>
<textarea rows="${rows}" cols="${cols}" name="feedback_${id}" class="feedback-on-feedback" id="feedback_${id}"></textarea> <textarea rows="${rows}" cols="${cols}" name="feedback_${id}" class="feedback-on-feedback" id="feedback_${id}"></textarea>
<input type="button" value="Submit Feedback" class="submit-evaluation-button" name="reset"/> <input type="button" value="${_("Submit Feedback")}" class="submit-evaluation-button" name="reset"/>
</section> </section>
</div> </div>
</div> </div>
\ No newline at end of file
<%! from django.utils.translation import ugettext as _ %>
<form class="rubric-template" id="inputtype_${id}" xmlns="http://www.w3.org/1999/html"> <form class="rubric-template" id="inputtype_${id}" xmlns="http://www.w3.org/1999/html">
<h3>Rubric</h3> <h3>${_("Rubric")}</h3>
<p>Select the criteria you feel best represents this submission in each category.</p> <p>${_("Select the criteria you feel best represents this submission in each category.")}</p>
<div class="rubric"> <div class="rubric">
% for i in range(len(categories)): % for i in range(len(categories)):
<% category = categories[i] %> <% category = categories[i] %>
......
<%! from django.utils.translation import ugettext as _ %>
<div class="hint"> <div class="hint">
<div class="hint-prompt"> <div class="hint-prompt">
Please enter a hint below: ${_("Please enter a hint below:")}
</div> </div>
<textarea name="post_assessment" class="post_assessment" cols="70" rows="5" <textarea name="post_assessment" class="post_assessment" cols="70" rows="5"
${'readonly="true"' if read_only else ''}>${hint}</textarea> ${'readonly="true"' if read_only else ''}>${hint}</textarea>
......
<%! from django.utils.translation import ugettext as _ %>
<section id="self_assessment_${id}" class="open-ended-child" data-ajax-url="${ajax_url}" <section id="self_assessment_${id}" class="open-ended-child" data-ajax-url="${ajax_url}"
data-id="${id}" data-state="${state}" data-allow_reset="${allow_reset}" data-child-type="${child_type}"> data-id="${id}" data-state="${state}" data-allow_reset="${allow_reset}" data-child-type="${child_type}">
<div class="error"></div> <div class="error"></div>
...@@ -5,7 +6,7 @@ ...@@ -5,7 +6,7 @@
${prompt} ${prompt}
</div> </div>
<h4>Response</h4> <h4>${_("Response")}</h4>
<div> <div>
<textarea name="answer" class="answer short-form-response" cols="70" rows="20">${previous_answer|n}</textarea> <textarea name="answer" class="answer short-form-response" cols="70" rows="20">${previous_answer|n}</textarea>
</div> </div>
...@@ -19,5 +20,5 @@ ...@@ -19,5 +20,5 @@
<div class="message-wrapper"></div> <div class="message-wrapper"></div>
<div class="file-upload"></div> <div class="file-upload"></div>
<input type="button" value="Submit" class="submit-button" name="show"/> <input type="button" value="${_("Submit")}" class="submit-button" name="show"/>
</section> </section>
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%inherit file="main.html" /> <%inherit file="main.html" />
<section class="container about"> <section class="container about">
<nav> <nav>
<a href="/t/about.html">Vision</a> <a href="/t/about.html">${_("Vision")}</a>
<a href="/t/faq.html">Faq</a> <a href="/t/faq.html">${_("Faq")}</a>
<a href="/t/press.html">Press</a> <a href="/t/press.html">${_("Press")}</a>
<a href="/t/contact.html" class="active">Contact</a> <a href="/t/contact.html" class="active">${_("Contact")}</a>
</nav> </nav>
<section class="contact"> <section class="contact">
...@@ -15,21 +17,33 @@ ...@@ -15,21 +17,33 @@
<img src="${static.url('images/contact-page.jpg')}"> <img src="${static.url('images/contact-page.jpg')}">
</div> </div>
<div class="contacts"> <div class="contacts">
<h2>Class Feedback</h2> <h2>${_("Class Feedback")}</h2>
<p>We are always seeking feedback to improve our courses. If you are an enrolled student and have any questions, feedback, suggestions, or any other issues specific to a particular class, please post on the discussion forums of that&nbsp;class.</p> <p>${_("We are always seeking feedback to improve our courses. If you are an enrolled student and have any questions, feedback, suggestions, or any other issues specific to a particular class, please post on the discussion forums of that&nbsp;class.")}</p>
<h2>General Inquiries and Feedback</h2> <h2>${_("General Inquiries and Feedback")}</h2>
<p>"If you have a general question about edX please email <a href="mailto:info@edx.org">info@edx.org</a>. To see if your question has already been answered, visit our <a href="${reverse('faq_edx')}">FAQ page</a>. You can also join the discussion on our <a href="http://www.facebook.com/EdxOnline">facebook page</a>. Though we may not have a chance to respond to every email, we take all feedback into consideration.</p> <p>${_('If you have a general question about edX please email {email}. To see if your question has already been answered, visit our {faq_link_start}FAQ page{faq_link_end}. You can also join the discussion on our {fb_link_start}facebook page{fb_link_end}. Though we may not have a chance to respond to every email, we take all feedback into consideration.').format(
email='<a href="mailto:info@edx.org">info@edx.org</a>',
<h2>Technical Inquiries and Feedback</h2> faq_link_start='<a href="{url}">'.format(url=reverse('faq_edx')),
<p>If you have suggestions/feedback about the overall edX platform, or are facing general technical issues with the platform (e.g., issues with email addresses and passwords), you can reach us at <a href="mailto:technical@edx.org">technical@edx.org</a>. For technical questions, please make sure you are using a current version of Firefox or Chrome, and include browser and version in your e-mail, as well as screenshots or other pertinent details. If you find a bug or other issues, you can reach us at the following: <a href="mailto:bugs@edx.org">bugs@edx.org</a>.</p> faq_link_end='</a>',
fb_link_start='<a href="http://www.facebook.com/EdxOnline">'.
<h2>Media</h2> fb_link_end='</a>'
<p>Please visit our <a href="${reverse('faq_edx')}">media/press page</a> for more information. 
For any media or press inquiries, please email <a href="mailto:press@edx.org">press@edx.org</a>.</p> )}</p>
<h2>Universities</h2> <h2>${_("Technical Inquiries and Feedback")}</h2>
<p>If you are a university wishing to Collaborate or with questions about edX, please email <a href="mailto:university@edx.org">university@edx.org</a>.</p> <p>${_('If you have suggestions/feedback about the overall edX platform, or are facing general technical issues with the platform (e.g., issues with email addresses and passwords), you can reach us at {tech_email}. For technical questions, please make sure you are using a current version of Firefox or Chrome, and include browser and version in your e-mail, as well as screenshots or other pertinent details. If you find a bug or other issues, you can reach us at the following: {bug_email}.').format(
tech_email='<a href="mailto:technical@edx.org">technical@edx.org</a>',
bug_email='<a href="mailto:bugs@edx.org">bugs@edx.org</a>'
)}</p>
<h2>${_("Media")}</h2>
<p>${_('Please visit our {link_start}media/press page{link_end} for more information. For any media or press inquiries, please email {email}.').format(
link_start='<a href="{url}">'.format(url=reverse('faq_edx')),
link_end='</a>',
email='<a href="mailto:press@edx.org">press@edx.org</a>',
)}</p>
<h2>${_("Universities")}</h2>
<p>${_('If you are a university wishing to Collaborate or with questions about edX, please email {email}.'.format(email='<a href="mailto:university@edx.org">university@edx.org</a>')}</p>
</div> </div>
</section> </section>
</section> </section>
......
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%namespace file='main.html' import="stanford_theme_enabled"/> <%namespace file='main.html' import="stanford_theme_enabled"/>
<%! <%!
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.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section
%> %>
<%page args="course" /> <%page args="course" />
<article id="${course.id}" class="course"> <article id="${course.id}" class="course">
%if course.is_newish: %if course.is_newish:
<span class="status">New</span> <span class="status">${_("New")}</span>
%endif %endif
<a href="${reverse('about_course', args=[course.id])}"> <a href="${reverse('about_course', args=[course.id])}">
<div class="inner-wrapper"> <div class="inner-wrapper">
......
<%! from django.utils.translation import ugettext as _ %>
<section class="filter"> <section class="filter">
<nav> <nav>
<div class="dropdown university"> <div class="dropdown university">
<div class="filter-heading"> <div class="filter-heading">
All Universities ${_("All Universities")}
</div> </div>
<ul> <ul>
<li> <li>
...@@ -16,34 +18,34 @@ ...@@ -16,34 +18,34 @@
<div class="dropdown subject"> <div class="dropdown subject">
<div class="filter-heading"> <div class="filter-heading">
All Subjects ${_("All Subjects")}
</div> </div>
<ul> <ul>
<li> <li>
<a href="#">Computer Science</a> <a href="#">${_("Computer Science")}</a>
</li> </li>
<li> <li>
<a href="#">History</a> <a href="#">${_("History")}</a>
</li> </li>
</ul> </ul>
</div> </div>
<div class="dropdown featured"> <div class="dropdown featured">
<div class="filter-heading"> <div class="filter-heading">
Newest ${_("Newest")}
</div> </div>
<ul> <ul>
<li> <li>
<a href="#">Top Rated</a> <a href="#">${_("Top Rated")}</a>
</li> </li>
<li> <li>
<a href="#">Starting soonest</a> <a href="#">${_("Starting soonest")}</a>
</li> </li>
</ul> </ul>
</div> </div>
<form class="search"> <form class="search">
<input type="text" placeholder="Search for courses"> <input type="text" placeholder="${_('Search for courses')}">
<input type="submit"> <input type="submit">
</form> </form>
</nav> </nav>
......
<%! from django.utils.translation import ugettext as _ %>
<section class="cohort_manager" data-ajax_url="${cohorts_ajax_url}"> <section class="cohort_manager" data-ajax_url="${cohorts_ajax_url}">
<h3>Cohort groups</h3> <h3>${_("Cohort groups")}</h3>
<div class="controls" style="padding-top:15px"> <div class="controls" style="padding-top:15px">
<a href="#" class="button show_cohorts">Show cohorts</a> <a href="#" class="button show_cohorts">${_("Show cohorts")}</a>
</div> </div>
<ul class="errors"> <ul class="errors">
</ul> </ul>
<div class="summary" style="display:none"> <div class="summary" style="display:none">
<h3>Cohorts in the course</h3> <h3>${_("Cohorts in the course")}</h3>
<ul class="cohorts"> <ul class="cohorts">
</ul> </ul>
<p> <p>
<input class="cohort_name"/> <input class="cohort_name"/>
<a href="#" class="button add_cohort">Add cohort</a> <a href="#" class="button add_cohort">${_("Add cohort")}</a>
</p> </p>
</div> </div>
...@@ -27,10 +28,10 @@ ...@@ -27,10 +28,10 @@
<span class="page_num"></span> <span class="page_num"></span>
<p> <p>
Add users by username or email. One per line or comma-separated. ${_("Add users by username or email. One per line or comma-separated.")}
</p> </p>
<textarea cols="50" row="30" class="users_area" style="height: 200px"></textarea> <textarea cols="50" row="30" class="users_area" style="height: 200px"></textarea>
<a href="#" class="button add_members">Add cohort members</a> <a href="#" class="button add_members">${_("Add cohort members")}</a>
<ul class="op_results"> <ul class="op_results">
</ul> </ul>
......
<!DOCTYPE html> <!DOCTYPE html>
<%! from django.utils.translation import ugettext as _ %>
<html> <html>
<head> <head>
## "edX" should not be translated
<%block name="title"><title>edX</title></%block> <%block name="title"><title>edX</title></%block>
<script type="text/javascript" src="/static/js/vendor/jquery.min.js"></script> <script type="text/javascript" src="/static/js/vendor/jquery.min.js"></script>
......
<%! from django.core.urlresolvers import reverse %> <%!
<%! from xmodule.util.date_utils import get_default_time_display %> from django.core.urlresolvers import reverse
from xmodule.util.date_utils import get_default_time_display
from django.utils.translation import ugettext as _
%>
<%def name="make_chapter(chapter)"> <%def name="make_chapter(chapter)">
<div class="chapter"> <div class="chapter">
<h3 ${' class="active"' if 'active' in chapter and chapter['active'] else ''} aria-label="${chapter['display_name']}${', current chapter' if 'active' in chapter and chapter['active'] else ''}"> <%
if chapter.get('active'):
aria_label = _('{chapter}, current chapter').format(chapter=chapter['display_name'])
active_class = ' class="active"'
else:
aria_label = chapter['display_name']
active_class = ''
%>
<h3 ${active_class} aria-label="${aria_label}">
<a href="#"> <a href="#">
${chapter['display_name']} ${chapter['display_name']}
</a> </a>
......
<%! from django.utils.translation import ugettext as _ %>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section from courseware.courses import course_image_url, get_course_about_section
...@@ -41,9 +42,9 @@ ...@@ -41,9 +42,9 @@
).css("display", "block"); ).css("display", "block");
} }
}); });
%else: %else:
$('#class_enroll_form').on('ajax:complete', function(event, xhr) { $('#class_enroll_form').on('ajax:complete', function(event, xhr) {
if(xhr.status == 200) { if(xhr.status == 200) {
location.href = "${reverse('dashboard')}"; location.href = "${reverse('dashboard')}";
...@@ -51,21 +52,21 @@ ...@@ -51,21 +52,21 @@
location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll"; location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll";
} else { } else {
$('#register_error').html( $('#register_error').html(
(xhr.responseText ? xhr.responseText : 'An error occurred. Please try again later.') (xhr.responseText ? xhr.responseText : ${_('An error occurred. Please try again later.')})
).css("display", "block"); ).css("display", "block");
} }
}); });
%endif %endif
})(this) })(this)
</script> </script>
<script src="${static.url('js/course_info.js')}"></script> <script src="${static.url('js/course_info.js')}"></script>
</%block> </%block>
<%block name="title"><title>About ${course.number}</title></%block> <%block name="title"><title>${_("About {course_number}").format(course_number=course.number)}</title></%block>
<section class="course-info"> <section class="course-info">
<header class="course-profile"> <header class="course-profile">
...@@ -86,13 +87,13 @@ ...@@ -86,13 +87,13 @@
%if show_courseware_link: %if show_courseware_link:
<a href="${course_target}"> <a href="${course_target}">
%endif %endif
<span class="register disabled">You are registered for this course (${course.number})</span> <span class="register disabled">${_("You are registered for this course {course_number}").format(course_number=course.number)}</span>
%if show_courseware_link: %if show_courseware_link:
<strong>View Courseware</strong> <strong>${_("View Courseware")}</strong>
</a> </a>
%endif %endif
%else: %else:
<a href="#" class="register">Register for ${course.number}</a> <a href="#" class="register">${_("Register for {course_number}").format(course_number=course.number)}</a>
<div id="register_error"></div> <div id="register_error"></div>
%endif %endif
</div> </div>
...@@ -115,16 +116,16 @@ ...@@ -115,16 +116,16 @@
</div> </div>
</div> </div>
</header> </header>
<section class="container"> <section class="container">
<section class="details"> <section class="details">
<nav> <nav>
<a href="#" class="active">Overview</a> <a href="#" class="active">${_("Overview")}</a>
## <a href="#">FAQ</a> ## <a href="#">${_("FAQ")}</a>
## <a href="#">Requirements</a> ## <a href="#">${_("Requirements")}</a>
## <a href="#">Text-book</a> ## <a href="#">${_("Text-book")}</a>
## <a href="#">Syllabus</a> ## <a href="#">${_("Syllabus")}</a>
## <a href="#">Reviews</a> ## <a href="#">${_("Reviews")}</a>
</nav> </nav>
<div class="inner-wrapper"> <div class="inner-wrapper">
...@@ -136,7 +137,7 @@ ...@@ -136,7 +137,7 @@
<section class="course-summary"> <section class="course-summary">
<header> <header>
<div class="social-sharing"> <div class="social-sharing">
<div class="sharing-message">Share with friends and family!</div> <div class="sharing-message">${_("Share with friends and family!")}</div>
## TODO: this should probably be an overrideable block, ## TODO: this should probably be an overrideable block,
## or something allowing themes to do whatever they ## or something allowing themes to do whatever they
## want here (and on this whole page, really). ## want here (and on this whole page, really).
...@@ -161,15 +162,15 @@ ...@@ -161,15 +162,15 @@
</header> </header>
<ol class="important-dates"> <ol class="important-dates">
<li><div class="icon course-number"></div><p>Course Number</p><span class="course-number">${course.number}</span></li> <li><div class="icon course-number"></div><p>${_("Course Number")}</p><span class="course-number">${course.number}</span></li>
<li><div class="icon start"></div><p>Classes Start</p><span class="start-date">${course.start_date_text}</span></li> <li><div class="icon start"></div><p>${_("Classes Start")}</p><span class="start-date">${course.start_date_text}</span></li>
## We plan to ditch end_date (which is not stored in course metadata), ## We plan to ditch end_date (which is not stored in course metadata),
## but for backwards compatibility, show about/end_date blob if it exists. ## but for backwards compatibility, show about/end_date blob if it exists.
% if get_course_about_section(course, "end_date") or course.end: % if get_course_about_section(course, "end_date") or course.end:
<li> <li>
<div class="icon end"></div> <div class="icon end"></div>
<p>Classes End</p><span class="final-date"> <p>${_("Classes End")}</p><span class="final-date">
% if get_course_about_section(course, "end_date"): % if get_course_about_section(course, "end_date"):
${get_course_about_section(course, "end_date")} ${get_course_about_section(course, "end_date")}
% else: % else:
...@@ -180,13 +181,13 @@ ...@@ -180,13 +181,13 @@
% endif % endif
% if get_course_about_section(course, "effort"): % if get_course_about_section(course, "effort"):
<li><div class="icon effort"></div><p>Estimated Effort</p><span class="start-date">${get_course_about_section(course, "effort")}</span></li> <li><div class="icon effort"></div><p>${_("Estimated Effort")}</p><span class="start-date">${get_course_about_section(course, "effort")}</span></li>
% endif % endif
##<li><div class="icon length"></div><p>Course Length</p><span class="course-length">15 weeks</span></li> ##<li><div class="icon length"></div><p>${_('Course Length')}</p><span class="course-length">${_('{number} weeks').format(number=15)}</span></li>
% if get_course_about_section(course, "prerequisites"): % if get_course_about_section(course, "prerequisites"):
<li class="prerequisites"><div class="icon prereq"></div><p>Prerequisites</p><span class="start-date">${get_course_about_section(course, "prerequisites")}</span></li> <li class="prerequisites"><div class="icon prereq"></div><p>${_("Prerequisites")}</p><span class="start-date">${get_course_about_section(course, "prerequisites")}</span></li>
% endif % endif
</ol> </ol>
</section> </section>
...@@ -196,10 +197,11 @@ ...@@ -196,10 +197,11 @@
% if get_course_about_section(course, "ocw_links"): % if get_course_about_section(course, "ocw_links"):
<section class="additional-resources"> <section class="additional-resources">
<header> <header>
<h1>Additional Resources</h1> <h1>${_("Additional Resources")}</h1>
</header> </header>
<section> <section>
## "MITOpenCourseware" should *not* be translated
<h2 class="opencourseware">MITOpenCourseware</h2> <h2 class="opencourseware">MITOpenCourseware</h2>
${get_course_about_section(course, "ocw_links")} ${get_course_about_section(course, "ocw_links")}
</section> </section>
...@@ -215,10 +217,10 @@ ...@@ -215,10 +217,10 @@
<form id="class_enroll_form" method="post" data-remote="true" action="${reverse('change_enrollment')}"> <form id="class_enroll_form" method="post" data-remote="true" action="${reverse('change_enrollment')}">
<fieldset class="enroll_fieldset"> <fieldset class="enroll_fieldset">
<input name="course_id" type="hidden" value="${course.id}"> <input name="course_id" type="hidden" value="${course.id}">
<input name="enrollment_action" type="hidden" value="enroll"> <input name="enrollment_action" type="hidden" value="${_("enroll")}">
</fieldset> </fieldset>
<div class="submit"> <div class="submit">
<input name="submit" type="submit" value="enroll"> <input name="submit" type="submit" value="${_("enroll")}">
</div> </div>
</form> </form>
</div> </div>
......
...@@ -12,6 +12,7 @@ def url_class(is_active): ...@@ -12,6 +12,7 @@ def url_class(is_active):
return "" return ""
%> %>
<%! from courseware.tabs import get_course_tabs %> <%! from courseware.tabs import get_course_tabs %>
<%! from django.utils.translation import ugettext as _ %>
<nav class="${active_page} course-material"> <nav class="${active_page} course-material">
<div class="inner-wrapper"> <div class="inner-wrapper">
...@@ -32,7 +33,7 @@ def url_class(is_active): ...@@ -32,7 +33,7 @@ def url_class(is_active):
<%block name="extratabs" /> <%block name="extratabs" />
% if masquerade is not UNDEFINED: % if masquerade is not UNDEFINED:
% if staff_access and masquerade is not None: % if staff_access and masquerade is not None:
<li style="float:right"><a href="#" id="staffstatus">Staff view</a></li> <li style="float:right"><a href="#" id="staffstatus">${_("Staff view")}</a></li>
% endif % endif
% endif % endif
</ol> </ol>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<%namespace name='static' file='../static_content.html'/> <%namespace name='static' file='../static_content.html'/>
<%block name="title"><title>Courses</title></%block> <%block name="title"><title>${_("Courses")}</title></%block>
<section class="find-courses"> <section class="find-courses">
<header class="search"> <header class="search">
...@@ -16,9 +17,9 @@ ...@@ -16,9 +17,9 @@
% endif % endif
</div> </div>
% if self.stanford_theme_enabled(): % if self.stanford_theme_enabled():
<h2>Explore free courses from Stanford University.</h2> <h2>${_("Explore free courses from Stanford University.")}</h2>
% else: % else:
<h2>Explore free courses from leading universities.</h2> <h2>${_("Explore free courses from leading universities.")}</h2>
% endif % endif
</hgroup> </hgroup>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%namespace name='static' file='../static_content.html'/> <%namespace name='static' file='../static_content.html'/>
<%block name="bodyclass">courseware</%block> <%block name="bodyclass">courseware</%block>
<%block name="title"><title>Courseware – edX</title></%block> ## "edX" should *not* be translated
<%block name="title"><title>${_("Courseware")} - edX</title></%block>
<%block name="headextra"> <%block name="headextra">
<%static:css group='course'/> <%static:css group='course'/>
...@@ -11,7 +13,7 @@ ...@@ -11,7 +13,7 @@
<section class="container"> <section class="container">
<section class="outside-app"> <section class="outside-app">
<h1>There has been an error on the <span class="edx">edX</span> servers</h1> <h1>${_('There has been an error on the {span_start}edX{span_end} servers').format(span_start='<span class="edx">', span_end='</span>')}</h1>
<p>We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible. Please email us at <a href="mailto:technical@edx.org">technical@edx.org</a> to report any problems or downtime.</p> <p>${_("We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible. Please email us at {email} to report any problems or downtime.").format(email='<a href="mailto:technical@edx.org">technical@edx.org</a>')}</p>
</section> </section>
</section> </section>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
<%block name="bodyclass">courseware ${course.css_class}</%block> <%block name="bodyclass">courseware ${course.css_class}</%block>
<%block name="title"><title>${course.number} Courseware</title></%block> <%block name="title"><title>${_("{course_number} Courseware").format(course_number=course.number)}</title></%block>
<%block name="headextra"> <%block name="headextra">
<%static:css group='course'/> <%static:css group='course'/>
...@@ -155,7 +156,7 @@ ...@@ -155,7 +156,7 @@
<div class="timer-main"> <div class="timer-main">
<div id="timer_wrapper"> <div id="timer_wrapper">
% if timer_navigation_return_url: % if timer_navigation_return_url:
<a href="${timer_navigation_return_url}" class="timer_return_url">Return to Exam</a> <a href="${timer_navigation_return_url}" class="timer_return_url">${_("Return to Exam")}</a>
% endif % endif
<div class="timer_label">Time Remaining:</div> <div id="exam_timer" class="timer_value">&nbsp;</div> <div class="timer_label">Time Remaining:</div> <div id="exam_timer" class="timer_value">&nbsp;</div>
</div> </div>
...@@ -170,9 +171,9 @@ ...@@ -170,9 +171,9 @@
<div class="course-wrapper"> <div class="course-wrapper">
% if accordion: % if accordion:
<section aria-label="Course Navigation" class="course-index"> <section aria-label="${_('Course Navigation')}" class="course-index">
<header id="open_close_accordion"> <header id="open_close_accordion">
<a href="#">close</a> <a href="#">${_("close")}</a>
</header> </header>
<div id="accordion" style="display: none"> <div id="accordion" style="display: none">
...@@ -204,7 +205,7 @@ ...@@ -204,7 +205,7 @@
% if course.show_calculator: % if course.show_calculator:
<div class="calc-main"> <div class="calc-main">
<a aria-label="Open Calculator" href="#" class="calc">Calculator</a> <a aria-label="${_('Open Calculator')}" href="#" class="calc">${_("Calculator")}</a>
<div id="calculator_wrapper"> <div id="calculator_wrapper">
<form id="calculator"> <form id="calculator">
...@@ -212,15 +213,15 @@ ...@@ -212,15 +213,15 @@
<input type="text" id="calculator_input" title="Calculator Input Field" /> <input type="text" id="calculator_input" title="Calculator Input Field" />
<div class="help-wrapper"> <div class="help-wrapper">
<a href="#">Hints</a> <a href="#">${_("Hints")}</a>
<dl class="help"> <dl class="help">
<dt>Suffixes:</dt> <dt>${_("Suffixes:")}</dt>
<dd> %kMGTcmunp</dd> <dd> %kMGTcmunp</dd>
<dt>Operations:</dt> <dt>${_("Operations:")}</dt>
<dd>^ * / + - ()</dd> <dd>^ * / + - ()</dd>
<dt>Functions:</dt> <dt>${_("Functions:")}</dt>
<dd>sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs </dd> <dd>sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs </dd>
<dt>Constants</dt> <dt>${_("Constants")}</dt>
<dd>e, pi</dd> <dd>e, pi</dd>
<!-- Students won't know what parallel means at this time. Complex numbers aren't well tested in the courseware, so we would prefer to not expose them. If you read the comments in the source, feel free to use them. If you run into a bug, please let us know. But we can't officially support them right now. <!-- Students won't know what parallel means at this time. Complex numbers aren't well tested in the courseware, so we would prefer to not expose them. If you read the comments in the source, feel free to use them. If you run into a bug, please let us know. But we can't officially support them right now.
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
...@@ -7,9 +8,9 @@ ...@@ -7,9 +8,9 @@
<section class="container"> <section class="container">
<div class="gradebook-summary-wrapper"> <div class="gradebook-summary-wrapper">
<section class="gradebook-summary-content"> <section class="gradebook-summary-content">
<h1>Grade summary</h1> <h1>${_("Grade summary")}</h1>
<p>Not implemented yet</p> <p>${_("Not implemented yet")}</p>
</section> </section>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
...@@ -36,7 +37,7 @@ ...@@ -36,7 +37,7 @@
<section class="container"> <section class="container">
<div class="gradebook-wrapper"> <div class="gradebook-wrapper">
<section class="gradebook-content"> <section class="gradebook-content">
<h1>Gradebook</h1> <h1>${_("Gradebook")}</h1>
<table class="student-table"> <table class="student-table">
<thead> <thead>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block> <%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
...@@ -6,10 +7,10 @@ ...@@ -6,10 +7,10 @@
<%static:css group='course'/> <%static:css group='course'/>
</%block> </%block>
<%block name="title"><title>${course.number} Course Info</title></%block> <%block name="title"><title>${course.number} ${_("Course Info")}</title></%block>
<%include file="/courseware/course_navigation.html" args="active_page='info'" /> <%include file="/courseware/course_navigation.html" args="active_page='info'" />
<%! <%!
from courseware.courses import get_course_info_section from courseware.courses import get_course_info_section
%> %>
...@@ -26,7 +27,7 @@ $(document).ready(function(){ ...@@ -26,7 +27,7 @@ $(document).ready(function(){
<div class="info-wrapper"> <div class="info-wrapper">
% if user.is_authenticated(): % if user.is_authenticated():
<section class="updates"> <section class="updates">
<h1>Course Updates &amp; News</h1> <h1>${_("Course Updates &amp; News")}</h1>
${get_course_info_section(request, course, 'updates')} ${get_course_info_section(request, course, 'updates')}
</section> </section>
<section aria-label="Handout Navigation" class="handouts"> <section aria-label="Handout Navigation" class="handouts">
...@@ -35,11 +36,11 @@ $(document).ready(function(){ ...@@ -35,11 +36,11 @@ $(document).ready(function(){
</section> </section>
% else: % else:
<section class="updates"> <section class="updates">
<h1>Course Updates &amp; News</h1> <h1>${_("Course Updates &amp; News")}</h1>
${get_course_info_section(request, course, 'guest_updates')} ${get_course_info_section(request, course, 'guest_updates')}
</section> </section>
<section aria-label="Handout Navigation" class="handouts"> <section aria-label="${_('Handout Navigation')}" class="handouts">
<h1>Course Handouts</h1> <h1>${_("Course Handouts")}</h1>
${get_course_info_section(request, course, 'guest_handouts')} ${get_course_info_section(request, course, 'guest_handouts')}
</section> </section>
% endif % endif
......
<%! from django.utils.translation import ugettext as _ %>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section from courseware.courses import course_image_url, get_course_about_section
...@@ -7,7 +8,7 @@ ...@@ -7,7 +8,7 @@
<%inherit file="../mktg_iframe.html" /> <%inherit file="../mktg_iframe.html" />
<%block name="title"><title>About ${course_id}</title></%block> <%block name="title"><title>${_("About {course_id}").format(course_id=course_id)}</title></%block>
<%block name="bodyclass">view-partial-mktgregister</%block> <%block name="bodyclass">view-partial-mktgregister</%block>
...@@ -23,7 +24,7 @@ ...@@ -23,7 +24,7 @@
<ul class="list-actions register"> <ul class="list-actions register">
<li class="item"> <li class="item">
<a class="action coming-soon" href="">Coming Soon</a> <a class="action coming-soon" href="">${_("Coming Soon")}</a>
</li> </li>
</ul> </ul>
......
<%! from django.utils.translation import ugettext as _ %>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section from courseware.courses import course_image_url, get_course_about_section
...@@ -7,7 +8,7 @@ ...@@ -7,7 +8,7 @@
<%inherit file="../mktg_iframe.html" /> <%inherit file="../mktg_iframe.html" />
<%block name="title"><title>About ${course.number}</title></%block> <%block name="title"><title>${_("About {course_number}").format(course_number=course.number)}</title></%block>
<%block name="bodyclass">view-partial-mktgregister</%block> <%block name="bodyclass">view-partial-mktgregister</%block>
...@@ -31,7 +32,7 @@ ...@@ -31,7 +32,7 @@
window.top.location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll"; window.top.location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll";
} else { } else {
$('#register_error').html( $('#register_error').html(
(xhr.responseText ? xhr.responseText : 'An error occurred. Please try again later.') (xhr.responseText ? xhr.responseText : '${_("An error occurred. Please try again later.")}')
).css("display", "block"); ).css("display", "block");
} }
}); });
...@@ -46,14 +47,14 @@ ...@@ -46,14 +47,14 @@
<li class="item"> <li class="item">
%if user.is_authenticated() and registered: %if user.is_authenticated() and registered:
%if show_courseware_link: %if show_courseware_link:
<a class="action access-courseware" href="${course_target}" target="_top">Access Courseware</a> <a class="action access-courseware" href="${course_target}" target="_top">${_("Access Courseware")}</a>
%else: %else:
<div class="action is-registered">You Are Registered</div> <div class="action is-registered">${_("You Are Registered")}</div>
%endif %endif
%elif allow_registration: %elif allow_registration:
<a class="action action-register register" href="#">Register for <strong>${course.number}</strong></a> <a class="action action-register register" href="#">${_("Register for")} <strong>${course.number}</strong></a>
%else: %else:
<div class="action registration-closed is-disabled">Registration Is Closed</div> <div class="action registration-closed is-disabled">${_("Registration Is Closed")}</div>
%endif %endif
</li> </li>
</ul> </ul>
...@@ -63,11 +64,11 @@ ...@@ -63,11 +64,11 @@
<form id="class_enroll_form" method="post" data-remote="true" action="${reverse('change_enrollment')}"> <form id="class_enroll_form" method="post" data-remote="true" action="${reverse('change_enrollment')}">
<fieldset class="enroll_fieldset"> <fieldset class="enroll_fieldset">
<input name="course_id" type="hidden" value="${course.id}"> <input name="course_id" type="hidden" value="${course.id}">
<input name="enrollment_action" type="hidden" value="enroll"> <input name="enrollment_action" type="hidden" value="${_("enroll")}">
<input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }"> <input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
</fieldset> </fieldset>
<div class="submit"> <div class="submit">
<input name="enroll" type="submit" value="enroll"> <input name="enroll" type="submit" value="${_("enroll")}">
</div> </div>
</form> </form>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" /> <%inherit file="main.html" />
<%namespace name='static' file='../static_content.html'/> <%namespace name='static' file='../static_content.html'/>
<%block name="bodyclass">courseware news</%block> <%block name="bodyclass">courseware news</%block>
<%block name="title"><title>News – MITx 6.002x</title></%block> <%block name="title"><title>${_("News - MITx 6.002x")}</title></%block>
<%block name="headextra"> <%block name="headextra">
<%static:css group='course'/> <%static:css group='course'/>
...@@ -15,7 +16,7 @@ ...@@ -15,7 +16,7 @@
<section class="container"> <section class="container">
<div class="course-wrapper"> <div class="course-wrapper">
<section class="course-content"> <section class="course-content">
<h3> Updates to Discussion Posts You Follow </h3> <h3> ${_("Updates to Discussion Posts You Follow")} </h3>
${content} ${content}
</section> </section>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<% <%
...@@ -37,7 +38,7 @@ def url_for_user(user_id): #TODO ...@@ -37,7 +38,7 @@ def url_for_user(user_id): #TODO
% if notification.get('actor_id', None): % if notification.get('actor_id', None):
<a href="${url_for_user(notification['actor_id'])}">${info['actor_username']}</a> <a href="${url_for_user(notification['actor_id'])}">${info['actor_username']}</a>
% else: % else:
Anonymous ${_("Anonymous")}
% endif % endif
</%def> </%def>
...@@ -48,7 +49,7 @@ def url_for_user(user_id): #TODO ...@@ -48,7 +49,7 @@ def url_for_user(user_id): #TODO
<%def name="render_comment_link(notification)"> <%def name="render_comment_link(notification)">
<% info = notification['info'] %> <% info = notification['info'] %>
<a href="${url_for_comment(info['commentable_id'], info['thread_id'], info['comment_id'])}">comment</a> <a href="${url_for_comment(info['commentable_id'], info['thread_id'], info['comment_id'])}">${_("comment")}</a>
</%def> </%def>
<%def name="render_discussion_link(notification)"> <%def name="render_discussion_link(notification)">
...@@ -59,19 +60,32 @@ def url_for_user(user_id): #TODO ...@@ -59,19 +60,32 @@ def url_for_user(user_id): #TODO
<%def name="render_notification(notification)"> <%def name="render_notification(notification)">
<div class="notification"> <div class="notification">
% if notification['notification_type'] == 'post_reply': % if notification['notification_type'] == 'post_reply':
${render_user_link(notification)} posted a ${render_comment_link(notification)} ${_("{user} posted a {comment} to the thread {thread} in discussion {discussion}").format(
to the thread ${render_thread_link(notification)} in discussion ${render_discussion_link(notification)} user=render_user_link(notification),
comment=render_comment_link(notification),
thread=render_thread_link(notification),
discussion=render_discussion_link(notification),
)}
% elif notification['notification_type'] == 'post_topic': % elif notification['notification_type'] == 'post_topic':
${render_user_link(notification)} posted a new thread ${render_thread_link(notification)} ${_("{user} posted a new thread {thread} in discussion {discussion}").format(
in discussion ${render_discussion_link(notification)} user=render_user_link(notification),
thread=render_thread_link(notification),
discussion=render_discussion_link(notification),
)}
% elif notification['notification_type'] == 'at_user': % elif notification['notification_type'] == 'at_user':
${render_user(info)} mentioned you in
% if notification['info']['content_type'] == 'thread': % if notification['info']['content_type'] == 'thread':
the thread ${render_thread_link(notification)} ${_("{user} mentioned you in the thread {thread} in disucssion {discussion}").format(
in discussion ${render_discussion_link(notification)} user=render_user(info),
thread=render_thread_link(notification),
discussion=render_discussion_link(notification),
)}
% else: % else:
${render_comment_link(notification)} ${_("{user} mentioned you in {comment} to the thread {thread} in discussion {discussion}").format(
to the thread ${render_thread_link(notification)} in discussion ${render_discussion_link(notification)} user=render_user(info),
comment=render_comment_link(notification),
thread=render_thread_link(notification),
discussion=render_discussion_link(notification),
)}
% endif % endif
% endif % endif
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
...@@ -7,7 +8,7 @@ ...@@ -7,7 +8,7 @@
<%namespace name="progress_graph" file="/courseware/progress_graph.js"/> <%namespace name="progress_graph" file="/courseware/progress_graph.js"/>
<%block name="title"><title>${course.number} Progress</title></%block> <%block name="title"><title>${_("{course_number} Progress").format(course_number=course.number)}</title></%block>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
...@@ -31,7 +32,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph", ...@@ -31,7 +32,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",
<section class="course-info"> <section class="course-info">
<header> <header>
<h1>Course Progress for Student '${student.username}' (${student.email})</h1> <h1>${_("Course Progress for Student '{username}' ({email})").format(username=student.username, email=student.email)}</h1>
</header> </header>
%if not course.disable_progress_graph: %if not course.disable_progress_graph:
...@@ -83,7 +84,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph", ...@@ -83,7 +84,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",
%endfor %endfor
</ol> </ol>
%else: %else:
<h3 class="no-scores"> No problem scores in this section </h3> <h3 class="no-scores"> ${_("No problem scores in this section")} </h3>
%endif %endif
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
...@@ -5,17 +6,17 @@ ...@@ -5,17 +6,17 @@
<%static:css group='course'/> <%static:css group='course'/>
</%block> </%block>
<%block name="title"><title>${course.number} Course Info</title></%block> <%block name="title"><title>${_("{course_number} Course Info").format(course_number=course.number)}</title></%block>
<%include file="/courseware/course_navigation.html" args="active_page='syllabus'" /> <%include file="/courseware/course_navigation.html" args="active_page='syllabus'" />
<%! <%!
from courseware.courses import get_course_syllabus_section from courseware.courses import get_course_syllabus_section
%> %>
<section class="container"> <section class="container">
<div class="syllabus_wrapper"> <div class="syllabus_wrapper">
<div class="syllabus"> <div class="syllabus">
<h1> Syllabus </h1> <h1> ${_("Syllabus ")}</h1>
% if user.is_authenticated(): % if user.is_authenticated():
${get_course_syllabus_section(course, 'syllabus')} ${get_course_syllabus_section(course, 'syllabus')}
% else: % else:
......
<%! from django.utils.translation import ugettext as _ %>
<h2>${chapter_module.display_name_with_default}</h2> <h2>${chapter_module.display_name_with_default}</h2>
<p>You were most recently in <a href="${prev_section_url}">${prev_section.display_name_with_default}</a>. If you're done with that, choose another section on the left.</p> <p>${_("You were most recently in {section_link}. If you're done with that, choose another section on the left.").format(
section_link='<a href="{url}">{section_name}</a>'.format(
url=prev_section_url
section_name=prev_section.display_name_with_default,
)
)}</p>
<%! from django.utils.translation import ugettext as _ %>
<html><body> <html><body>
<div> <div>
<p>Python:</p> <p>Python:</p>
...@@ -11,7 +12,7 @@ ...@@ -11,7 +12,7 @@
</div> </div>
%if results: %if results:
<div> <div>
<p>Results:</p> <p>${_("Results:")}</p>
<pre> <pre>
${results|h} ${results|h}
</pre> </pre>
......
<%! from django.utils.translation import ugettext as _ %>
<div class="blank-state"> <div class="blank-state">
% if performed_search: % if performed_search:
Sorry! We can't find anything matching your search. Please try another search. ${_("Sorry! We can't find anything matching your search. Please try another search.")}
% else: % else:
There are no posts here yet. Be the first one to post! ${_("There are no posts here yet. Be the first one to post!")}
% endif % endif
</div> </div>
<%! from django.utils.translation import ugettext as _ %>
<%! from django_comment_client.permissions import has_permission %> <%! from django_comment_client.permissions import has_permission %>
<%inherit file="../courseware/course_navigation.html" /> <%inherit file="../courseware/course_navigation.html" />
<%block name="extratabs"> <%block name="extratabs">
% if has_permission(user, 'create_thread', course.id): % if has_permission(user, 'create_thread', course.id):
<li class="right"><a href="#" class="new-post-btn"><span class="icon icon-edit new-post-icon"></span>New Post</a></li> <li class="right"><a href="#" class="new-post-btn"><span class="icon icon-edit new-post-icon"></span>${_("New Post")}</a></li>
% endif % endif
</%block> </%block>
\ No newline at end of file
<%! from django.utils.translation import ugettext as _ %>
<%include file="_underscore_templates.html" /> <%include file="_underscore_templates.html" />
<div class="discussion-module" data-discussion-id="${discussion_id | h}"> <div class="discussion-module" data-discussion-id="${discussion_id | h}">
<a class="discussion-show control-button" href="javascript:void(0)" data-discussion-id="${discussion_id | h}"><span class="show-hide-discussion-icon"></span><span class="button-text">Show Discussion</span></a> <a class="discussion-show control-button" href="javascript:void(0)" data-discussion-id="${discussion_id | h}"><span class="show-hide-discussion-icon"></span><span class="button-text">Show Discussion</span></a>
<a href="#" class="new-post-btn"><span class="icon icon-edit new-post-icon"></span>New Post</a> <a href="#" class="new-post-btn"><span class="icon icon-edit new-post-icon"></span>${_("New Post")}</a>
</div> </div>
<%! from django.utils.translation import ugettext as _ %>
<%! import json %> <%! import json %>
<%def name="render_dropdown(map)"> <%def name="render_dropdown(map)">
...@@ -30,20 +31,20 @@ ...@@ -30,20 +31,20 @@
<ul class="browse-topic-drop-menu"> <ul class="browse-topic-drop-menu">
<li> <li>
<a href="#" class="drop-menu-meta-category"> <a href="#" class="drop-menu-meta-category">
<span class="board-name" data-discussion_id='#all'>Show All Discussions</span> <span class="board-name" data-discussion_id='#all'>${_("Show All Discussions")}</span>
</a> </a>
</li> </li>
%if flag_moderator: %if flag_moderator:
<li> <li>
<a href="#"> <a href="#">
<span class="board-name" data-discussion_id='#flagged'><i class="icon-flag" style="padding-right:5px;"></i>Show Flagged Discussions</span> <span class="board-name" data-discussion_id='#flagged'><i class="icon-flag" style="padding-right:5px;"></i>${_("Show Flagged Discussions")}</span>
</a> </a>
</li> </li>
%endif %endif
<li> <li>
<a href="#" class="drop-menu-meta-category"> <a href="#" class="drop-menu-meta-category">
<span class="board-name" data-discussion_id='#following'><i class="icon-star" style="padding-right:5px;"></i>Posts I&#39;m Following</span> <span class="board-name" data-discussion_id='#following'><i class="icon-star" style="padding-right:5px;"></i>${_("Posts I'm Following")}</span>
</a> </a>
</li> </li>
${render_dropdown(category_map)} ${render_dropdown(category_map)}
......
<%! from django.utils.translation import ugettext as _ %>
<article class="new-post-article"> <article class="new-post-article">
<div class="inner-wrapper"> <div class="inner-wrapper">
<div class="new-post-form-errors"> <div class="new-post-form-errors">
...@@ -5,25 +6,25 @@ ...@@ -5,25 +6,25 @@
<form class="new-post-form"> <form class="new-post-form">
<div class="left-column"> <div class="left-column">
<div class="options"> <div class="options">
<input type="checkbox" name="follow" class="discussion-follow" class="discussion-follow" id="new-post-follow" checked><label for="new-post-follow">follow this post</label> <input type="checkbox" name="follow" class="discussion-follow" class="discussion-follow" id="new-post-follow" checked><label for="new-post-follow">${_("follow this post")}</label>
<br> <br>
% if course.allow_anonymous: % if course.allow_anonymous:
<input type="checkbox" name="anonymous" class="discussion-anonymous" id="new-post-anonymous"><label for="new-post-anonymous">post anonymously</label> <input type="checkbox" name="anonymous" class="discussion-anonymous" id="new-post-anonymous"><label for="new-post-anonymous">${_("post anonymously")}</label>
%elif course.allow_anonymous_to_peers: %elif course.allow_anonymous_to_peers:
<input type="checkbox" name="anonymous_to_peers" class="discussion-anonymous-to-peers" id="new-post-anonymous-to-peers"><label for="new-post-anonymous-to-peers">post anonymously to classmates</label> <input type="checkbox" name="anonymous_to_peers" class="discussion-anonymous-to-peers" id="new-post-anonymous-to-peers"><label for="new-post-anonymous-to-peers">${_("post anonymously to classmates")}</label>
%endif %endif
%if is_course_cohorted: %if is_course_cohorted:
<div class="form-group-label choose-cohort"> <div class="form-group-label choose-cohort">
Make visible to: ${_("Make visible to:")}
<select class="group-filter-select new-post-group" name = "group_id"> <select class="group-filter-select new-post-group" name = "group_id">
<option value="">All Groups</option> <option value="">${_("All Groups")}</option>
%if is_moderator: %if is_moderator:
%for c in cohorts: %for c in cohorts:
<option value="${c.id}">${c.name}</option> <option value="${c.id}">${c.name}</option>
%endfor %endfor
%else: %else:
%if user_cohort: %if user_cohort:
<option value="${user_cohort}">My Cohort</option> <option value="${user_cohort}">${_("My Cohort")}</option>
%endif %endif
%endif %endif
...@@ -44,8 +45,8 @@ ...@@ -44,8 +45,8 @@
##<div class="form-row"> ##<div class="form-row">
## <input type="text" class="new-post-tags" name="tags" placeholder="Tags"> ## <input type="text" class="new-post-tags" name="tags" placeholder="Tags">
##</div> ##</div>
<input type="submit" class="submit" value="Add post"> <input type="submit" class="submit" value="${_("Add post")}">
<a href="#" class="new-post-cancel">Cancel</a> <a href="#" class="new-post-cancel">${_("Cancel")}</a>
</div> </div>
</form> </form>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%def name="render_form_filter_dropdown(map)"> <%def name="render_form_filter_dropdown(map)">
% for child in map["children"]: % for child in map["children"]:
% if child in map["entries"]: % if child in map["entries"]:
...@@ -26,9 +27,9 @@ ...@@ -26,9 +27,9 @@
<div class="inner-wrapper"> <div class="inner-wrapper">
<form class="new-post-form"> <form class="new-post-form">
<div class="left-column"> <div class="left-column">
<label>Create new post about:</label> <label>${_("Create new post about:")}</label>
<div class="form-topic-drop"> <div class="form-topic-drop">
<a href="#" class="topic_dropdown_button">Show All Discussions<span class="drop-arrow"></span></a> <a href="#" class="topic_dropdown_button">${_("Show All Discussions")}<span class="drop-arrow"></span></a>
<div class="topic_menu_wrapper"> <div class="topic_menu_wrapper">
<div class="topic_menu_search"> <div class="topic_menu_search">
<input type="text" class="form-topic-drop-search-input" placeholder="filter topics"> <input type="text" class="form-topic-drop-search-input" placeholder="filter topics">
...@@ -39,18 +40,18 @@ ...@@ -39,18 +40,18 @@
</div> </div>
</div> </div>
<div class="options"> <div class="options">
<input type="checkbox" name="follow" class="discussion-follow" class="discussion-follow" id="new-post-follow" checked><label for="new-post-follow">follow this post</label> <input type="checkbox" name="follow" class="discussion-follow" class="discussion-follow" id="new-post-follow" checked><label for="new-post-follow">${_("follow this post")}</label>
<br> <br>
% if course.allow_anonymous: % if course.allow_anonymous:
<input type="checkbox" name="anonymous" class="discussion-anonymous" id="new-post-anonymous"><label for="new-post-anonymous">post anonymously</label> <input type="checkbox" name="anonymous" class="discussion-anonymous" id="new-post-anonymous"><label for="new-post-anonymous">${_("post anonymously")}</label>
%elif course.allow_anonymous_to_peers: %elif course.allow_anonymous_to_peers:
<input type="checkbox" name="anonymous_to_peers" class="discussion-anonymous-to-peers" id="new-post-anonymous-to-peers"><label for="new-post-anonymous-to-peers">post anonymously to classmates</label> <input type="checkbox" name="anonymous_to_peers" class="discussion-anonymous-to-peers" id="new-post-anonymous-to-peers"><label for="new-post-anonymous-to-peers">${_("post anonymously to classmates")}</label>
%endif %endif
%if is_course_cohorted and is_moderator: %if is_course_cohorted and is_moderator:
<div class="form-group-label choose-cohort"> <div class="form-group-label choose-cohort">
Make visible to: ${_("Make visible to:")}
<select class="group-filter-select new-post-group" name = "group_id"> <select class="group-filter-select new-post-group" name = "group_id">
<option value="">All Groups</option> <option value="">${_("All Groups")}</option>
%for c in cohorts: %for c in cohorts:
<option value="${c.id}" <option value="${c.id}"
%if user_cohort and str(user_cohort) == str(c.id): %if user_cohort and str(user_cohort) == str(c.id):
...@@ -76,8 +77,8 @@ ...@@ -76,8 +77,8 @@
##<div class="form-row"> ##<div class="form-row">
## <input type="text" class="new-post-tags" name="tags" placeholder="Tags"> ## <input type="text" class="new-post-tags" name="tags" placeholder="Tags">
##</div> ##</div>
<input type="submit" class="submit" value="Add post"> <input type="submit" class="submit" value="${_("Add post")}">
<a href="#" class="new-post-cancel">Cancel</a> <a href="#" class="new-post-cancel">${_("Cancel")}</a>
</div> </div>
</form> </form>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%! import django_comment_client.helpers as helpers %> <%! import django_comment_client.helpers as helpers %>
% if recent_active_threads: % if recent_active_threads:
<article class="discussion-sidebar-following sidebar-module"> <article class="discussion-sidebar-following sidebar-module">
<header> <header>
<h4>Following</h4> <h4>${_("Following")}</h4>
<!--<a href="#" class="sidebar-view-all">view all &rsaquo;</a>--> <!--<a href="#" class="sidebar-view-all">view all &rsaquo;</a>-->
</header> </header>
<ol class="discussion-sidebar-following-list"> <ol class="discussion-sidebar-following-list">
......
<%! from django.utils.translation import ugettext as _ %>
<%! from urllib import urlencode %> <%! from urllib import urlencode %>
<% <%
...@@ -14,5 +15,5 @@ def base_url_for_search(): ...@@ -14,5 +15,5 @@ def base_url_for_search():
% else: % else:
<input class="search-input" type="text" value="${text | h}" id="keywords" autocomplete="off"/> <input class="search-input" type="text" value="${text | h}" id="keywords" autocomplete="off"/>
% endif % endif
<div class="discussion-link discussion-search-link" href="javascript:void(0)">Search posts</div> <div class="discussion-link discussion-search-link" href="javascript:void(0)">${_("Search posts")}</div>
</form> </form>
<%! from django.utils.translation import ugettext as _ %>
% if len(threads) > 0: % if len(threads) > 0:
Similar Posts: Similar Posts:
<a class="hide-similar-posts" href="javascript:void(0)">Hide</a> <a class="hide-similar-posts" href="javascript:void(0)">${_("Hide")}</a>
<div class="new-post-similar-posts"> <div class="new-post-similar-posts">
% for thread in threads: % for thread in threads:
<a class="similar-post" href="${thread['permalink'] | h}">${thread['title'] | h}</a> <a class="similar-post" href="${thread['permalink'] | h}">${thread['title'] | h}</a>
......
<%! from django.utils.translation import ugettext as _ %>
<%namespace name="renderer" file="_content_renderer.html"/> <%namespace name="renderer" file="_content_renderer.html"/>
<%! from django_comment_client.mustache_helpers import url_for_user %> <%! from django_comment_client.mustache_helpers import url_for_user %>
...@@ -7,7 +8,7 @@ ...@@ -7,7 +8,7 @@
<header> <header>
%if thread['group_id']: %if thread['group_id']:
<div class="group-visibility-label">This post visible only to group ${cohort_dictionary[thread['group_id']]}. </div> <div class="group-visibility-label">${_("This post visible only to group %s.") % cohort_dictionary[thread['group_id']]} </div>
%endif %endif
<a href="#" class="vote-btn discussion-vote discussion-vote-up"><span class="plus-icon">+</span> <span class='votes-count-number'>${thread['votes']['up_count']}</span></a> <a href="#" class="vote-btn discussion-vote discussion-vote-up"><span class="plus-icon">+</span> <span class='votes-count-number'>${thread['votes']['up_count']}</span></a>
......
<%! from django.utils.translation import ugettext as _ %>
<script type="text/template" id="thread-list-template"> <script type="text/template" id="thread-list-template">
<div class="browse-search"> <div class="browse-search">
<div class="home"> <div class="home">
...@@ -9,7 +10,7 @@ ...@@ -9,7 +10,7 @@
<a href="#" class="browse-topic-drop-icon"> <a href="#" class="browse-topic-drop-icon">
<i class="icon icon-reorder"></i> <i class="icon icon-reorder"></i>
</a> </a>
<a href="#" class="browse-topic-drop-btn"><span class="current-board">Show All Discussions</span> <span class="drop-arrow">▾</span></a> <a href="#" class="browse-topic-drop-btn"><span class="current-board">${_("Show All Discussions")}</span> <span class="drop-arrow">▾</span></a>
</div> </div>
<%include file="_filter_dropdown.html" /> <%include file="_filter_dropdown.html" />
<div class="search"> <div class="search">
...@@ -19,22 +20,22 @@ ...@@ -19,22 +20,22 @@
</div> </div>
</div> </div>
<div class="sort-bar"> <div class="sort-bar">
<span class="sort-label">Sort by:</span> <span class="sort-label">${_("Sort by:")}</span>
<ul> <ul>
<li><a href="#" class="active" data-sort="date">date</a></li> <li><a href="#" class="active" data-sort="date">${_("date")}</a></li>
<li><a href="#" data-sort="votes">votes</a></li> <li><a href="#" data-sort="votes">${_("votes")}</a></li>
<li><a href="#" data-sort="comments">comments</a></li> <li><a href="#" data-sort="comments">${_("comments")}</a></li>
</ul> </ul>
%if is_course_cohorted and is_moderator: %if is_course_cohorted and is_moderator:
<span class="group-filter-label cohort">Show:</span> <span class="group-filter-label cohort">${_("Show:")}</span>
<select class="group-filter-select cohort-options cohort"> <select class="group-filter-select cohort-options cohort">
<option value="all">View All</option> <option value="all">${_("View All")}</option>
%for c in cohorts: %for c in cohorts:
<option value="${c.id}">View as ${c.name}</option> <option value="${c.id}">${_("View as {name}").format(name=c.name)}</option>
%endfor %endfor
</select> </select>
%endif %endif
</div> </div>
<div class="post-list-wrapper"> <div class="post-list-wrapper">
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django_comment_client.permissions import has_permission %> <%! from django_comment_client.permissions import has_permission %>
<script type="text/template" id="thread-template"> <script type="text/template" id="thread-template">
...@@ -8,15 +9,15 @@ ...@@ -8,15 +9,15 @@
<li class="loading"><div class="loading-animation"></div></li> <li class="loading"><div class="loading-animation"></div></li>
</ol> </ol>
<div class="post-status-closed bottom-post-status" style="display: none"> <div class="post-status-closed bottom-post-status" style="display: none">
This thread is closed. ${_("This thread is closed.")}
</div> </div>
% if course is UNDEFINED or has_permission(user, 'create_comment', course.id): % if course is UNDEFINED or has_permission(user, 'create_comment', course.id):
<form class="discussion-reply-new" data-id="${'<%- id %>'}"> <form class="discussion-reply-new" data-id="${'<%- id %>'}">
<h4>Post a response:</h4> <h4>${_("Post a response:")}</h4>
<ul class="discussion-errors"></ul> <ul class="discussion-errors"></ul>
<div class="reply-body" data-id="${'<%- id %>'}"></div> <div class="reply-body" data-id="${'<%- id %>'}"></div>
<div class="reply-post-control"> <div class="reply-post-control">
<a class="discussion-submit-post control-button" href="#">Submit</a> <a class="discussion-submit-post control-button" href="#">${_("Submit")}</a>
</div> </div>
</form> </form>
% endif % endif
...@@ -41,24 +42,24 @@ ...@@ -41,24 +42,24 @@
<span class="timeago" title="${'<%- created_at %>'}">${'<%- created_at %>'}</span> <span class="timeago" title="${'<%- created_at %>'}">${'<%- created_at %>'}</span>
<span class="post-status-closed top-post-status" style="display: none"> <span class="post-status-closed top-post-status" style="display: none">
&bull; This thread is closed. ${_("&bull; This thread is closed.")}
</span> </span>
</p> </p>
</header> </header>
<div class="post-body">${'<%- body %>'}</div> <div class="post-body">${'<%- body %>'}</div>
<div class="discussion-flag-abuse notflagged" data-role="thread-flag" data-tooltip="Report Misuse"> <div class="discussion-flag-abuse notflagged" data-role="thread-flag" data-tooltip="Report Misuse">
<i class="icon icon-flag"></i><span class="flag-label">Report Misuse</span></div> <i class="icon icon-flag"></i><span class="flag-label">${_("Report Misuse")}</span></div>
% if course and has_permission(user, 'openclose_thread', course.id): % if course and has_permission(user, 'openclose_thread', course.id):
<div class="admin-pin discussion-pin notpinned" data-role="thread-pin" data-tooltip="pin this thread"> <div class="admin-pin discussion-pin notpinned" data-role="thread-pin" data-tooltip="pin this thread">
<i class="icon icon-pushpin"></i><span class="pin-label">Pin Thread</span></div> <i class="icon icon-pushpin"></i><span class="pin-label">${_("Pin Thread")}</span></div>
%else: %else:
${"<% if (pinned) { %>"} ${"<% if (pinned) { %>"}
<div class="discussion-pin notpinned" data-role="thread-pin" data-tooltip="pin this thread"> <div class="discussion-pin notpinned" data-role="thread-pin" data-tooltip="pin this thread">
<i class="icon icon-pushpin"></i><span class="pin-label">Pin Thread</span></div> <i class="icon icon-pushpin"></i><span class="pin-label">${_("Pin Thread")}</span></div>
${"<% } %>"} ${"<% } %>"}
% endif % endif
...@@ -70,16 +71,16 @@ ...@@ -70,16 +71,16 @@
${'<% } %>'} ${'<% } %>'}
<ul class="moderator-actions"> <ul class="moderator-actions">
<li style="display: none"><a class="action-edit" href="javascript:void(0)"><span class="edit-icon"></span> Edit</a></li> <li style="display: none"><a class="action-edit" href="javascript:void(0)"><span class="edit-icon"></span> ${_("Edit")}</a></li>
<li style="display: none"><a class="action-delete" href="javascript:void(0)"><span class="delete-icon"></span> Delete</a></li> <li style="display: none"><a class="action-delete" href="javascript:void(0)"><span class="delete-icon"></span> ${_("Delete")}</a></li>
<li style="display: none"><a class="action-openclose" href="javascript:void(0)"><span class="edit-icon"></span> Close</a></li> <li style="display: none"><a class="action-openclose" href="javascript:void(0)"><span class="edit-icon"></span> ${_("Close")}</a></li>
</ul> </ul>
</div> </div>
</script> </script>
<script type="text/template" id="thread-edit-template"> <script type="text/template" id="thread-edit-template">
<div class="discussion-post edit-post-form"> <div class="discussion-post edit-post-form">
<h1>Editing post</h1> <h1>${_("Editing post")}</h1>
<ul class="edit-post-form-errors"></ul> <ul class="edit-post-form-errors"></ul>
<div class="form-row"> <div class="form-row">
<input type="text" class="edit-post-title" name="title" value="${"<%-title %>"}" placeholder="Title"> <input type="text" class="edit-post-title" name="title" value="${"<%-title %>"}" placeholder="Title">
...@@ -92,8 +93,8 @@ ...@@ -92,8 +93,8 @@
##<div class="form-row"> ##<div class="form-row">
## <input type="text" class="edit-post-tags" name="tags" placeholder="Tags" value="${"<%- tags %>"}"> ## <input type="text" class="edit-post-tags" name="tags" placeholder="Tags" value="${"<%- tags %>"}">
##</div> ##</div>
<input type="submit" class="post-update" value="Update post"> <input type="submit" class="post-update" value="${_("Update post")}">
<a href="#" class="post-cancel">Cancel</a> <a href="#" class="post-cancel">${_("Cancel")}</a>
</div> </div>
</script> </script>
...@@ -107,7 +108,7 @@ ...@@ -107,7 +108,7 @@
<div class="comment-body" data-id="${'<%- wmdId %>'}" <div class="comment-body" data-id="${'<%- wmdId %>'}"
data-placeholder="Add a comment..."></div> data-placeholder="Add a comment..."></div>
<div class="comment-post-control"> <div class="comment-post-control">
<a class="discussion-submit-comment control-button" href="#">Submit</a> <a class="discussion-submit-comment control-button" href="#">${_("Submit")}</a>
</div> </div>
</form> </form>
% endif % endif
...@@ -129,21 +130,21 @@ ...@@ -129,21 +130,21 @@
<i class="icon icon-flag"></i><span class="flag-label">Report Misuse</span></div> <i class="icon icon-flag"></i><span class="flag-label">Report Misuse</span></div>
</div> </div>
<ul class="moderator-actions response-local"> <ul class="moderator-actions response-local">
<li style="display: none"><a class="action-edit" href="javascript:void(0)"><span class="edit-icon"></span> Edit</a></li> <li style="display: none"><a class="action-edit" href="javascript:void(0)"><span class="edit-icon"></span> ${_("Edit")}</a></li>
<li style="display: none"><a class="action-delete" href="javascript:void(0)"><span class="delete-icon"></span> Delete</a></li> <li style="display: none"><a class="action-delete" href="javascript:void(0)"><span class="delete-icon"></span> ${_("Delete")}</a></li>
<li style="display: none"><a class="action-openclose" href="javascript:void(0)"><span class="edit-icon"></span> Close</a></li> <li style="display: none"><a class="action-openclose" href="javascript:void(0)"><span class="edit-icon"></span> ${_("Close")}</a></li>
</ul> </ul>
</script> </script>
<script type="text/template" id="thread-response-edit-template"> <script type="text/template" id="thread-response-edit-template">
<div class="edit-post-form"> <div class="edit-post-form">
<h1>Editing response</h1> <h1>${_("Editing response")}</h1>
<ul class="edit-post-form-errors"></ul> <ul class="edit-post-form-errors"></ul>
<div class="form-row"> <div class="form-row">
<div class="edit-post-body" name="body">${"<%- body %>"}</div> <div class="edit-post-body" name="body">${"<%- body %>"}</div>
</div> </div>
<input type="submit" class="post-update" value="Update response"> <input type="submit" class="post-update" value="${_("Update response")}">
<a href="#" class="post-cancel">Cancel</a> <a href="#" class="post-cancel">${_("Cancel")}</a>
</div> </div>
</script> </script>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django_comment_client.helpers import pluralize %> <%! from django_comment_client.helpers import pluralize %>
<%! from django_comment_client.permissions import has_permission, check_permissions_by_view %> <%! from django_comment_client.permissions import has_permission, check_permissions_by_view %>
<%! from operator import attrgetter %> <%! from operator import attrgetter %>
...@@ -15,9 +16,9 @@ ...@@ -15,9 +16,9 @@
<div class="sidebar-comments-count"><span>${profiled_user['comments_count'] | h}</span> ${pluralize('comment', profiled_user['comments_count']) | h}</div> <div class="sidebar-comments-count"><span>${profiled_user['comments_count'] | h}</span> ${pluralize('comment', profiled_user['comments_count']) | h}</div>
% if check_permissions_by_view(user, course.id, content=None, name='update_moderator_status'): % if check_permissions_by_view(user, course.id, content=None, name='update_moderator_status'):
% if "Moderator" in role_names: % if "Moderator" in role_names:
<a href="javascript:void(0)" class="sidebar-toggle-moderator-button sidebar-revoke-moderator-button">Revoke Moderator rights</a> <a href="javascript:void(0)" class="sidebar-toggle-moderator-button sidebar-revoke-moderator-button">${_("Revoke Moderator rights")}</a>
% else: % else:
<a href="javascript:void(0)" class="sidebar-toggle-moderator-button sidebar-promote-moderator-button">Promote to Moderator</a> <a href="javascript:void(0)" class="sidebar-toggle-moderator-button sidebar-promote-moderator-button">${_("Promote to Moderator")}</a>
% endif % endif
% endif % endif
</div> </div>
<%! from django.utils.translation import ugettext as _ %>
<%! import django_comment_client.helpers as helpers %> <%! import django_comment_client.helpers as helpers %>
<%! from django.template.defaultfilters import escapejs %> <%! from django.template.defaultfilters import escapejs %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
...@@ -5,7 +6,7 @@ ...@@ -5,7 +6,7 @@
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<%namespace name='static' file='../static_content.html'/> <%namespace name='static' file='../static_content.html'/>
<%block name="bodyclass">discussion</%block> <%block name="bodyclass">discussion</%block>
<%block name="title"><title>Discussion – ${course.number | h}</title></%block> <%block name="title"><title>${_("Discussion - {course_number}").format(course_number=course.number) | h}</title></%block>
<%block name="headextra"> <%block name="headextra">
<%static:css group='course'/> <%static:css group='course'/>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<h1>We're sorry</h1> <h1>${_("We're sorry")}</h1>
<p>The forums are currently undergoing maintenance. We'll have them back up shortly!</p> <p>${_("The forums are currently undergoing maintenance. We'll have them back up shortly!")}</p>
<%! from django.utils.translation import ugettext as _ %>
<%! import django_comment_client.helpers as helpers %> <%! import django_comment_client.helpers as helpers %>
<%! from django.template.defaultfilters import escapejs %> <%! from django.template.defaultfilters import escapejs %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
...@@ -6,7 +7,7 @@ ...@@ -6,7 +7,7 @@
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<%namespace name='static' file='../static_content.html'/> <%namespace name='static' file='../static_content.html'/>
<%block name="bodyclass">discussion</%block> <%block name="bodyclass">discussion</%block>
<%block name="title"><title>Discussion – ${course.number}</title></%block> <%block name="title"><title>${_("Discussion - {course_number}").format(course_number=course.number) | h}</title></%block>
<%block name="headextra"> <%block name="headextra">
<%static:css group='course'/> <%static:css group='course'/>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.template.defaultfilters import escapejs %> <%! from django.template.defaultfilters import escapejs %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
<%namespace name='static' file='../static_content.html'/> <%namespace name='static' file='../static_content.html'/>
<%block name="bodyclass">discussion</%block> <%block name="bodyclass">discussion</%block>
<%block name="title"><title>Discussion – ${course.number | h}</title></%block> <%block name="title"><title>${_("Discussion - {course_number}").format(course_number=course.number) | h}</title></%block>
<%block name="headextra"> <%block name="headextra">
<%static:css group='course'/> <%static:css group='course'/>
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
<section class="container"> <section class="container">
<div class="course-wrapper"> <div class="course-wrapper">
<section aria-label="User Profile" class="user-profile"> <section aria-label="${_('User Profile')}" class="user-profile">
<nav> <nav>
<article class="sidebar-module discussion-sidebar"> <article class="sidebar-module discussion-sidebar">
...@@ -30,7 +31,7 @@ ...@@ -30,7 +31,7 @@
</section> </section>
<section class="course-content container discussion-user-threads" data-user-id="${django_user.id | escapejs}" data-course-id="${course.id | escapejs}" data-threads="${threads}" data-user-info="${user_info}"> <section class="course-content container discussion-user-threads" data-user-id="${django_user.id | escapejs}" data-course-id="${course.id | escapejs}" data-threads="${threads}" data-user-info="${user_info}">
<h2>Active Threads</h2> <h2>${_("Active Threads")}</h2>
</section> </section>
</div> </div>
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" /> <%inherit file="main.html" />
<section class="container activation"> <section class="container activation">
<section class="message"> <section class="message">
<h1 class="invalid">E-mail change failed</h1> <h1 class="invalid">${_("E-mail change failed")}</h1>
<hr class="horizontal-divider"> <hr class="horizontal-divider">
<p>We were unable to send a confirmation email to ${email}</p> <p>${_("We were unable to send a confirmation email to {email}").format(email=email)}</p>
<p>Go back to the <a href="/">home page</a>.</p> <p>${_('Go back to the {link_start}home page{link_end}.').format(link_start='<a href="/">', link_end='</a>')}</p>
</section> </section>
</section> </section>
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%inherit file="main.html" /> <%inherit file="main.html" />
<section class="container activation"> <section class="container activation">
<section class="message"> <section class="message">
<h1 class="valid">E-mail change successful!</h1> <h1 class="valid">${_("E-mail change successful!")}</h1>
<hr class="horizontal-divider"> <hr class="horizontal-divider">
<p>You should see your new email in your <a href="${reverse('dashboard')}">dashboard</a>.</p> <p>${_('You should see your new email in your {link_start}dashboard{link_end}.').format(
link_start='<a href="{url}">'.format(url=reverse('dashboard')),
link_end='</a>',
)}</p>
</section> </section>
</section> </section>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" /> <%inherit file="main.html" />
<section class="container activation"> <section class="container activation">
<section class="message"> <section class="message">
<h1 class="invalid">E-mail change failed</h1> <h1 class="invalid">${_("E-mail change failed")}</h1>
<hr class="horizontal-divider"> <hr class="horizontal-divider">
<p>An account with the new e-mail address already exists.</p> <p>${_("An account with the new e-mail address already exists.")}</p>
<p>Go back to the <a href="/">home page</a>.</p> <p>${_("Go back to the {link_start}home page{link_end}.").format(link_start='<a href="/">', link_end='</a>')}</p>
</section> </section>
</section> </section>
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%inherit file="main.html" /> <%inherit file="main.html" />
<section class="container activation"> <section class="container activation">
<section class="message"> <section class="message">
<h1 class="invalid">E-mail change successful!</h1> <h1 class="invalid">${_("E-mail change successful!")}</h1>
<hr class="horizontal-divider"> <hr class="horizontal-divider">
<p>You should see your new email in your <a href="${reverse('dashboard')}">dashboard</a>.</p> <p>${_('You should see your new email in your {link_start}dashboard{link_end}.').format(
link_start='<a href="{url}">'.format(url=reverse('dashboard')),
link_end='</a>',
)}</p>
</section> </section>
</section> </section>
<h1>Student Enrollment Form </h1> <%! from django.utils.translation import ugettext as _ %>
<p> Course: ${ course } <h1>${_("Student Enrollment Form")} </h1>
<p> ${_("Course: ") % course}
<form method="POST"> <form method="POST">
<input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }"> <input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
<h2> Add new students </h2> <h2> ${_("Add new students")} </h2>
<textarea name="new_students"> <textarea name="new_students">
</textarea> </textarea>
<input type="submit"> <input type="submit">
</form> </form>
<p> Existing students: <p> ${_("Existing students:")}
<p> ${ existing_students } <p> ${ existing_students }
<p> New students added: <p> ${_("New students added: ")}
${ added_students } ${ added_students }
<p> Students rejected: <p> ${_("Students rejected: ")}
${ rejected_students } ${ rejected_students }
<p> Debug: <p> ${_("Debug: ")}
<p> ${ debug } <p> ${ debug }
<p> foo <p> ${_("foo")}
<p> bar <p> ${_("bar")}
<p> biff <p> ${_("biff")}
<%! from django.utils.translation import ugettext as _ %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> "http://www.w3.org/TR/html4/strict.dtd">
<html> <html>
<head> <head>
<title>External Authentication failed</title> <title>${_("External Authentication failed")}</title>
</head> </head>
<body> <body>
<h1>External Authentication failed</h1> <h1>${_("External Authentication failed")}</h1>
<p>${message}</p> <p>${message}</p>
</body> </body>
</html> </html>
<%! from django.utils.translation import ugettext as _ %>
<%! <%!
from xmodule.util.date_utils import get_default_time_display from xmodule.util.date_utils import get_default_time_display
%> %>
<div class="folditbasic"> <div class="folditbasic">
<p><strong>Due:</strong> ${get_default_time_display(due)} <p><strong>${_("Due:")}</strong> ${get_default_time_display(due)}
<p> <p>
<strong>Status:</strong> <strong>${_("Status:")}</strong>
% if success: % if success:
You have successfully gotten to level ${goal_level}. ${_('You have successfully gotten to level {goal_level}.').format(goal_level=goal_level)}'
% else: % else:
You have not yet gotten to level ${goal_level}. ${_('You have not yet gotten to level {goal_level}.').format(goal_level=goal_level)}
% endif % endif
</p> </p>
<h3>Completed puzzles</h3> <h3>${_("Completed puzzles")}</h3>
<table> <table>
<tr> <tr>
<th>Level</th> <th>${_("Level")}</th>
<th>Submitted</th> <th>${_("Submitted")}</th>
</tr> </tr>
% for puzzle in completed: % for puzzle in completed:
<tr> <tr>
......
<%! from django.utils.translation import ugettext as _ %>
<div class="folditchallenge"> <div class="folditchallenge">
<h3>Puzzle Leaderboard</h3> <h3>${_("Puzzle Leaderboard")}</h3>
<table> <table>
<tr> <tr>
<th>User</th> <th>${_("User")}</th>
<th>Score</th> <th>${_("Score")}</th>
</tr> </tr>
% for pair in top_scores: % for pair in top_scores:
<tr> <tr>
......
## mako ## mako
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<div class="wrapper wrapper-footer"> <div class="wrapper wrapper-footer">
...@@ -9,27 +10,27 @@ ...@@ -9,27 +10,27 @@
<ol> <ol>
<li class="nav-colophon-01"> <li class="nav-colophon-01">
<a id="about" href="${marketing_link('ABOUT')}"> <a id="about" href="${marketing_link('ABOUT')}">
About ${_("About")}
</a> </a>
</li> </li>
<li class="nav-colophon-02"> <li class="nav-colophon-02">
<a id="jobs" href="${marketing_link('JOBS')}"> <a id="jobs" href="${marketing_link('JOBS')}">
Jobs ${_("Jobs")}
</a> </a>
</li> </li>
<li class="nav-colophon-03"> <li class="nav-colophon-03">
<a id="press" href="${marketing_link('PRESS')}"> <a id="press" href="${marketing_link('PRESS')}">
Press ${_("Press")}
</a> </a>
</li> </li>
<li class="nav-colophon-04"> <li class="nav-colophon-04">
<a id="faq" href="${marketing_link('FAQ')}"> <a id="faq" href="${marketing_link('FAQ')}">
FAQ ${_("FAQ")}
</a> </a>
</li> </li>
<li class="nav-colophon-05"> <li class="nav-colophon-05">
<a id="contact" href="${marketing_link('CONTACT')}"> <a id="contact" href="${marketing_link('CONTACT')}">
Contact ${_("Contact")}
</a> </a>
</li> </li>
</ol> </ol>
...@@ -38,7 +39,7 @@ ...@@ -38,7 +39,7 @@
<div class="colophon-about"> <div class="colophon-about">
<img src="${MITX_ROOT_URL}/static/images/header-logo.png" /> <img src="${MITX_ROOT_URL}/static/images/header-logo.png" />
<p>EdX is a non-profit created by founding partners Harvard and MIT whose mission is to bring the best of higher education to students of all ages anywhere in the world, wherever there is Internet access. EdX’s free online MOOCs are interactive and subjects include computer science, public health, and artificial intelligence.</p> <p>${_("EdX is a non-profit created by founding partners Harvard and MIT whose mission is to bring the best of higher education to students of all ages anywhere in the world, wherever there is Internet access. EdX's free online MOOCs are interactive and subjects include computer science, public health, and artificial intelligence.")}</p>
</div> </div>
</div> </div>
...@@ -73,15 +74,15 @@ ...@@ -73,15 +74,15 @@
</ul> </ul>
</nav> </nav>
<p class="copyright">&copy; 2013 edX, some rights reserved.</p> <p class="copyright">${_("&copy; 2013 edX, some rights reserved.")}</p>
<nav class="nav-legal"> <nav class="nav-legal">
<ul> <ul>
<li class="nav-legal-01"> <li class="nav-legal-01">
<a href="${marketing_link('TOS')}">Terms of Service and Honor Code</a> <a href="${marketing_link('TOS')}">${_("Terms of Service and Honor Code")}</a>
</li> </li>
<li class="nav-legal-02"> <li class="nav-legal-02">
<a href="${marketing_link('PRIVACY')}">Privacy Policy</a> <a href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a>
</li> </li>
</ul> </ul>
</nav> </nav>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<section id="forgot-password-modal" class="modal forgot-password-modal"> <section id="forgot-password-modal" class="modal forgot-password-modal">
<div class="inner-wrapper"> <div class="inner-wrapper">
<div id="password-reset"> <div id="password-reset">
<header> <header>
<h2>Password Reset</h2> <h2>${_("Password Reset")}</h2>
</header> </header>
<div class="instructions"> <div class="instructions">
<p>Please enter your e-mail address below, and we will e-mail instructions for setting a new password.</p> <p>${_("Please enter your e-mail address below, and we will e-mail instructions for setting a new password.")}</p>
</div> </div>
<form id="pwd_reset_form" action="${reverse('password_reset')}" method="post" data-remote="true"> <form id="pwd_reset_form" action="${reverse('password_reset')}" method="post" data-remote="true">
<fieldset class="group group-form group-form-requiredinformation"> <fieldset class="group group-form group-form-requiredinformation">
<legend class="is-hidden">Required Information</legend> <legend class="is-hidden">${_("Required Information")}</legend>
<ol class="list-input"> <ol class="list-input">
<li class="field required text" id="field-email"> <li class="field required text" id="field-email">
<label for="pwd_reset_email">Your E-mail Address</label> <label for="pwd_reset_email">${_("Your E-mail Address")}</label>
<input class="" id="pwd_reset_email" type="email" name="email" value="" placeholder="example: username@domain.com" /> <input class="" id="pwd_reset_email" type="email" name="email" value="" placeholder="example: username@domain.com" />
<span class="tip tip-input">This is the email address you used to register with ${settings.PLATFORM_NAME}</span> <span class="tip tip-input">${_("This is the email address you used to register with {platform}").format(platform=settings.PLATFORM_NAME)}</span>
</li> </li>
</ol> </ol>
</fieldset> </fieldset>
<div class="form-actions"> <div class="form-actions">
<button name="submit" type="submit" id="pwd_reset_button" class="action action-primary action-update">Reset My Password</button> <button name="submit" type="submit" id="pwd_reset_button" class="action action-primary action-update">${_("Reset My Password")}</button>
</div> </div>
</form> </form>
</div> </div>
...@@ -44,12 +46,12 @@ ...@@ -44,12 +46,12 @@
$("#password-reset").html(json.value); $("#password-reset").html(json.value);
} else { } else {
if($('#pwd_error').length == 0) { if($('#pwd_error').length == 0) {
$('#pwd_reset_form').prepend('<div id="pwd_error" class="modal-form-error">Email is incorrect.</div>'); $('#pwd_reset_form').prepend('<div id="pwd_error" class="modal-form-error">${_("Email is incorrect.")}</div>');
} }
$('#pwd_error').stop().css("display", "block"); $('#pwd_error').stop().css("display", "block");
} }
}); });
// removing close link's default behavior // removing close link's default behavior
$('#login-modal .close-modal').click(function(e) { $('#login-modal .close-modal').click(function(e) {
e.preventDefault(); e.preventDefault();
......
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%! from datetime import datetime %> <%! from datetime import datetime %>
<%! import pytz %> <%! import pytz %>
...@@ -7,13 +9,13 @@ ...@@ -7,13 +9,13 @@
% if settings.MITX_FEATURES.get('ENABLE_FEEDBACK_SUBMISSION', False): % if settings.MITX_FEATURES.get('ENABLE_FEEDBACK_SUBMISSION', False):
<div class="help-tab"> <div class="help-tab">
<a href="#help-modal" rel="leanModal">Help</a> <a href="#help-modal" rel="leanModal">${_("Help")}</a>
</div> </div>
<section id="help-modal" class="modal"> <section id="help-modal" class="modal">
<div class="inner-wrapper" id="help_wrapper"> <div class="inner-wrapper" id="help_wrapper">
<header> <header>
<h2><span class="edx">edX</span> Help</h2> <h2>${_('{span_start}edX{span_end} Help').format(span_start='<span class="edx">', span_end='</span>')}</h2>
<hr> <hr>
</header> </header>
...@@ -22,22 +24,22 @@ discussion_link = get_discussion_link(course) if course else None ...@@ -22,22 +24,22 @@ discussion_link = get_discussion_link(course) if course else None
%> %>
% if discussion_link: % if discussion_link:
<p>For <strong>questions on course lectures, homework, tools, or materials for this course</strong>, post in the <p>${_('For <strong>questions on course lectures, homework, tools, or materials for this course</strong>, post in the {link_start}course discussion forum{link_end}.').format(
<a href="${discussion_link}" target="_blank"/>course discussion forum</a>. link_start='<a href="{url}" target="_blank">'.format(url=discussion_link),
link_end='</a>',
)}
</p> </p>
% endif % endif
<p>Have <strong>general questions about edX</strong>? You can find lots of helpful information in the edX
<a href="/help" target="_blank">FAQ</a>.</p>
<p>Have a <strong>question about something specific</strong>? You can contact the edX general <p>${_('Have <strong>general questions about edX</strong>? You can find lots of helpful information in the edX {link_start}FAQ{link_end}.').format(link_start='<a href="/help" target="_blank">', link_end='</a>')}</p>
support team directly:</p>
<p>${_('Have a <strong>question about something specific</strong>? You can contact the edX general support team directly:')}</p>
<hr> <hr>
<div class="help-buttons"> <div class="help-buttons">
<a href="#" id="feedback_link_problem">Report a problem</a> <a href="#" id="feedback_link_problem">${_('Report a problem')}</a>
<a href="#" id="feedback_link_suggestion">Make a suggestion</a> <a href="#" id="feedback_link_suggestion">${_('Make a suggestion')}</a>
<a href="#" id="feedback_link_question">Ask a question</a> <a href="#" id="feedback_link_question">${_('Ask a question')}</a>
</div> </div>
## TODO: find a way to refactor this ## TODO: find a way to refactor this
...@@ -54,15 +56,15 @@ discussion_link = get_discussion_link(course) if course else None ...@@ -54,15 +56,15 @@ discussion_link = get_discussion_link(course) if course else None
<form id="feedback_form" class="feedback_form" method="post" data-remote="true" action="/submit_feedback"> <form id="feedback_form" class="feedback_form" method="post" data-remote="true" action="/submit_feedback">
<div id="feedback_error" class="modal-form-error"></div> <div id="feedback_error" class="modal-form-error"></div>
% if not user.is_authenticated(): % if not user.is_authenticated():
<label data-field="name">Name*</label> <label data-field="name">${_('Name*')}</label>
<input name="name" type="text"> <input name="name" type="text">
<label data-field="email">E-mail*</label> <label data-field="email">${_('E-mail*')}</label>
<input name="email" type="text"> <input name="email" type="text">
% endif % endif
<label data-field="subject">Briefly describe your issue*</label> <label data-field="subject">${_('Briefly describe your issue*')}</label>
<input name="subject" type="text"> <input name="subject" type="text">
<label data-field="details">Tell us the details* <label data-field="details">${_('Tell us the details*')}
<span class="tip">Include error messages, steps which lead to the issue, etc</span></label> <span class="tip">${_('Include error messages, steps which lead to the issue, etc')}</span></label>
<textarea name="details"></textarea> <textarea name="details"></textarea>
<input name="issue_type" type="hidden"> <input name="issue_type" type="hidden">
% if course: % if course:
...@@ -82,20 +84,31 @@ discussion_link = get_discussion_link(course) if course else None ...@@ -82,20 +84,31 @@ discussion_link = get_discussion_link(course) if course else None
<div class="inner-wrapper" id="feedback_success_wrapper"> <div class="inner-wrapper" id="feedback_success_wrapper">
<header> <header>
<h2>Thank You!</h2> <h2>${_('Thank You!')}</h2>
<hr> <hr>
</header> </header>
<% <%
dst = datetime.now(pytz.utc).astimezone(pytz.timezone("America/New_York")).dst() dst = datetime.now(pytz.utc).astimezone(pytz.timezone("America/New_York")).dst()
business_hours = "13:00 UTC to 21:00 UTC" if dst else "14:00 UTC to 22:00 UTC" if dst:
open_time = "13:00"
close_time = "21:00"
else:
open_time = "14:00"
close_time = "22:00"
%> %>
<p> <p>
Thank you for your inquiry or feedback. We typically respond to a ${_(
request within one business day (Monday to Friday, 'Thank you for your inquiry or feedback. We typically respond to a request '
${business_hours}.) In the meantime, please review our 'within one business day (Monday to Friday, {open_time} UTC to {close_time} UTC.) In the meantime, please '
<a href="/help" target="_blank">detailed FAQs</a> 'review our {link_start}detailed FAQs{link_end} where most questions have '
where most questions have already been answered. 'already been answered.'
).format(
open_time=open_time,
close_time=close_time,
link_start='<a href="/help" target="_blank">',
link_end='</a>'
)}
</p> </p>
<div class="close-modal"> <div class="close-modal">
...@@ -129,28 +142,29 @@ discussion_link = get_discussion_link(course) if course else None ...@@ -129,28 +142,29 @@ discussion_link = get_discussion_link(course) if course else None
$("#feedback_link_problem").click(function(event) { $("#feedback_link_problem").click(function(event) {
showFeedback( showFeedback(
event, event,
"problem", gettext("problem"),
"Report a Problem", gettext("Report a Problem"),
"Brief description of the problem*", gettext("Brief description of the problem*"),
"Details of the problem you are encountering* <span class='tip'>Include error messages, steps which lead to the issue, etc.</span>" gettext("Details of the problem you are encountering*") + "<span class='tip'>" +
gettext("Include error messages, steps which lead to the issue, etc.") + "</span>"
); );
}); });
$("#feedback_link_suggestion").click(function(event) { $("#feedback_link_suggestion").click(function(event) {
showFeedback( showFeedback(
event, event,
"suggestion", gettext("suggestion"),
"Make a Suggestion", gettext("Make a Suggestion"),
"Brief description of your suggestion*", gettext("Brief description of your suggestion*"),
"Details*" gettext("Details*")
); );
}); });
$("#feedback_link_question").click(function(event) { $("#feedback_link_question").click(function(event) {
showFeedback( showFeedback(
event, event,
"question", gettext("question"),
"Ask a Question", gettext("Ask a Question"),
"Brief summary of your question*", gettext("Brief summary of your question*"),
"Details*" gettext("Details*")
); );
}); });
$("#feedback_form").submit(function() { $("#feedback_form").submit(function() {
...@@ -175,13 +189,16 @@ discussion_link = get_discussion_link(course) if course else None ...@@ -175,13 +189,16 @@ discussion_link = get_discussion_link(course) if course else None
$("#feedback_error").html(responseData.error).stop().css("display", "block"); $("#feedback_error").html(responseData.error).stop().css("display", "block");
} else { } else {
// If no data (or malformed data) is returned, a server error occurred // If no data (or malformed data) is returned, a server error occurred
htmlStr = "An error has occurred."; htmlStr = gettext("An error has occurred.");
% if settings.FEEDBACK_SUBMISSION_EMAIL: % if settings.FEEDBACK_SUBMISSION_EMAIL:
htmlStr += " Please <a href='#' id='feedback_email'>send us e-mail</a>."; htmlStr += " " + _.template(
gettext("Please {link_start}send us e-mail{link_end}."),
{link_start: '<a href="#" id="feedback_email">', link_end='</a>'},
{interpolate: /\{(.+?)\}/g})
% else: % else:
// If no email is configured, we can't do much other than // If no email is configured, we can't do much other than
// ask the user to try again later // ask the user to try again later
htmlStr += " Please try again later."; htmlStr += gettext(" Please try again later.");
% endif % endif
$("#feedback_error").html(htmlStr).stop().css("display", "block"); $("#feedback_error").html(htmlStr).stop().css("display", "block");
% if settings.FEEDBACK_SUBMISSION_EMAIL: % if settings.FEEDBACK_SUBMISSION_EMAIL:
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%! from time import strftime %> <%! from time import strftime %>
<%inherit file="main.html" /> <%inherit file="main.html" />
...@@ -9,23 +11,23 @@ ...@@ -9,23 +11,23 @@
<div class="title"> <div class="title">
<hgroup> <hgroup>
% if self.stanford_theme_enabled(): % if self.stanford_theme_enabled():
<h1>Free courses from <strong>Stanford</strong></h1> <h1>${_("Free courses from <strong>Stanford</strong>")}</h1>
% else: % else:
<h1>The Future of Online Education</h1> <h1>${_("The Future of Online Education")}</h1>
% endif % endif
<h2>For anyone, anywhere, anytime</h2> <h2>${_("For anyone, anywhere, anytime")}</h2>
</hgroup> </hgroup>
## Disable social buttons for non-edX sites ## Disable social buttons for non-edX sites
% if not self.theme_enabled(): % if not self.theme_enabled():
<section class="actions"> <section class="actions">
<div class="main-cta"> <div class="main-cta">
<a href="#signup-modal" id="signup_action" class="find-courses" rel="leanModal">Sign Up</a> <a href="#signup-modal" id="signup_action" class="find-courses" rel="leanModal">${_("Sign Up")}</a>
</div> </div>
<div class="secondary-actions"> <div class="secondary-actions">
<div class="social-sharing"> <div class="social-sharing">
<div class="sharing-message">Stay up to date with all edX has to offer!</div> <div class="sharing-message">${_("Stay up to date with all edX has to offer!")}</div>
<a href="https://twitter.com/edXOnline" class="share"> <a href="https://twitter.com/edXOnline" class="share">
<img src="${static.url('images/social/twitter-sharing.png')}"> <img src="${static.url('images/social/twitter-sharing.png')}">
</a> </a>
...@@ -54,7 +56,7 @@ ...@@ -54,7 +56,7 @@
<section class="highlighted-courses"> <section class="highlighted-courses">
## Disable university partner logos and sites for non-edX sites ## Disable university partner logos and sites for non-edX sites
% if not self.theme_enabled(): % if not self.theme_enabled():
<h2>Explore free courses from <span class="edx">edX</span> universities</h2> <h2>${_('Explore free courses from {span_start}edX{span_end} universities').format(span_start='<span class="edx">', span_end='</span>')}</h2>
<section class="university-partners university-partners2x6"> <section class="university-partners university-partners2x6">
<ol class="partners"> <ol class="partners">
...@@ -180,8 +182,8 @@ ...@@ -180,8 +182,8 @@
<section class="container"> <section class="container">
<section class="more-info"> <section class="more-info">
<header> <header>
<h2><span class="edx">edX</span> News &amp; Announcements</h2> <h2>${_('{span_start}edX{span_end} News &amp; Announcements').format(span_start='<span class="edx">', span_end='</span>')}</h2>
<a class="action action-mediakit" href="${reverse('media-kit')}"> <span class="org-name">edX</span> MEDIA KIT</a> <a class="action action-mediakit" href="${reverse('media-kit')}"> ${_('{span_start}edX{span_end} MEDIA KIT').format(span_start='<span class="org-name">', span_end='</span>')}</a>
</header> </header>
<section class="news"> <section class="news">
<section class="blog-posts"> <section class="blog-posts">
...@@ -201,13 +203,13 @@ ...@@ -201,13 +203,13 @@
%endfor %endfor
</section> </section>
<section class="press-links"> <section class="press-links">
<h3>edX in the News:</h3> <h3>${_("edX in the News:")}</h3>
<a target="_blank" href="http://www.nytimes.com/2013/04/30/education/adapting-to-blended-courses-and-finding-early-benefits.html?ref=education">The New York Times</a>, <a target="_blank" href="http://www.nytimes.com/2013/04/30/education/adapting-to-blended-courses-and-finding-early-benefits.html?ref=education">${_("The New York Times")}</a>,
<a target="_blank" href="http://online.wsj.com/article/SB10001424127887323741004578414861572832182.html?mod=googlenews_wsj">The Wall Street Journal</a>, <a target="_blank" href="http://online.wsj.com/article/SB10001424127887323741004578414861572832182.html?mod=googlenews_wsj">${_("The Wall Street Journal")}</a>,
<a target="_blank" href="http://www.washingtonpost.com/local/education/stanford-to-help-build-edx-mooc-platform/2013/04/02/5b53bb3e-9bbe-11e2-9a79-eb5280c81c63_story.html">The Washington Post</a>, <a target="_blank" href="http://www.washingtonpost.com/local/education/stanford-to-help-build-edx-mooc-platform/2013/04/02/5b53bb3e-9bbe-11e2-9a79-eb5280c81c63_story.html">${_("The Washington Post")}</a>,
<a target="_blank" href="http://www.cbsnews.com/video/watch/?id=50143164n">CBS Television</a>, <a target="_blank" href="http://www.cbsnews.com/video/watch/?id=50143164n">${_("CBS Television")}</a>,
<a target="_blank" href="http://bostonglobe.com/2012/12/04/edx/AqnQ808q4IEcaUa8KuZuBO/story.html">The Boston Globe</a> <a target="_blank" href="http://bostonglobe.com/2012/12/04/edx/AqnQ808q4IEcaUa8KuZuBO/story.html">${_("The Boston Globe")}</a>
<a href="${reverse('press')}" class="read-more">Read More &rarr;</a> <a href="${reverse('press')}" class="read-more">${_("Read More")} &rarr;</a>
</section> </section>
</section> </section>
</section> </section>
...@@ -228,7 +230,6 @@ ...@@ -228,7 +230,6 @@
</div> </div>
</section> </section>
<%block name="js_extra"> <%block name="js_extra">
<script type="text/javascript""> <script type="text/javascript"">
$(window).load(function() { $(window).load(function() {
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block> <%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
...@@ -6,7 +7,7 @@ ...@@ -6,7 +7,7 @@
<%static:css group='course'/> <%static:css group='course'/>
</%block> </%block>
<%block name="title"><title>${course.number} Staff Grading</title></%block> <%block name="title"><title>${_("{course_number} Staff Grading").format(course_number=course.number)}</title></%block>
<%include file="/courseware/course_navigation.html" args="active_page='staff_grading'" /> <%include file="/courseware/course_navigation.html" args="active_page='staff_grading'" />
...@@ -17,7 +18,7 @@ ...@@ -17,7 +18,7 @@
<section class="container"> <section class="container">
<div class="staff-grading" data-ajax_url="${ajax_url}"> <div class="staff-grading" data-ajax_url="${ajax_url}">
<h1>Staff grading</h1> <h1>${_("Staff grading")}</h1>
<div class="breadcrumbs"> <div class="breadcrumbs">
</div> </div>
<div class="error-container"> <div class="error-container">
...@@ -27,12 +28,12 @@ ...@@ -27,12 +28,12 @@
<! -- Problem List View --> <! -- Problem List View -->
<section class="problem-list-container"> <section class="problem-list-container">
<h2>Instructions</h2> <h2>${_("Instructions")}</h2>
<div class="instructions"> <div class="instructions">
<p>This is the list of problems that currently need to be graded in order to train the machine learning models. Each problem needs to be trained separately, and we have indicated the number of student submissions that need to be graded in order for a model to be generated. You can grade more than the minimum required number of submissions--this will improve the accuracy of machine learning, though with diminishing returns. You can see the current accuracy of machine learning while grading.</p> <p>${_("This is the list of problems that currently need to be graded in order to train the machine learning models. Each problem needs to be trained separately, and we have indicated the number of student submissions that need to be graded in order for a model to be generated. You can grade more than the minimum required number of submissions--this will improve the accuracy of machine learning, though with diminishing returns. You can see the current accuracy of machine learning while grading.")}</p>
</div> </div>
<h2>Problem List</h2> <h2>${_("Problem List")}</h2>
<table class="problem-list"> <table class="problem-list">
</table> </table>
</section> </section>
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
</div> </div>
</div> </div>
<div class="prompt-information-container"> <div class="prompt-information-container">
<h3>Prompt <a href="#" class="question-header">(Hide)</a> </h3> <h3>${_('Prompt')} <a href="#" class="question-header">${_("(Hide)")}</a></h3>
<div class="prompt-container"> <div class="prompt-container">
</div> </div>
</div> </div>
...@@ -56,14 +57,14 @@ ...@@ -56,14 +57,14 @@
</section> </section>
<div class="action-button"> <div class="action-button">
<input type=button value="Submit" class="action-button" name="show" /> <input type=button value="${_("Submit")}" class="action-button" name="show" />
</div> </div>
<section class="grading-wrapper"> <section class="grading-wrapper">
<div class="grading-container"> <div class="grading-container">
<div class="submission-wrapper"> <div class="submission-wrapper">
<h3>Student Response</h3> <h3>${_("Student Response")}</h3>
<div class="submission-container"> <div class="submission-container">
</div> </div>
</div> </div>
...@@ -72,18 +73,18 @@ ...@@ -72,18 +73,18 @@
</p> </p>
<p class="grade-selection-container"> <p class="grade-selection-container">
</p> </p>
<h3>Written Feedback</h3> <h3>${_("Written Feedback")}</h3>
<textarea name="feedback" placeholder="Feedback for student (optional)" <textarea name="feedback" placeholder="${_("Feedback for student (optional)")}"
class="feedback-area" cols="70" ></textarea> class="feedback-area" cols="70" ></textarea>
<p> <p>
Flag as inappropriate content for later review <input class="flag-checkbox" type="checkbox" /> ${_("Flag as inappropriate content for later review")} <input class="flag-checkbox" type="checkbox" />
</p> </p>
</div> </div>
<div class="submission"> <div class="submission">
<input type="button" value="Submit" class="submit-button" name="show"/> <input type="button" value="${_("Submit")}" class="submit-button" name="show"/>
<input type="button" value="Skip" class="skip-button" name="skip"/> <input type="button" value="${_("Skip")}" class="skip-button" name="skip"/>
</div> </div>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" /> <%inherit file="main.html" />
<section class="container activation"> <section class="container activation">
<section class="message"> <section class="message">
<h1 class="invalid">Invalid email change key</h1> <h1 class="invalid">${_("Invalid email change key")}</h1>
<hr class="horizontal-divider"> <hr class="horizontal-divider">
<p> This e-mail key is not valid. Please check:</p> <p> ${_("This e-mail key is not valid. Please check:")}</p>
<ul> <ul>
<li>Was this key already used? Check whether the e-mail change has already happened. <li>${_("Was this key already used? Check whether the e-mail change has already happened.")}
<li>Did your e-mail client break the URL into two lines? <li>${_("Did your e-mail client break the URL into two lines?")}
<li>The keys are valid for a limited amount of time. Has the key expired? <li>${_("The keys are valid for a limited amount of time. Has the key expired?")}
</ul> </ul>
<p>Go back to the <a href="/">home page</a>.</p> <p>${_('Go back to the {link_start}home page{link_end}.').format(link_start='<a href="/">', link_end='</a>')}</p>
</section> </section>
</section> </section>
<%! from django.utils.translation import ugettext as _ %>
<dl> <dl>
% for license in licenses: % for license in licenses:
<dt> ${license.software.name}: </dt> <dt> ${license.software.name}: </dt>
% if license.serial: % if license.serial:
<dd> ${license.serial} </dd> <dd> ${license.serial} </dd>
% else: % else:
<dd> None Available </dd> <dd> ${_("None Available")} </dd>
% endif % endif
% endfor % endfor
</dl> </dl>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" /> <%inherit file="main.html" />
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
...@@ -5,7 +7,7 @@ ...@@ -5,7 +7,7 @@
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%block name="title"><title>Log into your ${settings.PLATFORM_NAME} Account</title></%block> <%block name="title"><title>${_("Log into your {platform_name} Account").format(platform_name=settings.PLATFORM_NAME)}</title></%block>
<%block name="js_extra"> <%block name="js_extra">
<script type="text/javascript"> <script type="text/javascript">
...@@ -66,13 +68,13 @@ ...@@ -66,13 +68,13 @@
$submitButton. $submitButton.
removeClass('is-disabled'). removeClass('is-disabled').
removeProp('disabled'). removeProp('disabled').
html('Log into My ${settings.PLATFORM_NAME} Account <span class="orn-plus">+</span> Access My Courses'); html("${_('Log into My {platform_name} Account').format(platform_name=settings.PLATFORM_NAME)} <span class='orn-plus'>+</span> ${_('Access My Courses')}");
} }
else { else {
$submitButton. $submitButton.
addClass('is-disabled'). addClass('is-disabled').
prop('disabled', true). prop('disabled', true).
html('Processing your account information &hellip;'); html(gettext('Processing your account information &hellip;'));
} }
} }
</script> </script>
...@@ -90,46 +92,46 @@ ...@@ -90,46 +92,46 @@
<!-- status messages --> <!-- status messages -->
<div role="alert" class="status message"> <div role="alert" class="status message">
<h3 class="message-title">We're Sorry, ${settings.PLATFORM_NAME} accounts are unavailable currently</h3> <h3 class="message-title">${_("We're Sorry, {platform_name} accounts are unavailable currently").format(platform_name=settings.PLATFORM_NAME)}</h3>
<p class="message-copy">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> <p class="message-copy">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
</div> </div>
<div role="alert" class="status message submission-error" tabindex="-1"> <div role="alert" class="status message submission-error" tabindex="-1">
<h3 class="message-title">The following errors occurred while logging you in: </h3> <h3 class="message-title">${_("The following errors occured while logging you in:")} </h3>
<ul class="message-copy"> <ul class="message-copy">
<li>Your email or password is incorrect</li> <li>${_("Your email or password is incorrect")}</li>
</ul> </ul>
</div> </div>
<p class="instructions sr"> <p class="instructions sr">
Please provide the following information to log into your ${settings.PLATFORM_NAME} account. Required fields are noted by <strong class="indicator">bold text and an asterisk (*)</strong>. ${_('Please provide the following information to log into your {platform_name} account. Required fields are noted by <strong class="indicator">bold text and an asterisk (*)</strong>.').format(platform_name=settings.PLATFORM_NAME)}
</p> </p>
<fieldset class="group group-form group-form-requiredinformation"> <fieldset class="group group-form group-form-requiredinformation">
<legend class="sr">Required Information</legend> <legend class="sr">${_('Required Information')}</legend>
<ol class="list-input"> <ol class="list-input">
<li class="field required text" id="field-email"> <li class="field required text" id="field-email">
<label for="email">E-mail</label> <label for="email">${_('E-mail')}</label>
<input class="" id="email" type="email" name="email" value="" placeholder="example: username@domain.com" required aria-required="true" /> <input class="" id="email" type="email" name="email" value="" placeholder="example: username@domain.com" required aria-required="true" />
</li> </li>
<li class="field required password" id="field-password"> <li class="field required password" id="field-password">
<label for="password">Password</label> <label for="password">${_('Password')}</label>
<input id="password" type="password" name="password" value="" required aria-required="true" /> <input id="password" type="password" name="password" value="" required aria-required="true" />
<span class="tip tip-input"> <span class="tip tip-input">
<a href="#forgot-password-modal" rel="leanModal" class="pwd-reset action action-forgotpw">Forgot password?</a> <a href="#forgot-password-modal" rel="leanModal" class="pwd-reset action action-forgotpw">${_('Forgot password?')}</a>
</span> </span>
</li> </li>
</ol> </ol>
</fieldset> </fieldset>
<fieldset class="group group-form group-form-secondary group-form-accountpreferences"> <fieldset class="group group-form group-form-secondary group-form-accountpreferences">
<legend class="sr">Account Preferences</legend> <legend class="sr">${_('Account Preferences')}</legend>
<ol class="list-input"> <ol class="list-input">
<li class="field required checkbox" id="field-remember"> <li class="field required checkbox" id="field-remember">
<input id="remember-yes" type="checkbox" name="remember" value="true" /> <input id="remember-yes" type="checkbox" name="remember" value="true" />
<label for="remember-yes">Remember me</label> <label for="remember-yes">${_('Remember me')}</label>
</li> </li>
</ol> </ol>
</fieldset> </fieldset>
...@@ -147,27 +149,27 @@ ...@@ -147,27 +149,27 @@
<aside role="complementary"> <aside role="complementary">
<header> <header>
<h2 class="sr">Helpful Information</h2> <h2 class="sr">${_("Helpful Information")}</h2>
</header> </header>
% if settings.MITX_FEATURES.get('AUTH_USE_OPENID'): % if settings.MITX_FEATURES.get('AUTH_USE_OPENID'):
<!-- <div class="cta cta-login-options-openid"> <!-- <div class="cta cta-login-options-openid">
<h3>Login via OpenID</h3> <h3>${_("Login via OpenID")}</h3>
<p>You can now start learning with edX by logging in with your <a rel="external" href="http://openid.net/">OpenID account</a>.</p> <p>${_('You can now start learning with edX by logging in with your <a rel="external" href="http://openid.net/">OpenID account</a>.')}</p>
<a class="action action-login-openid" href="#">Login via OpenID</a> <a class="action action-login-openid" href="#">${_("Login via OpenID")}</a>
</div> --> </div> -->
% endif % endif
<div class="cta cta-help"> <div class="cta cta-help">
<h3>Not Enrolled?</h3> <h3>${_("Not Enrolled?")}</h3>
<p><a href="${reverse('register_user')}">Sign up for ${settings.PLATFORM_NAME} today!</a></p> <p><a href="${reverse('register_user')}">${_("Sign up for {platform_name} today!").format(platform_name=settings.PLATFORM_NAME)}</a></p>
## Disable help unless the FAQ marketing link is enabled ## Disable help unless the FAQ marketing link is enabled
% if settings.MKTG_URL_LINK_MAP.get('FAQ'): % if settings.MKTG_URL_LINK_MAP.get('FAQ'):
<h3>Need Help?</h3> <h3>${_("Need Help?")}</h3>
<p>Looking for help in logging in or with your ${settings.PLATFORM_NAME} account? <p>${_("Looking for help in logging in or with your {platform_name} account?").format(platform_name=settings.PLATFORM_NAME)}
<a href="${marketing_link('FAQ')}"> <a href="${marketing_link('FAQ')}">
View our help section for answers to commonly asked questions. ${_("View our help section for answers to commonly asked questions.")}
</a></p> </a></p>
% endif % endif
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<section id="login-modal" class="modal login-modal"> <section id="login-modal" class="modal login-modal">
<div class="inner-wrapper"> <div class="inner-wrapper">
<header> <header>
<h2>Log In</h2> <h2>${_("Log In")}</h2>
<hr> <hr>
</header> </header>
<form id="login_form" class="login_form" method="post" data-remote="true" action="/login"> <form id="login_form" class="login_form" method="post" data-remote="true" action="/login">
<label for="login_email">E-mail</label> <label for="login_email">${_("E-mail")}</label>
<input id="login_email" type="email" name="email" placeholder="e.g. yourname@domain.com" /> <input id="login_email" type="email" name="email" placeholder="e.g. yourname@domain.com" />
<label for="login_password">Password</label> <label for="login_password">${_("Password")}</label>
<input id="login_password" type="password" name="password" placeholder="&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;" /> <input id="login_password" type="password" name="password" placeholder="&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;" />
<label for="login_remember_me" class="remember-me"> <label for="login_remember_me" class="remember-me">
<input id="login_remember_me" type="checkbox" name="remember" value="true" /> <input id="login_remember_me" type="checkbox" name="remember" value="true" />
Remember me ${_("Remember me")}
</label> </label>
<div class="submit"> <div class="submit">
<input name="submit" type="submit" value="Access My Courses"> <input name="submit" type="submit" value="${_('Access My Courses')}">
</div> </div>
</form> </form>
<section class="login-extra"> <section class="login-extra">
<p> <p>
<span>Not enrolled? <a href="#signup-modal" class="close-login" rel="leanModal">Sign up.</a></span> <span>${_('Not enrolled?')} <a href="#signup-modal" class="close-login" rel="leanModal">${_('Sign up.')}</a></span>
<a href="#forgot-password-modal" rel="leanModal" class="pwd-reset">Forgot password?</a> <a href="#forgot-password-modal" rel="leanModal" class="pwd-reset">${_('Forgot password?')}</a>
</p> </p>
% if settings.MITX_FEATURES.get('AUTH_USE_OPENID'): % if settings.MITX_FEATURES.get('AUTH_USE_OPENID'):
<p> <p>
<a href="${MITX_ROOT_URL}/openid/login/">login via openid</a> <a href="${MITX_ROOT_URL}/openid/login/">${_('login via openid')}</a>
</p> </p>
% endif % endif
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%! from django.utils import html %> <%! from django.utils import html %>
...@@ -18,10 +20,11 @@ ...@@ -18,10 +20,11 @@
<head> <head>
<%block name="title"> <%block name="title">
% if stanford_theme_enabled(): % if stanford_theme_enabled():
<title>Home | class.stanford.edu</title> <title>${_("Home")} | class.stanford.edu</title>
% else: % else:
## "edX" should not be translated
<title>edX</title> <title>edX</title>
<script type="text/javascript"> <script type="text/javascript">
/* immediately break out of an iframe if coming from the marketing website */ /* immediately break out of an iframe if coming from the marketing website */
(function(window) { (function(window) {
...@@ -33,6 +36,8 @@ ...@@ -33,6 +36,8 @@
% endif % endif
</%block> </%block>
<script type="text/javascript" src="/jsi18n/"></script>
<link rel="icon" type="image/x-icon" href="${static.url(settings.FAVICON_PATH)}" /> <link rel="icon" type="image/x-icon" href="${static.url(settings.FAVICON_PATH)}" />
<%static:css group='application'/> <%static:css group='application'/>
......
...@@ -2,18 +2,19 @@ ...@@ -2,18 +2,19 @@
{% load compressed %}{% load sekizai_tags i18n %}{% load url from future %}{% load staticfiles %} {% load compressed %}{% load sekizai_tags i18n %}{% load url from future %}{% load staticfiles %}
<html> <html>
<head> <head>
{# "edX" should *not* be translated #}
{% block title %}<title>edX</title>{% endblock %} {% block title %}<title>edX</title>{% endblock %}
<link rel="icon" type="image/x-icon" href="{% static "images/favicon.ico" %}" /> <link rel="icon" type="image/x-icon" href="{% static "images/favicon.ico" %}" />
{% compressed_css 'application' %} {% compressed_css 'application' %}
{% block main_vendor_js %} {% block main_vendor_js %}
{% compressed_js 'main_vendor' %} {% compressed_js 'main_vendor' %}
{% endblock %} {% endblock %}
{% block headextra %}{% endblock %} {% block headextra %}{% endblock %}
{% render_block "css" %} {% render_block "css" %}
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="${static.url('js/html5shiv.js')}"></script> <script src="${static.url('js/html5shiv.js')}"></script>
<![endif]--> <![endif]-->
...@@ -30,12 +31,12 @@ ...@@ -30,12 +31,12 @@
{% block body %}{% endblock %} {% block body %}{% endblock %}
{% block bodyextra %}{% endblock %} {% block bodyextra %}{% endblock %}
</section> </section>
{% include "footer.html" %} {% include "footer.html" %}
{% compressed_js 'application' %} {% compressed_js 'application' %}
{% compressed_js 'module-js' %} {% compressed_js 'module-js' %}
{% render_block "js" %} {% render_block "js" %}
</body> </body>
</html> </html>
...@@ -45,8 +46,8 @@ ...@@ -45,8 +46,8 @@
other pages inherit. This file should be rewritten to reflect any other pages inherit. This file should be rewritten to reflect any
changes in main.html! Files used by {% include %} can be written changes in main.html! Files used by {% include %} can be written
as mako templates. as mako templates.
Inheriting from this file allows us to include apps that use the Inheriting from this file allows us to include apps that use the
django templating system without rewriting all of their views in django templating system without rewriting all of their views in
mako. mako.
{% endcomment %} {% endcomment %}
<%! from django.utils.translation import ugettext as _ %>
<section class="outside-app"> <section class="outside-app">
<h1>There has been an error on the <em>edX</em> servers</h1> <h1>${_("There has been an error on the <em>edX</em> servers")}</h1>
<p>We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible. Please email us at <a href="mailto:technical@edx.org">technical@edx.org</a> to report any problems or downtime.</p> <p>${_("We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible. Please email us at {email} to report any problems or downtime.").format(email='<a href="mailto:technical@edx.org">technical@edx.org</a>')}</p>
% if staff_access: % if staff_access:
<h1>Details</h1> <h1>${_("Details")}</h1>
<p>Error: <p>${_("Error:")}
<pre> <pre>
${error | h} ${error | h}
</pre> </pre>
</p> </p>
<p>Raw data: <p>${_("Raw data:")}
<pre>${data | h}</pre> <pre>${data | h}</pre>
</p> </p>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" /> <%inherit file="main.html" />
<script> <script>
function name_confirm(id) { function name_confirm(id) {
postJSON('/accept_name_change',{"id":id}, postJSON('/accept_name_change',{"id":id},
function(data){ function(data){
if(data.success){ if(data.success){
$("#div"+id).html("Accepted"); $("#div"+id).html(gettext("Accepted"));
} else { } else {
alert('Error'); alert(gettext('Error'));
} }
}); });
} }
...@@ -15,9 +17,9 @@ function name_deny(id) { ...@@ -15,9 +17,9 @@ function name_deny(id) {
postJSON('/reject_name_change',{"id":id}, postJSON('/reject_name_change',{"id":id},
function(data){ function(data){
if(data.success){ if(data.success){
$("#div"+id).html("Rejected"); $("#div"+id).html(gettext("Rejected"));
} else { } else {
alert('Error'); alert(gettext('Error'));
} }
}); });
} }
...@@ -26,7 +28,7 @@ function name_deny(id) { ...@@ -26,7 +28,7 @@ function name_deny(id) {
<section class="container"> <section class="container">
<div class="gradebook-wrapper"> <div class="gradebook-wrapper">
<section class="gradebook-content"> <section class="gradebook-content">
<h1>Pending name changes</h1> <h1>${_("Pending name changes")}</h1>
<table> <table>
% for s in students: % for s in students:
<tr> <tr>
...@@ -34,8 +36,8 @@ function name_deny(id) { ...@@ -34,8 +36,8 @@ function name_deny(id) {
<td>${s['new_name']|h}</td> <td>${s['new_name']|h}</td>
<td>${s['email']|h}</td> <td>${s['email']|h}</td>
<td>${s['rationale']|h}</td> <td>${s['rationale']|h}</td>
<td><span id="div${s['cid']}"><span onclick="name_confirm(${s['cid']});">[Confirm]</span> <td><span id="div${s['cid']}"><span onclick="name_confirm(${s['cid']});">${_("[Confirm]")}</span>
<span onclick="name_deny(${s['cid']});">[Reject]</span></span></td></tr> <span onclick="name_deny(${s['cid']});">${_("[Reject]")}</span></span></td></tr>
% endfor % endfor
</table> </table>
</section> </section>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<%namespace file='main.html' import="login_query, stanford_theme_enabled"/> <%namespace file='main.html' import="login_query, stanford_theme_enabled"/>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
# App that handles subdomain specific branding # App that handles subdomain specific branding
import branding import branding
...@@ -34,16 +35,16 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -34,16 +35,16 @@ site_status_msg = get_site_status_msg(course_id)
% if course: % if course:
<header class="global slim" aria-label="Global Navigation"> <header class="global slim" aria-label="${_('Global Navigation')}">
% else: % else:
<header class="global" aria-label="Global Navigation"> <header class="global" aria-label="${_('Global Navigation')}">
% endif % endif
<nav> <nav>
<h1 class="logo"> <h1 class="logo">
<a href="${marketing_link('ROOT')}"> <a href="${marketing_link('ROOT')}">
<%block name="navigation_logo"> <%block name="navigation_logo">
<img src="${static.url(branding.get_logo_url(request.META.get('HTTP_HOST')))}" alt="edX home" /> <img src="${static.url(branding.get_logo_url(request.META.get('HTTP_HOST')))}" alt="${_('edX home')}" />
</%block> </%block>
</a> </a>
</h1> </h1>
...@@ -57,7 +58,7 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -57,7 +58,7 @@ site_status_msg = get_site_status_msg(course_id)
<ol class="left nav-global authenticated"> <ol class="left nav-global authenticated">
<%block name="navigation_global_links_authenticated"> <%block name="navigation_global_links_authenticated">
<li class="nav-global-01"> <li class="nav-global-01">
<a href="${marketing_link('COURSES')}">Find Courses</a> <a href="${marketing_link('COURSES')}">${_('Find Courses')}</a>
</li> </li>
</%block> </%block>
</ol> </ol>
...@@ -65,16 +66,16 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -65,16 +66,16 @@ site_status_msg = get_site_status_msg(course_id)
<li class="primary"> <li class="primary">
<a href="${reverse('dashboard')}" class="user-link"> <a href="${reverse('dashboard')}" class="user-link">
<span class="avatar"></span> <span class="avatar"></span>
<span class="sr">Dashboard for: </span> ${user.username} <span class="sr">${_("Dashboard for:")} </span> ${user.username}
</a> </a>
</li> </li>
<li class="primary"> <li class="primary">
<a href="#" class="dropdown"><span class="sr">More options dropdown</span> &#9662</a> <a href="#" class="dropdown"><span class="sr">${_("More options dropdown")}</span> &#9662</a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<%block name="navigation_dropdown_menu_links" > <%block name="navigation_dropdown_menu_links" >
<li><a href="${marketing_link('FAQ')}">Help</a></li> <li><a href="${marketing_link('FAQ')}">${_("Help")}</a></li>
</%block> </%block>
<li><a href="${reverse('logout')}">Log Out</a></li> <li><a href="${reverse('logout')}">${_("Log Out")}</a></li>
</ul> </ul>
</li> </li>
</ol> </ol>
...@@ -84,24 +85,24 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -84,24 +85,24 @@ site_status_msg = get_site_status_msg(course_id)
<%block name="navigation_global_links"> <%block name="navigation_global_links">
% if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'): % if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'):
<li class="nav-global-01"> <li class="nav-global-01">
<a href="${marketing_link('HOW_IT_WORKS')}">How it Works</a> <a href="${marketing_link('HOW_IT_WORKS')}">${_("How it Works")}</a>
</li> </li>
<li class="nav-global-02"> <li class="nav-global-02">
<a href="${marketing_link('COURSES')}">Courses</a> <a href="${marketing_link('COURSES')}">${_("Courses")}</a>
</li> </li>
<li class="nav-global-03"> <li class="nav-global-03">
<a href="${marketing_link('SCHOOLS')}">Schools</a> <a href="${marketing_link('SCHOOLS')}">${_("Schools")}</a>
</li> </li>
% endif % endif
</%block> </%block>
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']: % if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
% if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain: % if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
<li class="nav-global-04"> <li class="nav-global-04">
<a class="cta cta-register" href="${reverse('course-specific-register', args=[course.id])}">Register Now</a> <a class="cta cta-register" href="${reverse('course-specific-register', args=[course.id])}">${_("Register Now")}</a>
</li> </li>
% else: % else:
<li class="nav-global-04"> <li class="nav-global-04">
<a class="cta cta-register" href="/register">Register Now</a> <a class="cta cta-register" href="/register">${_("Register Now")}</a>
</li> </li>
% endif % endif
% endif % endif
...@@ -111,9 +112,9 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -111,9 +112,9 @@ site_status_msg = get_site_status_msg(course_id)
<li class="nav-courseware-01"> <li class="nav-courseware-01">
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']: % if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
% if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain: % if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
<a class="cta cta-login" href="${reverse('course-specific-login', args=[course.id])}${login_query()}">Log in</a> <a class="cta cta-login" href="${reverse('course-specific-login', args=[course.id])}${login_query()}">${_("Log in")}</a>
% else: % else:
<a class="cta cta-login" href="/login${login_query()}">Log in</a> <a class="cta cta-login" href="/login${login_query()}">${_("Log in")}</a>
% endif % endif
% endif % endif
</li> </li>
...@@ -122,7 +123,7 @@ site_status_msg = get_site_status_msg(course_id) ...@@ -122,7 +123,7 @@ site_status_msg = get_site_status_msg(course_id)
</nav> </nav>
</header> </header>
% if course: % if course:
<div class="ie-banner"><strong>Warning:</strong> Your browser is not fully supported. We strongly recommend using <a href="https://www.google.com/intl/en/chrome/browser/" target="_blank">Chrome</a> or <a href="http://www.mozilla.org/en-US/firefox/new/" target="_blank">Firefox</a>.</div> <div class="ie-banner">${_('<strong>Warning:</strong> Your browser is not fully supported. We strongly recommend using {chrome_link_start}Chrome{chrome_link_end} or {ff_link_start}Firefox{ff_link_end}.').format(chrome_link_start='<a href="https://www.google.com/intl/en/chrome/browser/" target="_blank">', chrome_link_end='</a>', ff_link_start='<a href="http://www.mozilla.org/en-US/firefox/new/" target="_blank">', ff_link_end='</a>')}</div>
% endif % endif
%if not user.is_authenticated(): %if not user.is_authenticated():
......
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%inherit file="main.html" /> <%inherit file="main.html" />
<%! <%!
...@@ -55,27 +57,24 @@ ...@@ -55,27 +57,24 @@
<section class="container"> <section class="container">
<div class="notes-wrapper"> <div class="notes-wrapper">
<h1>My Notes</h1> <h1>${_("My Notes")}</h1>
% for note in notes: % for note in notes:
<div class="note"> <div class="note">
<blockquote>${note.quote|h}</blockquote> <blockquote>${note.quote|h}</blockquote>
<div class="text">${note.text.replace("\n", "<br />") | n,h}</div> <div class="text">${note.text.replace("\n", "<br />") | n,h}</div>
<ul class="meta"> <ul class="meta">
% if note.tags: % if note.tags:
<li class="tags">Tags: ${note.tags|h}</li> <li class="tags">${_("Tags: {tags}").format(tags=note.tags) | h}</li>
% endif % endif
<li class="user">Author: ${note.user.username}</li> <li class="user">${_('Author: {username}').format(username=note.user.username)}</li>
<li class="time">Created: ${note.created.strftime('%m/%d/%Y %H:%m')}</li> <li class="time">${_('Created: {datetime}').format(datetime=note.created.strftime('%m/%d/%Y %H:%m'))}</li>
<li class="uri">Source: <a href="${note.uri}">${note.uri|h}</a></li> <li class="uri">${_('Source: {link}').format(link='<a href="{url}">{url}</a>'.format(url=note.uri))}</li>
</ul> </ul>
</div> </div>
% endfor % endfor
% if notes is UNDEFINED or len(notes) == 0: % if notes is UNDEFINED or len(notes) == 0:
<p>You do not have any notes.</p> <p>${_('You do not have any notes.')}</p>
% endif % endif
</div> </div>
</section> </section>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block> <%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
...@@ -6,7 +7,7 @@ ...@@ -6,7 +7,7 @@
<%static:css group='course'/> <%static:css group='course'/>
</%block> </%block>
<%block name="title"><title>${course.number} Combined Notifications</title></%block> <%block name="title"><title>${_("{course_number} Combined Notifications").format(course_number=course.number)}</title></%block>
<%include file="/courseware/course_navigation.html" args="active_page='open_ended'" /> <%include file="/courseware/course_navigation.html" args="active_page='open_ended'" />
...@@ -14,13 +15,13 @@ ...@@ -14,13 +15,13 @@
<section class="container"> <section class="container">
<div class="combined-notifications" data-ajax_url="${ajax_url}"> <div class="combined-notifications" data-ajax_url="${ajax_url}">
<div class="error-container">${error_text}</div> <div class="error-container">${error_text}</div>
<h1>Open Ended Console</h1> <h1>${_("Open Ended Console")}</h1>
<h2>Instructions</h2> <h2>${_("Instructions")}</h2>
<p>Here are items that could potentially need your attention.</p> <p>${_("Here are items that could potentially need your attention.")}</p>
% if success: % if success:
% if len(notification_list) == 0: % if len(notification_list) == 0:
<div class="message-container"> <div class="message-container">
No items require attention at the moment. ${_("No items require attention at the moment.")}
</div> </div>
%else: %else:
<div class="notification-container"> <div class="notification-container">
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block> <%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
...@@ -6,7 +7,7 @@ ...@@ -6,7 +7,7 @@
<%static:css group='course'/> <%static:css group='course'/>
</%block> </%block>
<%block name="title"><title>${course.number} Flagged Open Ended Problems</title></%block> <%block name="title"><title>${_("{course_number} Flagged Open Ended Problems").format(course_number=course.number)}</title></%block>
<%include file="/courseware/course_navigation.html" args="active_page='open_ended_flagged_problems'" /> <%include file="/courseware/course_navigation.html" args="active_page='open_ended_flagged_problems'" />
...@@ -17,19 +18,19 @@ ...@@ -17,19 +18,19 @@
<section class="container"> <section class="container">
<div class="open-ended-problems" data-ajax_url="${ajax_url}"> <div class="open-ended-problems" data-ajax_url="${ajax_url}">
<div class="error-container">${error_text}</div> <div class="error-container">${error_text}</div>
<h1>Flagged Open Ended Problems</h1> <h1>${_("Flagged Open Ended Problems")}</h1>
<h2>Instructions</h2> <h2>${_("Instructions")}</h2>
<p>Here are a list of open ended problems for this course that have been flagged by students as potentially inappropriate.</p> <p>${_("Here are a list of open ended problems for this course that have been flagged by students as potentially inappropriate.")}</p>
% if success: % if success:
% if len(problem_list) == 0: % if len(problem_list) == 0:
<div class="message-container"> <div class="message-container">
No flagged problems exist. ${_("No flagged problems exist.")}
</div> </div>
%else: %else:
<table class="problem-list"> <table class="problem-list">
<tr> <tr>
<th>Name</th> <th>${_("Name")}</th>
<th>Response</th> <th>${_("Response")}</th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
...@@ -42,10 +43,10 @@ ...@@ -42,10 +43,10 @@
${problem['student_response']} ${problem['student_response']}
</td> </td>
<td> <td>
<a href="#unflag" class="unflag-button action-button" data-action-type="unflag">Unflag</a> <a href="#unflag" class="unflag-button action-button" data-action-type="unflag">${_("Unflag")}</a>
</td> </td>
<td> <td>
<a href="#ban" class="ban-button action-button" data-action-type="ban">Ban</a> <a href="#ban" class="ban-button action-button" data-action-type="ban">${_("Ban")}</a>
</td> </td>
<td> <td>
<div class="action-taken"></div> <div class="action-taken"></div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" /> <%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block> <%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/> <%namespace name='static' file='/static_content.html'/>
...@@ -6,7 +7,7 @@ ...@@ -6,7 +7,7 @@
<%static:css group='course'/> <%static:css group='course'/>
</%block> </%block>
<%block name="title"><title>${course.number} Open Ended Problems</title></%block> <%block name="title"><title>${_("{course_number} Open Ended Problems").format(course_number=course.number)}</title></%block>
<%include file="/courseware/course_navigation.html" args="active_page='open_ended_problems'" /> <%include file="/courseware/course_navigation.html" args="active_page='open_ended_problems'" />
...@@ -14,31 +15,31 @@ ...@@ -14,31 +15,31 @@
<section class="container"> <section class="container">
<div class="open-ended-problems" data-ajax_url="${ajax_url}"> <div class="open-ended-problems" data-ajax_url="${ajax_url}">
<div class="error-container">${error_text}</div> <div class="error-container">${error_text}</div>
<h1>Open Ended Problems</h1> <h1>${_("Open Ended Problems")}</h1>
<h2>Instructions</h2> <h2>${_("Instructions")}</h2>
<p>Here are a list of open ended problems for this course.</p> <p>${_("Here are a list of open ended problems for this course.")}</p>
% if success: % if success:
% if len(problem_list) == 0: % if len(problem_list) == 0:
<div class="message-container"> <div class="message-container">
You have not attempted any open ended problems yet. ${_("You have not attempted any open ended problems yet.")}
</div> </div>
%else: %else:
<table class="problem-list"> <table class="problem-list">
<tr> <tr>
<th>Problem Name</th> <th>${_("Problem Name")}</th>
<th>Status</th> <th>${_("Status")}</th>
<th>Grader Type</th> <th>${_("Grader Type")}</th>
<th>ETA</th> <th>${_("ETA")}</th>
</tr> </tr>
%for problem in problem_list: %for problem in problem_list:
<tr> <tr>
<td> <td>
<a href="${problem['actual_url']}">${problem['problem_name']}</a> <a href="${problem['actual_url']}">${problem['problem_name']}</a>
</td> </td>
<td> <td>
${problem['state']} ${problem['state']}
</td> </td>
<td> <td>
${problem['grader_type']} ${problem['grader_type']}
</td> </td>
<td> <td>
......
<%! from django.utils.translation import ugettext as _ %>
<section class="container peer-grading-container"> <section class="container peer-grading-container">
<div class="peer-grading" data-ajax-url="${ajax_url}" data-use-single-location="${use_single_location}"> <div class="peer-grading" data-ajax-url="${ajax_url}" data-use-single-location="${use_single_location}">
<div class="error-container">${error_text}</div> <div class="error-container">${error_text}</div>
<h1>Peer Grading</h1> <h1>${_("Peer Grading")}</h1>
<h2>Instructions</h2> <h2>${_("Instructions")}</h2>
<p>Here are a list of problems that need to be peer graded for this course.</p> <p>${_("Here are a list of problems that need to be peer graded for this course.")}</p>
% if success: % if success:
% if len(problem_list) == 0: % if len(problem_list) == 0:
<div class="message-container"> <div class="message-container">
Nothing to grade! ${_("Nothing to grade!")}
</div> </div>
%else: %else:
<div class="problem-list-container"> <div class="problem-list-container">
<table class="problem-list"> <table class="problem-list">
<tr> <tr>
<th>Problem Name</th> <th>${_("Problem Name")}</th>
<th>Due date</th> <th>${_("Due date")}</th>
<th>Graded</th> <th>${_("Graded")}</th>
<th>Available</th> <th>${_("Available")}</th>
<th>Required</th> <th>${_("Required")}</th>
<th>Progress</th> <th>${_("Progress")}</th>
</tr> </tr>
%for problem in problem_list: %for problem in problem_list:
<tr data-graded="${problem['num_graded']}" data-required="${problem['num_required']}"> <tr data-graded="${problem['num_graded']}" data-required="${problem['num_required']}">
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
% if problem['due']: % if problem['due']:
${problem['due']} ${problem['due']}
% else: % else:
No due date ${_("No due date")}
% endif % endif
</td> </td>
<td> <td>
......
<%! from django.utils.translation import ugettext as _ %>
<section class="container peer-grading-container"> <section class="container peer-grading-container">
<h2>Peer Grading</h2> <h2>${_("Peer Grading")}</h2>
<p>The due date has passed, and
% if use_for_single_location: % if use_for_single_location:
peer grading for this problem is closed at this time. <p>${_("The due date has passed, and peer grading for this problem is closed at this time.")} </p>
%else: %else:
peer grading is closed at this time. <p>${_("The due date has passed, and peer grading is closed at this time.")} </p>
%endif %endif
</p>
</section> </section>
<%! from django.utils.translation import ugettext as _ %>
<section class="container peer-grading-container"> <section class="container peer-grading-container">
<div class="peer-grading" data-ajax-url="${ajax_url}" data-location="${problem_location}" data-use-single-location="${use_single_location}"> <div class="peer-grading" data-ajax-url="${ajax_url}" data-location="${problem_location}" data-use-single-location="${use_single_location}">
<div class="error-container"></div> <div class="error-container"></div>
...@@ -5,15 +6,15 @@ ...@@ -5,15 +6,15 @@
<section class="content-panel"> <section class="content-panel">
<div class="instructions-panel"> <div class="instructions-panel">
<div class="calibration-panel"> <div class="calibration-panel">
<h3>Learning to Grade</h3> <h3>${_("Learning to Grade")}</h3>
</div> </div>
<div class="grading-panel"> <div class="grading-panel">
<h3>Peer Grading</h3> <h3>${_("Peer Grading")}</h3>
</div> </div>
</div> </div>
<div class="prompt-wrapper"> <div class="prompt-wrapper">
<h2>Prompt <a href="#" class="question-header">(Hide)</a> </h2> <h2>${_('Prompt')} <a href="#" class="question-header">${_('(Hide)')}</a></h2>
<div class="prompt-information-container"> <div class="prompt-information-container">
<section> <section>
<div class="prompt-container"> <div class="prompt-container">
...@@ -25,7 +26,7 @@ ...@@ -25,7 +26,7 @@
<section class="grading-wrapper"> <section class="grading-wrapper">
<h2>Student Response</h2> <h2>${_("Student Response")}</h2>
<div class="grading-container"> <div class="grading-container">
<div class="submission-wrapper"> <div class="submission-wrapper">
...@@ -39,17 +40,17 @@ ...@@ -39,17 +40,17 @@
<p class="rubric-selection-container"></p> <p class="rubric-selection-container"></p>
<p class="score-selection-container"> <p class="score-selection-container">
</p> </p>
<h3>Written Feedback</h3> <h3>${_("Written Feedback")}</h3>
<p>Please include some written feedback as well.</p> <p>${_("Please include some written feedback as well.")}</p>
<textarea name="feedback" placeholder="Feedback for student" <textarea name="feedback" placeholder="Feedback for student"
class="feedback-area" cols="70" ></textarea> class="feedback-area" cols="70" ></textarea>
<div class="flag-student-container"> This submission has explicit or pornographic content : <input type="checkbox" class="flag-checkbox" value="student_is_flagged"> </div> <div class="flag-student-container"> ${_("This submission has explicit or pornographic content : ")}<input type="checkbox" class="flag-checkbox" value="student_is_flagged"> </div>
<div class="answer-unknown-container"> I do not know how to grade this question : <input type="checkbox" class="answer-unknown-checkbox" value="answer_is_unknown"></div> <div class="answer-unknown-container"> ${_("I do not know how to grade this question : ")}<input type="checkbox" class="answer-unknown-checkbox" value="answer_is_unknown"></div>
</div> </div>
<div class="submission"> <div class="submission">
<input type="button" value="Submit" class="submit-button" name="show"/> <input type="button" value="${_("Submit")}" class="submit-button" name="show"/>
</div> </div>
</div> </div>
...@@ -60,41 +61,41 @@ ...@@ -60,41 +61,41 @@
</section> </section>
<!-- Calibration feedback: Shown after a calibration is sent --> <!-- Calibration feedback: Shown after a calibration is sent -->
<section class="calibration-feedback"> <section class="calibration-feedback">
<h2>How did I do?</h2> <h2>${_("How did I do?")}</h2>
<div class="calibration-feedback-wrapper"> <div class="calibration-feedback-wrapper">
</div> </div>
<input type="button" class="calibration-feedback-button" value="Continue" name="calibration-feedback-button" /> <input type="button" class="calibration-feedback-button" value="${_("Continue")}" name="calibration-feedback-button" />
</section> </section>
<!-- Interstitial Page: Shown between calibration and grading steps --> <!-- Interstitial Page: Shown between calibration and grading steps -->
<section class="interstitial-page"> <section class="interstitial-page">
<h1>Ready to grade!</h1> <h1>${_("Ready to grade!")}</h1>
<p> You have finished learning to grade, which means that you are now ready to start grading.</p> <p>${_(" You have finished learning to grade, which means that you are now ready to start grading.")}</p>
<input type="button" class="interstitial-page-button" value="Start Grading!" name="interstitial-page-button" /> <input type="button" class="interstitial-page-button" value="${_("Start Grading!")}" name="interstitial-page-button" />
</section> </section>
<!-- Calibration Interstitial Page: Shown before calibration --> <!-- Calibration Interstitial Page: Shown before calibration -->
<section class="calibration-interstitial-page"> <section class="calibration-interstitial-page">
<h1>Learning to grade</h1> <h1>${_("Learning to grade")}</h1>
<p> You have not yet finished learning to grade this problem.</p> <p>${_(" You have not yet finished learning to grade this problem.")}</p>
<p> You will now be shown a series of instructor-scored essays, and will be asked to score them yourself.</p> <p>${_(" You will now be shown a series of instructor-scored essays, and will be asked to score them yourself.")}</p>
<p> Once you can score the essays similarly to an instructor, you will be ready to grade your peers.</p> <p>${_(" Once you can score the essays similarly to an instructor, you will be ready to grade your peers.")}</p>
<input type="button" class="calibration-interstitial-page-button" value="Start learning to grade" name="calibration-interstitial-page-button" /> <input type="button" class="calibration-interstitial-page-button" value="${_("Start learning to grade")}" name="calibration-interstitial-page-button" />
</section> </section>
<!-- Flag submission confirmation dialog --> <!-- Flag submission confirmation dialog -->
<section class="flag-submission-confirmation"> <section class="flag-submission-confirmation">
<h4> Are you sure that you want to flag this submission?</h4> <h4>${_(" Are you sure that you want to flag this submission?")}</h4>
<p> <p>
You are about to flag a submission. You should only flag a submission that contains explicit or offensive content. If the submission is not addressed to the question or is incorrect, you should give it a score of zero and accompanying feedback instead of flagging it. ${_("You are about to flag a submission. You should only flag a submission that contains explicit or offensive content. If the submission is not addressed to the question or is incorrect, you should give it a score of zero and accompanying feedback instead of flagging it.")}
</p> </p>
<div> <div>
<input type="button" class="flag-submission-removal-button" value="Remove Flag" name="calibration-interstitial-page-button" /> <input type="button" class="flag-submission-removal-button" value="${_("Remove Flag")}" name="calibration-interstitial-page-button" />
<input type="button" class="flag-submission-confirmation-button" value="Keep Flag" name="calibration-interstitial-page-button" /> <input type="button" class="flag-submission-confirmation-button" value="${_("Keep Flag")}" name="calibration-interstitial-page-button" />
</div> </div>
</section> </section>
<input type="button" value="Go Back" class="action-button" name="back" /> <input type="button" value="${_("Go Back")}" class="action-button" name="back" />
</div> </div>
</section> </section>
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<h2 class="problem-header"> <h2 class="problem-header">
${ problem['name'] } ${ problem['name'] }
...@@ -16,17 +18,17 @@ ...@@ -16,17 +18,17 @@
<input class="check ${ check_button }" type="button" value="${ check_button }" /> <input class="check ${ check_button }" type="button" value="${ check_button }" />
% endif % endif
% if reset_button: % if reset_button:
<input class="reset" type="button" value="Reset" /> <input class="reset" type="button" value="${_('Reset')}" />
% endif % endif
% if save_button: % if save_button:
<input class="save" type="button" value="Save" /> <input class="save" type="button" value="${_('Save')}" />
% endif % endif
% if answer_available: % if answer_available:
<button class="show"><span class="show-label">Show Answer(s)</span> <span class="sr">(for question(s) above - adjacent to each field)</span></button> <button class="show"><span class="show-label">${_('Show Answer(s)')}</span> <span class="sr">${_("(for question(s) above - adjacent to each field)")}</span></button>
% endif % endif
% if attempts_allowed : % if attempts_allowed :
<section class="submission_feedback"> <section class="submission_feedback">
You have used ${ attempts_used } of ${ attempts_allowed } submissions ${_("You have used {num_used} of {num_total} submissions").format(num_used=attempts_used, num_total=attempts_allowed)}
</section> </section>
% endif % endif
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" /> <%inherit file="main.html" />
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
...@@ -32,19 +34,19 @@ ...@@ -32,19 +34,19 @@
<section id="login-modal" class="modal login-modal openid-login"> <section id="login-modal" class="modal login-modal openid-login">
<div class="inner-wrapper"> <div class="inner-wrapper">
<header> <header>
<h2>Log In</h2> <h2>${_("Log In")}</h2>
<hr> <hr>
</header> </header>
<form id="login_form" class="login_form" method="post" action="/openid/provider/login/"> <form id="login_form" class="login_form" method="post" action="/openid/provider/login/">
%if error: %if error:
<div id="login_error" class="modal-form-error" style="display: block;">Email or password is incorrect.</div> <div id="login_error" class="modal-form-error" style="display: block;">${_("Email or password is incorrect.")}</div>
%endif %endif
<label>E-mail</label> <label>${_("E-mail")}</label>
<input type="text" name="email" placeholder="E-mail" tabindex="1" autofocus="autofocus" /> <input type="text" name="email" placeholder="${_('E-mail')}" tabindex="1" autofocus="autofocus" />
<label>Password</label> <label>${_("Password")}</label>
<input type="password" name="password" placeholder="Password" tabindex="2" /> <input type="password" name="password" placeholder="${_('Password')}" tabindex="2" />
<div class="submit"> <div class="submit">
<input name="submit" type="submit" value="Return To ${return_to}" tabindex="3" /> <input name="submit" type="submit" value="${_('Return To %s') % return_to}" tabindex="3" />
</div> </div>
</form> </form>
</div> </div>
......
<h2>Thanks For Registering!</h2> <%! from django.utils.translation import ugettext as _ %>
<p class='activation-message'>Your account is not active yet. An activation link has been sent to <strong>${ email }</strong>, along with <h2>${_("Thanks For Registering!")}</h2>
instructions for activating your account.</p> <p class='activation-message'>${_("Your account is not active yet. An activation link has been sent to {email}, along with instructions for activating your account.").format(email="<strong>{}</strong>".format(email))}</p>
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
...@@ -7,23 +8,23 @@ ...@@ -7,23 +8,23 @@
<section class="message"> <section class="message">
%if not already_active: %if not already_active:
<h1 class="valid">Activation Complete!</h1> <h1 class="valid">${_("Activation Complete!")}</h1>
%else: %else:
<h1>Account already active!</h1> <h1>${_("Account already active!")}</h1>
%endif %endif
<hr class="horizontal-divider"> <hr class="horizontal-divider">
<p> <p>
%if not already_active: %if not already_active:
Thanks for activating your account. ${_("Thanks for activating your account.")}
%else: %else:
This account has already been activated. ${_("This account has already been activated.")}
%endif %endif
%if user_logged_in: %if user_logged_in:
Visit your <a href="${reverse('dashboard')}">dashboard</a> to see your courses. ${_("Visit your {link_start}dashboard{link_end} to see your courses.").format(link_start='<a href="{url}">'.format(url=reverse('dashboard')), link_end='</a>')}
%else: %else:
You can now <a href="${reverse('signin_user')}">log in</a>. ${_("You can now {link_start}log in{link_end}.").format(link_start='<a href="{url}">'.format(url=reverse('signin_user')), link_end='</a>')}
%endif %endif
</p> </p>
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%inherit file="../main.html" /> <%inherit file="../main.html" />
...@@ -6,14 +7,14 @@ ...@@ -6,14 +7,14 @@
<section class="container activation"> <section class="container activation">
<section class="message"> <section class="message">
<h1 class="invalid">Activation Invalid</h1> <h1 class="invalid">${_("Activation Invalid")}</h1>
<hr class="horizontal-divider"> <hr class="horizontal-divider">
<p>Something went wrong. Check to make sure the URL you went to was <p>${_('Something went wrong. Check to make sure the URL you went to was '
correct -- e-mail programs will sometimes split it into two 'correct -- e-mail programs will sometimes split it into two '
lines. If you still have issues, e-mail us to let us know what happened 'lines. If you still have issues, e-mail us to let us know what happened '
at <a href="mailto:${settings.BUGS_EMAIL}">${settings.BUGS_EMAIL}</a>.</p> 'at {email}.').format(email='<a href="mailto:{email}">{email}</a>'.format(email=settings.BUGS_EMAIL))}</p>
<p>Or you can go back to the <a href="/">home page</a>.</p> <p>${_('Or you can go back to the {link_start}home page{link_end}.').format(link_start='<a href="/">', link_end='</a>')}</p>
</section> </section>
</section> </section>
<%! from django.utils.translation import ugettext as _ %>
{% extends "registration/base.html" %} {% extends "registration/base.html" %}
{% block title %}Log in{% endblock %} {% block title %}${_("Log in")}{% endblock %}
{% block content %} {% block content %}
<h1>Log in</h1> <h1>${_("Log in")}</h1>
{% if form.errors %} {% if form.errors %}
<p class="error">Please correct the errors below:</p> <p class="error">${_("Please correct the errors below:")}</p>
{% endif %} {% endif %}
<form method="post" action="?next={{ next|default:"/" }}"> <form method="post" action="?next={{ next|default:"/" }}">
{% csrf_token %} {% csrf_token %}
<dl> <dl>
<dt><label for="id_username">Username:</label>{% if form.username.errors %} <span class="error">{{ form.username.errors|join:", " }}</span>{% endif %}</dt> <dt><label for="id_username">${_("Username:")}</label>{% if form.username.errors %} <span class="error">{{ form.username.errors|join:", " }}</span>{% endif %}</dt>
<dd>{{ form.username }}</dd> <dd>{{ form.username }}</dd>
<dt><label for="id_password">Password:</label>{% if form.password.errors %} <span class="error">{{ form.password.errors|join:", " }}</span>{% endif %}</dt> <dt><label for="id_password">${_("Password:")}</label>{% if form.password.errors %} <span class="error">{{ form.password.errors|join:", " }}</span>{% endif %}</dt>
<dd>{{ form.password }}</dd> <dd>{{ form.password }}</dd>
<dt><input type="submit" value="Log in" /></dt> <dt><input type="submit" value="${_("Log in")}" /></dt>
</dl> </dl>
</form> </form>
{% endblock %} {% endblock %}
{% block content-related %} {% block content-related %}
<p>If you don't have an account, you can <a href="/accounts/register/">sign <p>${_("If you don't have an account, you can {link_start}sign up{link_end} for one.").format(link_start='<a href="/accounts/register/">', link_end='</a>')}
up</a> for one.
{% endblock %} {% endblock %}
<%! from django.utils.translation import ugettext as _ %>
{% extends "registration/base.html" %} {% extends "registration/base.html" %}
{% block title %}Logged out{% endblock %} {% block title %}${_("Logged out")}{% endblock %/}
{% block content %} {% block content %}
<h1>You've been logged out.</h1> <h1>${_("You've been logged out.")}</h1>
<p>Thanks for stopping by; when you come back, don't forget to <a href="/accounts/login/">log in</a> again.</p> <p>${_("Thanks for stopping by; when you come back, don't forget to {link_start}log in{link_end} again.").format(link_start='<a href="/accounts/login">', link_end='</a>')}</p>
{% endblock %} {% endblock %}
\ No newline at end of file
<%! from django.utils.translation import ugettext as _ %>
{% load i18n %} {% load i18n %}
{% load compressed %} {% load compressed %}
{% load staticfiles %} {% load staticfiles %}
...@@ -5,7 +6,7 @@ ...@@ -5,7 +6,7 @@
<html> <html>
<head> <head>
<title>Your Password Reset is Complete</title> <title>${_("Your Password Reset is Complete")}</title>
{% compressed_css 'application' %} {% compressed_css 'application' %}
...@@ -53,13 +54,13 @@ ...@@ -53,13 +54,13 @@
<section class="passwordreset container"> <section class="passwordreset container">
<section class="introduction"> <section class="introduction">
<header> <header>
<h1>Your Password Reset is Complete</h1> <h1>${_("Your Password Reset is Complete")}</h1>
</header> </header>
</section> </section>
{% block content %} {% block content %}
<section role="main" class="content"> <section role="main" class="content">
<p>Your password has been set. You may go ahead and <a href="/login">log in</a> now.</a>.</p> <p>${_('Your password has been set. You may go ahead and {link_start}log in{link_end} now.').format(link_start='<a href="/login">', link_end='</a>')}</p>
</section> </section>
{% endblock %} {% endblock %}
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
{% load compressed %} {% load compressed %}
{% load staticfiles %} {% load staticfiles %}
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Reset Your edX Password</title> <title>${_("Reset Your edX Password")}</title>
{% compressed_css 'application' %} {% compressed_css 'application' %}
...@@ -52,79 +53,79 @@ ...@@ -52,79 +53,79 @@
<section class="passwordreset container"> <section class="passwordreset container">
<section class="introduction"> <section class="introduction">
<header> <header>
<h1>Reset Your edX Password</h1> <h1>${_("Reset Your edX Password")}</h1>
</header> </header>
</section> </section>
<section role="main" class="content"> <section role="main" class="content">
{% if validlink %} {% if validlink %}
<header> <header>
<h2 class="sr">Password Reset Form</h2> <h2 class="sr">${_("Password Reset Form")}</h2>
</header> </header>
<form role="form" id="passwordreset-form" method="post" data-remote="true" action="">{% csrf_token %} <form role="form" id="passwordreset-form" method="post" data-remote="true" action="">{% csrf_token %}
<!-- status messages --> <!-- status messages -->
<div role="alert" class="status message"> <div role="alert" class="status message">
<h3 class="message-title">We're sorry, edX enrollment is not available in your region</h3> <h3 class="message-title">${_("We're sorry, edX enrollment is not available in your region")}</h3>
<p class="message-copy">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> <p class="message-copy">${_("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.")}</p>
</div> </div>
<div role="alert" class="status message submission-error"> <div role="alert" class="status message submission-error">
<h3 class="message-title">The following errors occured while processing your registration: </h3> <h3 class="message-title">${_("The following errors occured while processing your registration: ")}</h3>
<ul class="message-copy"> <ul class="message-copy">
<li>You must complete all fields.</li> <li>${_("You must complete all fields.")}</li>
<li>The two password fields didn't match.</li> <li>${_("The two password fields didn't match.")}</li>
</ul> </ul>
</div> </div>
<div role="alert" class="status message system-error"> <div role="alert" class="status message system-error">
<h3 class="message-title">We're sorry, our systems seem to be having trouble processing your password reset</h3> <h3 class="message-title">${_("We're sorry, our systems seem to be having trouble processing your password reset")}</h3>
<p class="message-copy">Someone has been made aware of this issue. Please try again shortly. Please <a href="{{MKTG_URL_CONTACT}}">contact us</a> about any concerns you have.</p> <p class="message-copy">${_('Someone has been made aware of this issue. Please try again shortly. Please <a href="{{MKTG_URL_CONTACT}}">contact us</a> about any concerns you have.')}</p>
</div> </div>
<p class="instructions"> <p class="instructions">
Please enter your new password twice so we can verify you typed it in correctly. <br /> ${_('Please enter your new password twice so we can verify you typed it in correctly. <br /> '
Required fields are noted by <strong class="indicator">bold text and an asterisk (*)</strong>. 'Required fields are noted by <strong class="indicator">bold text and an asterisk (*)</strong>.')}
</p> </p>
<fieldset class="group group-form group-form-requiredinformation"> <fieldset class="group group-form group-form-requiredinformation">
<legend class="sr">Required Information</legend> <legend class="sr">${_("Required Information")}</legend>
<ol class="list-input"> <ol class="list-input">
<li class="field required password" id="field-new_password1"> <li class="field required password" id="field-new_password1">
<label for="new_password1">Your New Password</label> <label for="new_password1">${_("Your New Password")}</label>
<input id="new_password1" type="password" name="new_password1" placeholder="*****" /> <input id="new_password1" type="password" name="new_password1" placeholder="*****" />
</li> </li>
<li class="field required password" id="field-new_password2"> <li class="field required password" id="field-new_password2">
<label for="new_password2">Your New Password Again</label> <label for="new_password2">${_("Your New Password Again")}</label>
<input id="new_password2" type="password" name="new_password2" placeholder="*****" /> <input id="new_password2" type="password" name="new_password2" placeholder="*****" />
</li> </li>
</ol> </ol>
</fieldset> </fieldset>
<div class="form-actions"> <div class="form-actions">
<button name="submit" type="submit" id="submit" class="action action-primary action-update">Change My Password</button> <button name="submit" type="submit" id="submit" class="action action-primary action-update">${_("Change My Password")}</button>
</div> </div>
</form> </form>
{% else %} {% else %}
<header> <header>
<h2 class="sr">Your Password Reset Was Unsuccessful</h2> <h2 class="sr">${_("Your Password Reset Was Unsuccessful")}</h2>
</header> </header>
<p>The password reset link was invalid, possibly because the link has already been used. Please return to the <a href="/login">login page</a> and start the password reset process again.</p> <p>${_('The password reset link was invalid, possibly because the link has already been used. Please return to the <a href="/login">login page</a> and start the password reset process again.')}</p>
{% endif %} {% endif %}
</section> </section>
<aside role="complementary"> <aside role="complementary">
<header> <header>
<h3 class="sr">Password Reset Help</h3> <h3 class="sr">${_("Password Reset Help")}</h3>
</header> </header>
<div class="cta cta-help"> <div class="cta cta-help">
<h3>Need Help?</h3> <h3>${_("Need Help?")}</h3>
<p>View our <a href="{{MKTG_URL_FAQ}}">help section for contact information and answers to commonly asked questions</a></p> <p>${_('View our <a href="{{MKTG_URL_FAQ}}">help section for contact information and answers to commonly asked questions</a>')}</p>
</div> </div>
</aside> </aside>
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<header> <header>
<h2>Password reset successful</h2> <h2>${_("Password reset successful")}</h2>
<hr> <hr>
</header> </header>
<div class="message"> <div class="message">
<p>We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly.</p> <p>${_("We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly.")}</p>
</div> </div>
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
{% block content %} {% block content %}
<h1>Check your email</h1> <h1>Check your email</h1>
<p>An activation link has been sent to the email address you supplied, along with instructions for activating your account.</p> <p>An activation link has been sent to the email address you supplied, along with instructions for activating your account.</p>
{% endblock %} {% endblock %}
\ No newline at end of file
<%! from django.utils.translation import ugettext as _ %>
{% extends "registration/base.html" %} {% extends "registration/base.html" %}
{% block title %}Sign up{% endblock %} {% block title %}${_("Sign up")}{% endblock %}
{% block content %} {% block content %}
{% if form.errors %} {% if form.errors %}
<p class="errors">Please correct the errors below: {{ form.non_field_errors }}</p> <p class="errors">${_("Please correct the errors below: {{ form.non_field_errors }}")}</p>
{% endif %} {% endif %}
<h1>Create an account</h1> <h1>${_("Create an account")}</h1>
<form method="post" action="" class="wide"> <form method="post" action="" class="wide">
{% csrf_token %} {% csrf_token %}
<p> <p>
<label for="id_username">Username:</label> <label for="id_username">${_("Username:")}</label>
{% if form.username.errors %} {% if form.username.errors %}
<p class="errors">{{ form.username.errors.as_text }}</p> <p class="errors">{{ form.username.errors.as_text }}</p>
{% endif %} {% endif %}
{{ form.username }} {{ form.username }}
</p> </p>
<p> <p>
<label for="id_email">Email address:</label> <label for="id_email">${_("Email address:")}</label>
{% if form.email.errors %} {% if form.email.errors %}
<p class="errors">{{ form.email.errors.as_text }}</p> <p class="errors">{{ form.email.errors.as_text }}</p>
{% endif %} {% endif %}
{{ form.email }} {{ form.email }}
</p> </p>
<p> <p>
<label for="id_password1">Password:</label> <label for="id_password1">${_("Password:")}</label>
{% if form.password1.errors %} {% if form.password1.errors %}
<p class="errors">{{ form.password1.errors.as_text }}</p> <p class="errors">{{ form.password1.errors.as_text }}</p>
{% endif %} {% endif %}
{{ form.password1 }} {{ form.password1 }}
</p> </p>
<p> <p>
<label for="id_password2">Password (type again to catch typos):</label> <label for="id_password2">${_("Password (type again to catch typos):")}</label>
{% if form.password2.errors %} {% if form.password2.errors %}
<p class="errors">{{ form.password2.errors.as_text }}</p> <p class="errors">{{ form.password2.errors.as_text }}</p>
{% endif %} {% endif %}
{{ form.password2 }} {{ form.password2 }}
</p> </p>
<p class="submit"><input type="submit" value="Register &rarr;"></p> <p class="submit"><input type="submit" value="${_("Register")} &rarr;"></p>
</form> </form>
{% endblock %} {% endblock %}
{% block content-related %} {% block content-related %}
<p>Fill out the form to the left (all fields are required), and your <p>${_("Fill out the form to the left (all fields are required), and your "
account will be created; you'll be sent an email with instructions on how "account will be created; you'll be sent an email with instructions on how "
to finish your registration.</p> "to finish your registration.")}</p>
<p>We'll only use your email to send you signup instructions. We hate spam <p>${_("We'll only use your email to send you signup instructions. We hate spam "
as much as you do.</p> "as much as you do.")}</p>
<p>This account will let you log into the ticket tracker, claim tickets, <p>${_("This account will let you log into the ticket tracker, claim tickets, "
and be exempt from spam filtering.</p> "and be exempt from spam filtering")}.</p>
{% endblock %} {% endblock %}
This source diff could not be displayed because it is too large. You can view the blob instead.
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