Commit 933935a8 by Adam

Merge pull request #433 from edx/tsinghuax/lms-i18n

Tsinghuax/lms i18n
parents 60aaa8a8 69ffb6a8
from django.http import HttpResponse
from django.shortcuts import redirect
from mitxmako.shortcuts import render_to_string, render_to_response
__all__ = ['edge', 'event', 'landing']
......@@ -11,7 +12,7 @@ def landing(request, org, course, coursename):
# points to the temporary edge page
def edge(request):
return render_to_response('university_profiles/edge.html', {})
return redirect('/')
def event(request):
......
......@@ -90,10 +90,7 @@ def index(request, extra_context={}, user=None):
courses = get_courses(None, domain=domain)
courses = sort_by_announcement(courses)
# Get the 3 most recent news
top_news = _get_news(top=3)
context = {'courses': courses, 'news': top_news}
context = {'courses': courses}
context.update(extra_context)
return render_to_response('index.html', context)
......@@ -285,9 +282,6 @@ def dashboard(request):
exam_registrations = {course.id: exam_registration_info(request.user, course) for course in courses}
# Get the 3 most recent news
top_news = _get_news(top=3) if not settings.MITX_FEATURES.get('ENABLE_MKTG_SITE', False) else None
# get info w.r.t ExternalAuthMap
external_auth_map = None
try:
......@@ -302,7 +296,6 @@ def dashboard(request):
'errored_courses': errored_courses,
'show_courseware_links_for': show_courseware_links_for,
'cert_statuses': cert_statuses,
'news': top_news,
'exam_registrations': exam_registrations,
}
......@@ -1242,28 +1235,3 @@ def accept_name_change(request):
raise Http404
return accept_name_change_by_id(int(request.POST['id']))
def _get_news(top=None):
"Return the n top news items on settings.RSS_URL"
# Don't return anything if we're in a themed site
if settings.MITX_FEATURES["USE_CUSTOM_THEME"]:
return None
feed_data = cache.get("students_index_rss_feed_data")
if feed_data is None:
if hasattr(settings, 'RSS_URL'):
feed_data = urllib.urlopen(settings.RSS_URL).read()
else:
feed_data = render_to_string("feed.rss", None)
cache.set("students_index_rss_feed_data", feed_data, settings.RSS_TIMEOUT)
feed = feedparser.parse(feed_data)
entries = feed['entries'][0:top] # all entries if top is None
for entry in entries:
soup = BeautifulSoup(entry.description)
entry.image = soup.img['src'] if soup.img else None
entry.summary = soup.getText()
return entries
......@@ -17,3 +17,5 @@ input_encoding = utf-8
input_encoding = utf-8
[mako: common/templates/**.html]
input_encoding = utf-8
[mako: cms/templates/emails/**.txt]
input_encoding = utf-8
{
"locales" : ["en", "es"],
"locales" : ["en", "zh_CN"],
"dummy-locale" : "fr"
}
......@@ -24,13 +24,13 @@ def index(request):
from external_auth.views import ssl_login
return ssl_login(request)
if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'):
return redirect(settings.MKTG_URLS.get('ROOT'))
return redirect(settings.MKTG_URLS.get('ROOT'))
university = branding.get_university(request.META.get('HTTP_HOST'))
if university is None:
return student.views.index(request, user=request.user)
return courseware.views.university_profile(request, university)
return redirect('/')
@ensure_csrf_cookie
......@@ -48,4 +48,4 @@ def courses(request):
if university is None:
return courseware.views.courses(request)
return courseware.views.university_profile(request, university)
return redirect('/')
......@@ -90,8 +90,8 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase):
"""
Ensure that the response has the course navigator.
"""
self.assertTrue("course info" in resp.content.lower())
self.assertTrue("courseware" in resp.content.lower())
self.assertContains(resp, "Course Info")
self.assertContains(resp, "courseware")
def test_course_navigator(self):
""""
......
......@@ -120,9 +120,8 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
self.assertEqual(response.redirect_chain[0][1], 302)
if check_content:
unavailable_msg = "this module is temporarily unavailable"
self.assertEqual(response.content.find(unavailable_msg), -1)
self.assertFalse(isinstance(descriptor, ErrorDescriptor))
self.assertNotContains(response, "this module is temporarily unavailable")
self.assertNotIsInstance(descriptor, ErrorDescriptor)
@override_settings(MODULESTORE=TEST_DATA_XML_MODULESTORE)
......
......@@ -632,57 +632,6 @@ def mktg_course_about(request, course_id):
'show_courseware_link': show_courseware_link})
@ensure_csrf_cookie
@cache_if_anonymous
def static_university_profile(request, org_id):
"""
Return the profile for the particular org_id that does not have any courses.
"""
# Redirect to the properly capitalized org_id
last_path = request.path.split('/')[-1]
if last_path != org_id:
return redirect('static_university_profile', org_id=org_id)
# Render template
template_file = "university_profile/{0}.html".format(org_id).lower()
context = dict(courses=[], org_id=org_id)
return render_to_response(template_file, context)
@ensure_csrf_cookie
@cache_if_anonymous
def university_profile(request, org_id):
"""
Return the profile for the particular org_id. 404 if it's not valid.
"""
virtual_orgs_ids = settings.VIRTUAL_UNIVERSITIES
meta_orgs = getattr(settings, 'META_UNIVERSITIES', {})
# Get all the ids associated with this organization
all_courses = modulestore().get_courses()
valid_orgs_ids = set(c.org for c in all_courses)
valid_orgs_ids.update(virtual_orgs_ids + meta_orgs.keys())
if org_id not in valid_orgs_ids:
raise Http404("University Profile not found for {0}".format(org_id))
# Grab all courses for this organization(s)
org_ids = set([org_id] + meta_orgs.get(org_id, []))
org_courses = []
domain = request.META.get('HTTP_HOST')
for key in org_ids:
cs = get_courses_by_university(request.user, domain=domain)[key]
org_courses.extend(cs)
org_courses = sort_by_announcement(org_courses)
context = dict(courses=org_courses, org_id=org_id)
template_file = "university_profile/{0}.html".format(org_id).lower()
return render_to_response(template_file, context)
def render_notifications(request, course, notifications):
context = {
'notifications': notifications,
......@@ -779,12 +728,16 @@ def submission_history(request, course_id, student_username, location):
except StudentModule.DoesNotExist:
return HttpResponse(escape("{0} has never accessed problem {1}".format(student_username, location)))
history_entries = StudentModuleHistory.objects.filter(student_module=student_module).order_by('-id')
history_entries = StudentModuleHistory.objects.filter(
student_module=student_module
).order_by('-id')
# If no history records exist, let's force a save to get history started.
if not history_entries:
student_module.save()
history_entries = StudentModuleHistory.objects.filter(student_module=student_module).order_by('-id')
history_entries = StudentModuleHistory.objects.filter(
student_module=student_module
).order_by('-id')
context = {
'history_entries': history_entries,
......
......@@ -166,7 +166,7 @@ XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds
############################# 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()
COMMON_ROOT = REPO_ROOT / "common"
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
USE_I18N = 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
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
......@@ -486,6 +488,9 @@ MIDDLEWARE_CLASSES = (
'course_wiki.course_nav.Middleware',
# Detects user-requested locale from 'accept-language' header in http request
'django.middleware.locale.LocaleMiddleware',
'django.middleware.transaction.TransactionMiddleware',
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
......
<%namespace name='static' file='static_content.html'/>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" />
......@@ -7,7 +8,7 @@
<section class="basic_stats">
<div class="edx_summary">
<h2>edX-wide Summary</h2>
<h2>${_("{platform_name}-wide Summary").format(platform_name=settings.PLATFORM_NAME)}</h2>
<table style="margin-left:auto;margin-right:auto;width:50%">
% for key in results["scalars"]:
<tr>
......
<%! from django.utils.translation import ugettext as _ %>
<div class="annotatable-wrapper">
<div class="annotatable-header">
% if display_name is not UNDEFINED and display_name is not None:
......@@ -8,8 +10,8 @@
% if instructions_html is not UNDEFINED and instructions_html is not None:
<div class="annotatable-section shaded">
<div class="annotatable-section-title">
Instructions
<a class="annotatable-toggle annotatable-toggle-instructions expanded" href="javascript:void(0)">Collapse Instructions</a>
${_("Instructions")}
<a class="annotatable-toggle annotatable-toggle-instructions expanded" href="javascript:void(0)">${_("Collapse Instructions")}</a>
</div>
<div class="annotatable-section-body annotatable-instructions">
${instructions_html}
......@@ -19,8 +21,8 @@
<div class="annotatable-section">
<div class="annotatable-section-title">
Guided Discussion
<a class="annotatable-toggle annotatable-toggle-annotations" href="javascript:void(0)">Hide Annotations</a>
${_("Guided Discussion")}
<a class="annotatable-toggle annotatable-toggle-annotations" href="javascript:void(0)">${_("Hide Annotations")}</a>
</div>
<div class="annotatable-section-body annotatable-content">
${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}">
<div class="status-container">
${status|n}
......@@ -12,8 +13,8 @@
% endfor
</div>
<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="${_("Reset")}" class="reset-button" name="reset"/>
<input type="button" value="${_("Next Step")}" class="next-step-button" name="reset"/>
</div>
<section class="legend-container">
......
<%! from django.utils.translation import ugettext as _ %>
<section class="legend-container">
<div class="legenditem">
Legend
${_("Legend")}
</div>
% for i in xrange(0,len(legend_list)):
<%legend_title=legend_list[i]['name'] %>
......
<%! from django.utils.translation import ugettext as _ %>
<div class="status-elements">
<section id="combined-open-ended-status" class="combined-open-ended-status">
<div class="statusitem">
Status
${_("Status")}
</div>
%for i in xrange(0,len(status_list)):
<%status=status_list[i]%>
......
<%! from django.utils.translation import ugettext as _ %>
% for co in context_list:
% if co['grader_type'] in grader_type_image_dict:
<%grader_type=co['grader_type']%>
......@@ -18,7 +19,7 @@
%if len(co['feedback'])>2:
<div class="collapsible evaluation-response">
<header>
<a href="#">See full feedback</a>
<a href="#">${_("See full feedback")}</a>
</header>
<section class="feedback-full">
${co['feedback']}
......@@ -32,22 +33,22 @@
<input type="hidden" value="${co['submission_id']}" class="submission_id" />
<div class="collapsible evaluation-response">
<header>
<a href="#">Respond to Feedback</a>
<a href="#">${_("Respond to Feedback")}</a>
</header>
<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">
<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-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-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-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-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-1" value="1" /> <label for="evaluation-score-1"> ${_("Incorrect")}</label></li>
</ul>
</div>
<p>Additional comments:</p>
<p>${_("Additional comments:")}</p>
<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>
</div>
</div>
......@@ -55,4 +56,4 @@
</section>
<br/>
%endif
%endfor
\ No newline at end of file
%endfor
<%! from django.utils.translation import ugettext as _ %>
<section id="openended_${id}" class="open-ended-child" data-state="${state}" data-child-type="${child_type}">
<div class="error"></div>
<div class="prompt">
${prompt|n}
</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>
<div class="message-wrapper"></div>
<div class="grader-status">
% 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':
<span class="grading" id="status_${id}">Submitted for grading.
<span class="grading" id="status_${id}">${_("Submitted for grading.")}
% if eta_message is not None:
${eta_message}
% endif
......@@ -26,8 +27,8 @@
<div class="file-upload"></div>
<input type="button" value="Submit" class="submit-button" name="show"/>
<input name="skip" class="skip-button" type="button" value="Skip Post-Assessment"/>
<input type="button" value="${_("Submit")}" class="submit-button" name="show"/>
<input name="skip" class="skip-button" type="button" value="${_("Skip Post-Assessment")}"/>
<div class="open-ended-action"></div>
......
<%! from django.utils.translation import ugettext as _ %>
<section>
<div class="shortform">
<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 class="longform">
......@@ -9,4 +10,4 @@
${errors}
</div>
</div>
</section>
\ No newline at end of file
</section>
<%! from django.utils.translation import ugettext as _ %>
<div class="external-grader-message">
${msg|n}
<div class="collapsible evaluation-response">
<header>
<a href="#">Respond to Feedback</a>
<a href="#">${_("Respond to Feedback")}</a>
</header>
<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">
<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-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-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-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-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-1" value="1" /> <label for="evaluation-score-1"> ${_("Incorrect")}</label></li>
</ul>
</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>
<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>
</div>
</div>
\ No newline at end of file
</div>
<%! from django.utils.translation import ugettext as _ %>
<form class="rubric-template" id="inputtype_${id}" xmlns="http://www.w3.org/1999/html">
<h3>Rubric</h3>
<p>Select the criteria you feel best represents this submission in each category.</p>
<h3>${_("Rubric")}</h3>
<p>${_("Select the criteria you feel best represents this submission in each category.")}</p>
<div class="rubric">
% for i in range(len(categories)):
<% category = categories[i] %>
......
<%! from django.utils.translation import ugettext as _ %>
<div class="hint">
<div class="hint-prompt">
Please enter a hint below:
${_("Please enter a hint below:")}
</div>
<textarea name="post_assessment" class="post_assessment" cols="70" rows="5"
${'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}"
data-id="${id}" data-state="${state}" data-allow_reset="${allow_reset}" data-child-type="${child_type}">
<div class="error"></div>
......@@ -5,7 +6,7 @@
${prompt}
</div>
<h4>Response</h4>
<h4>${_("Response")}</h4>
<div>
<textarea name="answer" class="answer short-form-response" cols="70" rows="20">${previous_answer|n}</textarea>
</div>
......@@ -19,5 +20,5 @@
<div class="message-wrapper"></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>
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/>
<%inherit file="main.html" />
<section class="container about">
<nav>
<a href="/t/about.html">Vision</a>
<a href="/t/faq.html">Faq</a>
<a href="/t/press.html">Press</a>
<a href="/t/contact.html" class="active">Contact</a>
<a href="/t/about.html">${_("Vision")}</a>
<a href="/t/faq.html">${_("Faq")}</a>
<a href="/t/press.html">${_("Press")}</a>
<a href="/t/contact.html" class="active">${_("Contact")}</a>
</nav>
<section class="contact">
......@@ -15,21 +17,35 @@
<img src="${static.url('images/contact-page.jpg')}">
</div>
<div class="contacts">
<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>
<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>
<h2>Technical Inquiries and Feedback</h2>
<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>
<h2>Media</h2>
<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>
<h2>Universities</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>
<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>
<h2>${_("General Inquiries and Feedback")}</h2>
<p>${_('If you have a general question about {platform_name} please email <a href="mailto:{contact_email}">{contact_email}</a>. 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(
platform_name=settings.PLATFORM_NAME,
contact_email=settings.CONTACT_EMAIL,
faq_link_start='<a href="{url}">'.format(url=reverse('faq_edx')),
faq_link_end='</a>',
fb_link_start='<a href="http://www.facebook.com/EdxOnline">'.
fb_link_end='</a>'
)}</p>
<h2>${_("Technical Inquiries and Feedback")}</h2>
<p>${_('If you have suggestions/feedback about the overall {platform_name} 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:{tech_email}">{tech_email}</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_email}">{bugs_email}</a>.').format(
tech_email=settings.TECH_SUPPORT_EMAIL,
bug_email=settings.BUGS_EMAIL,
platform_name=settings.PLATFORM_NAME
)}</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 with or if you have questions about {platform_name}, please email {email}.'.format(email='<a href="mailto:university@edx.org">university@edx.org</a>', platform_name="edX")}</p>
</div>
</section>
</section>
......
<%namespace name='static' file='static_content.html'/>
<%namespace file='main.html' import="stanford_theme_enabled"/>
<%!
from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section
%>
<%page args="course" />
<article id="${course.id}" class="course">
%if course.is_newish:
<span class="status">New</span>
<span class="status">${_("New")}</span>
%endif
<a href="${reverse('about_course', args=[course.id])}">
<div class="inner-wrapper">
......@@ -28,7 +29,7 @@
% if stanford_theme_enabled():
<span class="university">${get_course_about_section(course, 'university')}</span>
% else:
<a href="${reverse('university_profile', args=[course.org])}" class="university">${get_course_about_section(course, 'university')}</a>
<a href="#" class="university">${get_course_about_section(course, 'university')}</a>
% endif
<span class="start-date">${course.start_date_text}</span>
</div>
......
<section class="filter">
<nav>
<div class="dropdown university">
<div class="filter-heading">
All Universities
</div>
<ul>
<li>
<a href="#">Harvard</a>
</li>
<li>
<a href="#">MIT</a>
</li>
</ul>
</div>
<div class="dropdown subject">
<div class="filter-heading">
All Subjects
</div>
<ul>
<li>
<a href="#">Computer Science</a>
</li>
<li>
<a href="#">History</a>
</li>
</ul>
</div>
<div class="dropdown featured">
<div class="filter-heading">
Newest
</div>
<ul>
<li>
<a href="#">Top Rated</a>
</li>
<li>
<a href="#">Starting soonest</a>
</li>
</ul>
</div>
<form class="search">
<input type="text" placeholder="Search for courses">
<input type="submit">
</form>
</nav>
</section>
<%! from django.utils.translation import ugettext as _ %>
<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">
<a href="#" class="button show_cohorts">Show cohorts</a>
<a href="#" class="button show_cohorts">${_("Show cohorts")}</a>
</div>
<ul class="errors">
</ul>
<div class="summary" style="display:none">
<h3>Cohorts in the course</h3>
<h3>${_("Cohorts in the course")}</h3>
<ul class="cohorts">
</ul>
<p>
<input class="cohort_name"/>
<a href="#" class="button add_cohort">Add cohort</a>
<a href="#" class="button add_cohort">${_("Add cohort")}</a>
</p>
</div>
......@@ -27,10 +28,10 @@
<span class="page_num"></span>
<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>
<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>
......
<!DOCTYPE html>
<%! from django.utils.translation import ugettext as _ %>
<html>
<head>
## "edX" should not be translated
<%block name="title"><title>edX</title></%block>
<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)">
<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="#">
${chapter['display_name']}
</a>
......
<%! from django.utils.translation import ugettext as _ %>
<%!
from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section
......@@ -65,7 +66,7 @@
<script src="${static.url('js/course_info.js')}"></script>
</%block>
<%block name="title"><title>About ${course.number}</title></%block>
<%block name="title"><title>${_("About {course.number}").format(course=course)}</title></%block>
<section class="course-info">
<header class="course-profile">
......@@ -76,7 +77,7 @@
<h1>
${course.number}: ${get_course_about_section(course, "title")}
% if not self.theme_enabled():
<a href="${reverse('university_profile', args=[course.org])}">${get_course_about_section(course, "university")}</a>
<a href="#">${get_course_about_section(course, "university")}</a>
% endif
</h1>
</hgroup>
......@@ -86,13 +87,13 @@
%if show_courseware_link:
<a href="${course_target}">
%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=course)}</span>
%if show_courseware_link:
<strong>View Courseware</strong>
<strong>${_("View Courseware")}</strong>
</a>
%endif
%else:
<a href="#" class="register">Register for ${course.number}</a>
<a href="#" class="register">${_("Register for {course.number}").format(course=course)}</a>
<div id="register_error"></div>
%endif
</div>
......@@ -115,16 +116,16 @@
</div>
</div>
</header>
<section class="container">
<section class="details">
<nav>
<a href="#" class="active">Overview</a>
## <a href="#">FAQ</a>
## <a href="#">Requirements</a>
## <a href="#">Text-book</a>
## <a href="#">Syllabus</a>
## <a href="#">Reviews</a>
<a href="#" class="active">${_("Overview")}</a>
## <a href="#">${_("FAQ")}</a>
## <a href="#">${_("Requirements")}</a>
## <a href="#">${_("Text-book")}</a>
## <a href="#">${_("Syllabus")}</a>
## <a href="#">${_("Reviews")}</a>
</nav>
<div class="inner-wrapper">
......@@ -136,7 +137,7 @@
<section class="course-summary">
<header>
<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,
## or something allowing themes to do whatever they
## want here (and on this whole page, really).
......@@ -161,15 +162,15 @@
</header>
<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 start"></div><p>Classes Start</p><span class="start-date">${course.start_date_text}</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>
## 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.
% if get_course_about_section(course, "end_date") or course.end:
<li>
<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"):
${get_course_about_section(course, "end_date")}
% else:
......@@ -180,13 +181,13 @@
% endif
% 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
##<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"):
<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
</ol>
</section>
......@@ -196,10 +197,11 @@
% if get_course_about_section(course, "ocw_links"):
<section class="additional-resources">
<header>
<h1>Additional Resources</h1>
<h1>${_("Additional Resources")}</h1>
</header>
<section>
## "MITOpenCourseware" should *not* be translated
<h2 class="opencourseware">MITOpenCourseware</h2>
${get_course_about_section(course, "ocw_links")}
</section>
......@@ -215,10 +217,10 @@
<form id="class_enroll_form" method="post" data-remote="true" action="${reverse('change_enrollment')}">
<fieldset class="enroll_fieldset">
<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>
<div class="submit">
<input name="submit" type="submit" value="enroll">
<input name="submit" type="submit" value="${_("enroll")}">
</div>
</form>
</div>
......
......@@ -12,6 +12,7 @@ def url_class(is_active):
return ""
%>
<%! from courseware.tabs import get_course_tabs %>
<%! from django.utils.translation import ugettext as _ %>
<nav class="${active_page} course-material">
<div class="inner-wrapper">
......@@ -32,7 +33,7 @@ def url_class(is_active):
<%block name="extratabs" />
% if masquerade is not UNDEFINED:
% 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
</ol>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.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">
<header class="search">
......@@ -16,17 +17,15 @@
% endif
</div>
% if self.stanford_theme_enabled():
<h2>Explore free courses from Stanford University.</h2>
<h2>${_("Explore free courses from {university_name}.").format(university_name="Stanford University")}</h2>
% else:
<h2>Explore free courses from leading universities.</h2>
<h2>${_("Explore free courses from leading universities.")}</h2>
% endif
</hgroup>
</div>
</header>
<section class="container">
## I'm removing this for now since we aren't using it for the fall.
## <%include file="course_filter.html" />
<section class="courses">
<ul class="courses-listing">
%for course in courses:
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%namespace name='static' file='../static_content.html'/>
<%block name="bodyclass">courseware</%block>
<%block name="title"><title>Courseware – edX</title></%block>
## Translators: "edX" should *not* be translated
<%block name="title"><title>${_("Courseware")} - ${settings.PLATFORM_NAME}</title></%block>
<%block name="headextra">
<%static:css group='course'/>
......@@ -11,7 +13,7 @@
<section class="container">
<section class="outside-app">
<h1>There has been an error on the <span class="edx">edX</span> 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>
<h1>${_('There has been an error on the {span_start}{platform_name}{span_end} servers').format(platform_name=settings.PLATFORM_NAME, 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:{tech_support_email}\">{tech_support_email}</a>' to report any problems or downtime.").format(tech_support_email=settings.TECH_SUPPORT_EMAIL)}</p>
</section>
</section>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%namespace name='static' file='/static_content.html'/>
<%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">
<%static:css group='course'/>
......@@ -155,7 +156,7 @@
<div class="timer-main">
<div id="timer_wrapper">
% 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
<div class="timer_label">Time Remaining:</div> <div id="exam_timer" class="timer_value">&nbsp;</div>
</div>
......@@ -170,9 +171,9 @@
<div class="course-wrapper">
% if accordion:
<section aria-label="Course Navigation" class="course-index">
<section aria-label="${_('Course Navigation')}" class="course-index">
<header id="open_close_accordion">
<a href="#">close</a>
<a href="#">${_("close")}</a>
</header>
<div id="accordion" style="display: none">
......@@ -204,7 +205,7 @@
% if course.show_calculator:
<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">
<form id="calculator">
......@@ -212,15 +213,15 @@
<input type="text" id="calculator_input" title="Calculator Input Field" />
<div class="help-wrapper">
<a href="#">Hints</a>
<a href="#">${_("Hints")}</a>
<dl class="help">
<dt>Suffixes:</dt>
<dt>${_("Suffixes:")}</dt>
<dd> %kMGTcmunp</dd>
<dt>Operations:</dt>
<dt>${_("Operations:")}</dt>
<dd>^ * / + - ()</dd>
<dt>Functions:</dt>
<dt>${_("Functions:")}</dt>
<dd>sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs </dd>
<dt>Constants</dt>
<dt>${_("Constants")}</dt>
<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.
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%! from django.core.urlresolvers import reverse %>
<%namespace name='static' file='/static_content.html'/>
......@@ -7,9 +8,9 @@
<section class="container">
<div class="gradebook-summary-wrapper">
<section class="gradebook-summary-content">
<h1>Grade summary</h1>
<h1>${_("Grade summary")}</h1>
<p>Not implemented yet</p>
<p>${_("Not implemented yet")}</p>
</section>
</div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%! from django.core.urlresolvers import reverse %>
<%namespace name='static' file='/static_content.html'/>
......@@ -36,7 +37,7 @@
<section class="container">
<div class="gradebook-wrapper">
<section class="gradebook-content">
<h1>Gradebook</h1>
<h1>${_("Gradebook")}</h1>
<table class="student-table">
<thead>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/>
......@@ -6,10 +7,10 @@
<%static:css group='course'/>
</%block>
<%block name="title"><title>${course.number} Course Info</title></%block>
<%block name="title"><title>${_("{course.number} Course Info").format(course=course)}</title></%block>
<%include file="/courseware/course_navigation.html" args="active_page='info'" />
<%!
<%!
from courseware.courses import get_course_info_section
%>
......@@ -26,7 +27,7 @@ $(document).ready(function(){
<div class="info-wrapper">
% if user.is_authenticated():
<section class="updates">
<h1>Course Updates &amp; News</h1>
<h1>${_("Course Updates &amp; News")}</h1>
${get_course_info_section(request, course, 'updates')}
</section>
<section aria-label="Handout Navigation" class="handouts">
......@@ -35,11 +36,11 @@ $(document).ready(function(){
</section>
% else:
<section class="updates">
<h1>Course Updates &amp; News</h1>
<h1>${_("Course Updates &amp; News")}</h1>
${get_course_info_section(request, course, 'guest_updates')}
</section>
<section aria-label="Handout Navigation" class="handouts">
<h1>Course Handouts</h1>
<section aria-label="${_('Handout Navigation')}" class="handouts">
<h1>${_("Course Handouts")}</h1>
${get_course_info_section(request, course, 'guest_handouts')}
</section>
% endif
......
<%! from django.utils.translation import ugettext as _ %>
<%!
from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section
......@@ -7,7 +8,7 @@
<%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>
......@@ -23,7 +24,7 @@
<ul class="list-actions register">
<li class="item">
<a class="action coming-soon" href="">Coming Soon</a>
<a class="action coming-soon" href="">${_("Coming Soon")}</a>
</li>
</ul>
......
<%! from django.utils.translation import ugettext as _ %>
<%!
from django.core.urlresolvers import reverse
from courseware.courses import course_image_url, get_course_about_section
......@@ -7,7 +8,7 @@
<%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>
......@@ -31,7 +32,7 @@
window.top.location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll";
} else {
$('#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");
}
});
......@@ -46,14 +47,14 @@
<li class="item">
%if user.is_authenticated() and registered:
%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:
<div class="action is-registered">You Are Registered</div>
<div class="action is-registered">${_("You Are Registered")}</div>
%endif
%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:
<div class="action registration-closed is-disabled">Registration Is Closed</div>
<div class="action registration-closed is-disabled">${_("Registration Is Closed")}</div>
%endif
</li>
</ul>
......@@ -63,11 +64,11 @@
<form id="class_enroll_form" method="post" data-remote="true" action="${reverse('change_enrollment')}">
<fieldset class="enroll_fieldset">
<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 }">
</fieldset>
<div class="submit">
<input name="enroll" type="submit" value="enroll">
<input name="enroll" type="submit" value="${_("enroll")}">
</div>
</form>
</div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" />
<%namespace name='static' file='../static_content.html'/>
<%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">
<%static:css group='course'/>
......@@ -15,7 +16,7 @@
<section class="container">
<div class="course-wrapper">
<section class="course-content">
<h3> Updates to Discussion Posts You Follow </h3>
<h3> ${_("Updates to Discussion Posts You Follow")} </h3>
${content}
</section>
</div>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %>
<%
......@@ -37,7 +38,7 @@ def url_for_user(user_id): #TODO
% if notification.get('actor_id', None):
<a href="${url_for_user(notification['actor_id'])}">${info['actor_username']}</a>
% else:
Anonymous
${_("Anonymous")}
% endif
</%def>
......@@ -48,7 +49,7 @@ def url_for_user(user_id): #TODO
<%def name="render_comment_link(notification)">
<% 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 name="render_discussion_link(notification)">
......@@ -59,19 +60,32 @@ def url_for_user(user_id): #TODO
<%def name="render_notification(notification)">
<div class="notification">
% if notification['notification_type'] == 'post_reply':
${render_user_link(notification)} posted a ${render_comment_link(notification)}
to the thread ${render_thread_link(notification)} in discussion ${render_discussion_link(notification)}
${_("{user} posted a {comment} to the thread {thread} in discussion {discussion}").format(
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':
${render_user_link(notification)} posted a new thread ${render_thread_link(notification)}
in discussion ${render_discussion_link(notification)}
${_("{user} posted a new thread {thread} in discussion {discussion}").format(
user=render_user_link(notification),
thread=render_thread_link(notification),
discussion=render_discussion_link(notification),
)}
% elif notification['notification_type'] == 'at_user':
${render_user(info)} mentioned you in
% if notification['info']['content_type'] == 'thread':
the thread ${render_thread_link(notification)}
in discussion ${render_discussion_link(notification)}
${_("{user} mentioned you in the thread {thread} in disucssion {discussion}").format(
user=render_user(info),
thread=render_thread_link(notification),
discussion=render_discussion_link(notification),
)}
% else:
${render_comment_link(notification)}
to the thread ${render_thread_link(notification)} in discussion ${render_discussion_link(notification)}
${_("{user} mentioned you in {comment} to the thread {thread} in discussion {discussion}").format(
user=render_user(info),
comment=render_comment_link(notification),
thread=render_thread_link(notification),
discussion=render_discussion_link(notification),
)}
% endif
% endif
</div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%namespace name='static' file='/static_content.html'/>
......@@ -7,7 +8,7 @@
<%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
......@@ -31,7 +32,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",
<section class="course-info">
<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>
%if not course.disable_progress_graph:
......@@ -83,7 +84,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",
%endfor
</ol>
%else:
<h3 class="no-scores"> No problem scores in this section </h3>
<h3 class="no-scores"> ${_("No problem scores in this section")} </h3>
%endif
</section>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%namespace name='static' file='/static_content.html'/>
......@@ -5,17 +6,17 @@
<%static:css group='course'/>
</%block>
<%block name="title"><title>${course.number} Course Info</title></%block>
<%block name="title"><title>${_("{course.number} Course Info").format(course=course)}</title></%block>
<%include file="/courseware/course_navigation.html" args="active_page='syllabus'" />
<%!
<%!
from courseware.courses import get_course_syllabus_section
%>
<section class="container">
<div class="syllabus_wrapper">
<div class="syllabus">
<h1> Syllabus </h1>
<h1>${_("Syllabus")}</h1>
% if user.is_authenticated():
${get_course_syllabus_section(course, 'syllabus')}
% else:
......
<%! from django.utils.translation import ugettext as _ %>
<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>
<div>
<p>Python:</p>
......@@ -11,7 +12,7 @@
</div>
%if results:
<div>
<p>Results:</p>
<p>${_("Results:")}</p>
<pre>
${results|h}
</pre>
......
<%! from django.utils.translation import ugettext as _ %>
<div class="blank-state">
% 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:
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
</div>
<%! from django.utils.translation import ugettext as _ %>
<%! from django_comment_client.permissions import has_permission %>
<%inherit file="../courseware/course_navigation.html" />
<%block name="extratabs">
% 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
</%block>
\ No newline at end of file
</%block>
<%! from django.utils.translation import ugettext as _ %>
<%include file="_underscore_templates.html" />
<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 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>
<%! from django.utils.translation import ugettext as _ %>
<%! import json %>
<%def name="render_dropdown(map)">
......@@ -30,20 +31,20 @@
<ul class="browse-topic-drop-menu">
<li>
<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>
</li>
%if flag_moderator:
<li>
<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>
</li>
%endif
<li>
<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>
</li>
${render_dropdown(category_map)}
......
<%! from django.utils.translation import ugettext as _ %>
<article class="new-post-article">
<div class="inner-wrapper">
<div class="new-post-form-errors">
......@@ -5,25 +6,25 @@
<form class="new-post-form">
<div class="left-column">
<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>
% 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:
<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
%if is_course_cohorted:
<div class="form-group-label choose-cohort">
Make visible to:
${_("Make visible to:")}
<select class="group-filter-select new-post-group" name = "group_id">
<option value="">All Groups</option>
<option value="">${_("All Groups")}</option>
%if is_moderator:
%for c in cohorts:
<option value="${c.id}">${c.name}</option>
%endfor
%else:
%if user_cohort:
<option value="${user_cohort}">My Cohort</option>
<option value="${user_cohort}">${_("My Cohort")}</option>
%endif
%endif
......@@ -44,8 +45,8 @@
##<div class="form-row">
## <input type="text" class="new-post-tags" name="tags" placeholder="Tags">
##</div>
<input type="submit" class="submit" value="Add post">
<a href="#" class="new-post-cancel">Cancel</a>
<input type="submit" class="submit" value="${_("Add post")}">
<a href="#" class="new-post-cancel">${_("Cancel")}</a>
</div>
</form>
</div>
......
<%! from django.utils.translation import ugettext as _ %>
<%def name="render_form_filter_dropdown(map)">
% for child in map["children"]:
% if child in map["entries"]:
......@@ -26,9 +27,9 @@
<div class="inner-wrapper">
<form class="new-post-form">
<div class="left-column">
<label>Create new post about:</label>
<label>${_("Create new post about:")}</label>
<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_search">
<input type="text" class="form-topic-drop-search-input" placeholder="filter topics">
......@@ -39,18 +40,18 @@
</div>
</div>
<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>
% 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:
<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
%if is_course_cohorted and is_moderator:
<div class="form-group-label choose-cohort">
Make visible to:
${_("Make visible to:")}
<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:
<option value="${c.id}"
%if user_cohort and str(user_cohort) == str(c.id):
......@@ -76,8 +77,8 @@
##<div class="form-row">
## <input type="text" class="new-post-tags" name="tags" placeholder="Tags">
##</div>
<input type="submit" class="submit" value="Add post">
<a href="#" class="new-post-cancel">Cancel</a>
<input type="submit" class="submit" value="${_("Add post")}">
<a href="#" class="new-post-cancel">${_("Cancel")}</a>
</div>
</form>
</div>
......
<%! from django.utils.translation import ugettext as _ %>
<%! import django_comment_client.helpers as helpers %>
% if recent_active_threads:
<article class="discussion-sidebar-following sidebar-module">
<header>
<h4>Following</h4>
<h4>${_("Following")}</h4>
<!--<a href="#" class="sidebar-view-all">view all &rsaquo;</a>-->
</header>
<ol class="discussion-sidebar-following-list">
......
<%! from django.utils.translation import ugettext as _ %>
<%! from urllib import urlencode %>
<%
......@@ -14,5 +15,5 @@ def base_url_for_search():
% else:
<input class="search-input" type="text" value="${text | h}" id="keywords" autocomplete="off"/>
% 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>
<%! from django.utils.translation import ugettext as _ %>
% if len(threads) > 0:
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">
% for thread in threads:
<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"/>
<%! from django_comment_client.mustache_helpers import url_for_user %>
......@@ -7,7 +8,7 @@
<header>
%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 {group}.").format(group=cohort_dictionary[thread['group_id']])} </div>
%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>
......
<%! from django.utils.translation import ugettext as _ %>
<script type="text/template" id="thread-list-template">
<div class="browse-search">
<div class="home">
......@@ -9,7 +10,7 @@
<a href="#" class="browse-topic-drop-icon">
<i class="icon icon-reorder"></i>
</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>
<%include file="_filter_dropdown.html" />
<div class="search">
......@@ -19,22 +20,22 @@
</div>
</div>
<div class="sort-bar">
<span class="sort-label">Sort by:</span>
<span class="sort-label">${_("Sort by:")}</span>
<ul>
<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="comments">comments</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="comments">${_("comments")}</a></li>
</ul>
%if is_course_cohorted and is_moderator:
<span class="group-filter-label cohort">Show:</span>
<select class="group-filter-select cohort-options cohort">
<option value="all">View All</option>
<span class="group-filter-label cohort">${_("Show:")}</span>
<select class="group-filter-select cohort-options cohort">
<option value="all">${_("View All")}</option>
%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
</select>
</select>
%endif
</div>
<div class="post-list-wrapper">
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django_comment_client.permissions import has_permission %>
<script type="text/template" id="thread-template">
......@@ -8,15 +9,15 @@
<li class="loading"><div class="loading-animation"></div></li>
</ol>
<div class="post-status-closed bottom-post-status" style="display: none">
This thread is closed.
${_("This thread is closed.")}
</div>
% if course is UNDEFINED or has_permission(user, 'create_comment', course.id):
<form class="discussion-reply-new" data-id="${'<%- id %>'}">
<h4>Post a response:</h4>
<h4>${_("Post a response:")}</h4>
<ul class="discussion-errors"></ul>
<div class="reply-body" data-id="${'<%- id %>'}"></div>
<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>
</form>
% endif
......@@ -41,24 +42,24 @@
<span class="timeago" title="${'<%- created_at %>'}">${'<%- created_at %>'}</span>
<span class="post-status-closed top-post-status" style="display: none">
&bull; This thread is closed.
${_("&bull; This thread is closed.")}
</span>
</p>
</header>
<div class="post-body">${'<%- body %>'}</div>
<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):
<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:
${"<% if (pinned) { %>"}
<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
......@@ -70,16 +71,16 @@
${'<% } %>'}
<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-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-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-openclose" href="javascript:void(0)"><span class="edit-icon"></span> ${_("Close")}</a></li>
</ul>
</div>
</script>
<script type="text/template" id="thread-edit-template">
<div class="discussion-post edit-post-form">
<h1>Editing post</h1>
<h1>${_("Editing post")}</h1>
<ul class="edit-post-form-errors"></ul>
<div class="form-row">
<input type="text" class="edit-post-title" name="title" value="${"<%-title %>"}" placeholder="Title">
......@@ -92,8 +93,8 @@
##<div class="form-row">
## <input type="text" class="edit-post-tags" name="tags" placeholder="Tags" value="${"<%- tags %>"}">
##</div>
<input type="submit" class="post-update" value="Update post">
<a href="#" class="post-cancel">Cancel</a>
<input type="submit" class="post-update" value="${_("Update post")}">
<a href="#" class="post-cancel">${_("Cancel")}</a>
</div>
</script>
......@@ -107,7 +108,7 @@
<div class="comment-body" data-id="${'<%- wmdId %>'}"
data-placeholder="Add a comment..."></div>
<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>
</form>
% endif
......@@ -129,21 +130,21 @@
<i class="icon icon-flag"></i><span class="flag-label">Report Misuse</span></div>
</div>
<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-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-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-openclose" href="javascript:void(0)"><span class="edit-icon"></span> ${_("Close")}</a></li>
</ul>
</script>
<script type="text/template" id="thread-response-edit-template">
<div class="edit-post-form">
<h1>Editing response</h1>
<h1>${_("Editing response")}</h1>
<ul class="edit-post-form-errors"></ul>
<div class="form-row">
<div class="edit-post-body" name="body">${"<%- body %>"}</div>
</div>
<input type="submit" class="post-update" value="Update response">
<a href="#" class="post-cancel">Cancel</a>
<input type="submit" class="post-update" value="${_("Update response")}">
<a href="#" class="post-cancel">${_("Cancel")}</a>
</div>
</script>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django_comment_client.helpers import pluralize %>
<%! from django_comment_client.permissions import has_permission, check_permissions_by_view %>
<%! from operator import attrgetter %>
......@@ -15,9 +16,9 @@
<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 "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:
<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
</div>
<%! from django.utils.translation import ugettext as _ %>
<%! import django_comment_client.helpers as helpers %>
<%! from django.template.defaultfilters import escapejs %>
<%! from django.core.urlresolvers import reverse %>
......@@ -5,7 +6,7 @@
<%inherit file="../main.html" />
<%namespace name='static' file='../static_content.html'/>
<%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">
<%static:css group='course'/>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" />
<h1>We're sorry</h1>
<p>The forums are currently undergoing maintenance. We'll have them back up shortly!</p>
<h1>${_("We're sorry")}</h1>
<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 %>
<%! from django.template.defaultfilters import escapejs %>
<%! from django.core.urlresolvers import reverse %>
......@@ -6,7 +7,7 @@
<%inherit file="../main.html" />
<%namespace name='static' file='../static_content.html'/>
<%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">
<%static:css group='course'/>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.template.defaultfilters import escapejs %>
<%inherit file="../main.html" />
<%namespace name='static' file='../static_content.html'/>
<%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">
<%static:css group='course'/>
......@@ -19,7 +20,7 @@
<section class="container">
<div class="course-wrapper">
<section aria-label="User Profile" class="user-profile">
<section aria-label="${_('User Profile')}" class="user-profile">
<nav>
<article class="sidebar-module discussion-sidebar">
......@@ -30,7 +31,7 @@
</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}">
<h2>Active Threads</h2>
<h2>${_("Active Threads")}</h2>
</section>
</div>
</section>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" />
<section class="container activation">
<section class="message">
<h1 class="invalid">E-mail change failed</h1>
<h1 class="invalid">${_("E-mail change failed")}</h1>
<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>
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %>
<%inherit file="main.html" />
<section class="container activation">
<section class="message">
<h1 class="valid">E-mail change successful!</h1>
<h1 class="valid">${_("E-mail change successful!")}</h1>
<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>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" />
<section class="container activation">
<section class="message">
<h1 class="invalid">E-mail change failed</h1>
<h1 class="invalid">${_("E-mail change failed")}</h1>
<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>
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %>
<%inherit file="main.html" />
<section class="container activation">
<section class="message">
<h1 class="invalid">E-mail change successful!</h1>
<h1 class="invalid">${_("E-mail change successful!")}</h1>
<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>
<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">
<input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
<h2> Add new students </h2>
<h2> ${_("Add new students")} </h2>
<textarea name="new_students">
</textarea>
<input type="submit">
</form>
<p> Existing students:
<p> ${_("Existing students:")}
<p> ${ existing_students }
<p> New students added:
<p> ${_("New students added: ")}
${ added_students }
<p> Students rejected:
<p> ${_("Students rejected: ")}
${ rejected_students }
<p> Debug:
<p> ${_("Debug: ")}
<p> ${ debug }
<p> foo
<p> bar
<p> biff
<p> ${_("foo")}
<p> ${_("bar")}
<p> ${_("biff")}
<%! from django.utils.translation import ugettext as _ %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>External Authentication failed</title>
<title>${_("External Authentication failed")}</title>
</head>
<body>
<h1>External Authentication failed</h1>
<h1>${_("External Authentication failed")}</h1>
<p>${message}</p>
</body>
</html>
<%! from django.utils.translation import ugettext as _ %>
<%!
from xmodule.util.date_utils import get_default_time_display
%>
<div class="folditbasic">
<p><strong>Due:</strong> ${get_default_time_display(due)}
<p><strong>${_("Due:")}</strong> ${get_default_time_display(due)}
<p>
<strong>Status:</strong>
<strong>${_("Status:")}</strong>
% if success:
You have successfully gotten to level ${goal_level}.
${_('You have successfully gotten to level {goal_level}.').format(goal_level=goal_level)}'
% 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
</p>
<h3>Completed puzzles</h3>
<h3>${_("Completed puzzles")}</h3>
<table>
<tr>
<th>Level</th>
<th>Submitted</th>
<th>${_("Level")}</th>
<th>${_("Submitted")}</th>
</tr>
% for puzzle in completed:
<tr>
......
<%! from django.utils.translation import ugettext as _ %>
<div class="folditchallenge">
<h3>Puzzle Leaderboard</h3>
<h3>${_("Puzzle Leaderboard")}</h3>
<table>
<tr>
<th>User</th>
<th>Score</th>
<th>${_("User")}</th>
<th>${_("Score")}</th>
</tr>
% for pair in top_scores:
<tr>
......
## mako
<%! from django.core.urlresolvers import reverse %>
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/>
<div class="wrapper wrapper-footer">
......@@ -9,27 +10,27 @@
<ol>
<li class="nav-colophon-01">
<a id="about" href="${marketing_link('ABOUT')}">
About
${_("About")}
</a>
</li>
<li class="nav-colophon-02">
<a id="jobs" href="${marketing_link('JOBS')}">
Jobs
${_("Jobs")}
</a>
</li>
<li class="nav-colophon-03">
<a id="press" href="${marketing_link('PRESS')}">
Press
${_("Press")}
</a>
</li>
<li class="nav-colophon-04">
<a id="faq" href="${marketing_link('FAQ')}">
FAQ
${_("FAQ")}
</a>
</li>
<li class="nav-colophon-05">
<a id="contact" href="${marketing_link('CONTACT')}">
Contact
${_("Contact")}
</a>
</li>
</ol>
......@@ -38,7 +39,7 @@
<div class="colophon-about">
<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>${_("{platform_name} 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. {platform_name}'s free online MOOCs are interactive and subjects include computer science, public health, and artificial intelligence.").format(platform_name="EdX", Harvard="Harvard", MIT="MIT")}</p>
</div>
</div>
......@@ -73,15 +74,15 @@
</ul>
</nav>
<p class="copyright">&copy; 2013 edX, some rights reserved.</p>
<p class="copyright">${_("&copy; 2013 {platform_name}, some rights reserved.").format(platform_name=settings.PLATFORM_NAME)}</p>
<nav class="nav-legal">
<ul>
<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 class="nav-legal-02">
<a href="${marketing_link('PRIVACY')}">Privacy Policy</a>
<a href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a>
</li>
</ul>
</nav>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %>
<section id="forgot-password-modal" class="modal forgot-password-modal">
<div class="inner-wrapper">
<div id="password-reset">
<header>
<h2>Password Reset</h2>
<h2>${_("Password Reset")}</h2>
</header>
<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>
<form id="pwd_reset_form" action="${reverse('password_reset')}" method="post" data-remote="true">
<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">
<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" />
<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>
</ol>
</fieldset>
<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>
</form>
</div>
......@@ -44,12 +46,12 @@
$("#password-reset").html(json.value);
} else {
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");
}
});
// removing close link's default behavior
$('#login-modal .close-modal').click(function(e) {
e.preventDefault();
......
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/>
<%! from datetime import datetime %>
<%! import pytz %>
......@@ -7,13 +9,13 @@
% if settings.MITX_FEATURES.get('ENABLE_FEEDBACK_SUBMISSION', False):
<div class="help-tab">
<a href="#help-modal" rel="leanModal">Help</a>
<a href="#help-modal" rel="leanModal">${_("Help")}</a>
</div>
<section id="help-modal" class="modal">
<div class="inner-wrapper" id="help_wrapper">
<header>
<h2><span class="edx">edX</span> Help</h2>
<h2>${_('{span_start}{platform_name}{span_end} Help').format(span_start='<span class="edx">', span_end='</span>').format(platform_name=settings.PLATFORM_NAME)}</h2>
<hr>
</header>
......@@ -22,22 +24,22 @@ discussion_link = get_discussion_link(course) if course else None
%>
% if discussion_link:
<p>For <strong>questions on course lectures, homework, tools, or materials for this course</strong>, post in the
<a href="${discussion_link}" target="_blank"/>course discussion forum</a>.
<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(
link_start='<a href="{url}" target="_blank">'.format(url=discussion_link),
link_end='</a>',
)}
</p>
% 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
support team directly:</p>
<p>${_('Have <strong>general questions about {platform_name}</strong>? You can find lots of helpful information in the {platform_name} {link_start}FAQ{link_end}.').format(link_start='<a href="/help" target="_blank">', link_end='</a>').format(platform_name=settings.PLATFORM_NAME)}</p>
<p>${_('Have a <strong>question about something specific</strong>? You can contact the {platform_name} general support team directly:').format(platform_name=settings.PLATFORM_NAME)}</p>
<hr>
<div class="help-buttons">
<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_question">Ask a question</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_question">${_('Ask a question')}</a>
</div>
## TODO: find a way to refactor this
......@@ -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">
<div id="feedback_error" class="modal-form-error"></div>
% if not user.is_authenticated():
<label data-field="name">Name*</label>
<label data-field="name">${_('Name*')}</label>
<input name="name" type="text">
<label data-field="email">E-mail*</label>
<label data-field="email">${_('E-mail*')}</label>
<input name="email" type="text">
% endif
<label data-field="subject">Briefly describe your issue*</label>
<label data-field="subject">${_('Briefly describe your issue*')}</label>
<input name="subject" type="text">
<label data-field="details">Tell us the details*
<span class="tip">Include error messages, steps which lead to the issue, etc</span></label>
<label data-field="details">${_('Tell us the details*')}
<span class="tip">${_('Include error messages, steps which lead to the issue, etc')}</span></label>
<textarea name="details"></textarea>
<input name="issue_type" type="hidden">
% if course:
......@@ -82,20 +84,31 @@ discussion_link = get_discussion_link(course) if course else None
<div class="inner-wrapper" id="feedback_success_wrapper">
<header>
<h2>Thank You!</h2>
<h2>${_('Thank You!')}</h2>
<hr>
</header>
<%
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>
Thank you for your inquiry or feedback. We typically respond to a
request within one business day (Monday to Friday,
${business_hours}.) In the meantime, please review our
<a href="/help" target="_blank">detailed FAQs</a>
where most questions have already been answered.
${_(
'Thank you for your inquiry or feedback. We typically respond to a request '
'within one business day (Monday to Friday, {open_time} UTC to {close_time} UTC.) In the meantime, please '
'review our {link_start}detailed FAQs{link_end} where most questions have '
'already been answered.'
).format(
open_time=open_time,
close_time=close_time,
link_start='<a href="/help" target="_blank">',
link_end='</a>'
)}
</p>
<div class="close-modal">
......@@ -129,28 +142,29 @@ discussion_link = get_discussion_link(course) if course else None
$("#feedback_link_problem").click(function(event) {
showFeedback(
event,
"problem",
"Report a Problem",
"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("problem"),
gettext("Report a Problem"),
gettext("Brief description of the problem*"),
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) {
showFeedback(
event,
"suggestion",
"Make a Suggestion",
"Brief description of your suggestion*",
"Details*"
gettext("suggestion"),
gettext("Make a Suggestion"),
gettext("Brief description of your suggestion*"),
gettext("Details*")
);
});
$("#feedback_link_question").click(function(event) {
showFeedback(
event,
"question",
"Ask a Question",
"Brief summary of your question*",
"Details*"
gettext("question"),
gettext("Ask a Question"),
gettext("Brief summary of your question*"),
gettext("Details*")
);
});
$("#feedback_form").submit(function() {
......@@ -175,13 +189,16 @@ discussion_link = get_discussion_link(course) if course else None
$("#feedback_error").html(responseData.error).stop().css("display", "block");
} else {
// If no data (or malformed data) is returned, a server error occurred
htmlStr = "An error has occurred.";
htmlStr = gettext("An error has occurred.");
% 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:
// If no email is configured, we can't do much other than
// ask the user to try again later
htmlStr += " Please try again later.";
htmlStr += gettext(" Please try again later.");
% endif
$("#feedback_error").html(htmlStr).stop().css("display", "block");
% if settings.FEEDBACK_SUBMISSION_EMAIL:
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %>
<%! from time import strftime %>
<%inherit file="main.html" />
......@@ -9,23 +11,23 @@
<div class="title">
<hgroup>
% if self.stanford_theme_enabled():
<h1>Free courses from <strong>Stanford</strong></h1>
<h1>${_("Free courses from <strong>{university_name}</strong>").format(university_name="Stanford")}</h1>
% else:
<h1>The Future of Online Education</h1>
<h1>${_("The Future of Online Education")}</h1>
% endif
<h2>For anyone, anywhere, anytime</h2>
<h2>${_("For anyone, anywhere, anytime")}</h2>
</hgroup>
## Disable social buttons for non-edX sites
% if not self.theme_enabled():
<section class="actions">
<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 class="secondary-actions">
<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 {platform_name} has to offer!").format(platform_name=settings.PLATFORM_NAME)}</div>
<a href="https://twitter.com/edXOnline" class="share">
<img src="${static.url('images/social/twitter-sharing.png')}">
</a>
......@@ -54,12 +56,12 @@
<section class="highlighted-courses">
## Disable university partner logos and sites for non-edX sites
% if not self.theme_enabled():
<h2>Explore free courses from <span class="edx">edX</span> universities</h2>
<h2>${_('Explore free courses from {span_start}{platform_name}{span_end} universities').format(platform_name="edX", span_start='<span class="edx">', span_end='</span>')}</h2>
<section class="university-partners university-partners2x6">
<ol class="partners">
<li class="partner mit">
<a href="${reverse('university_profile', args=['MITx'])}">
<a href="#">
<img src="${static.url('images/university/mit/mit.png')}" />
<div class="name">
<span>MITx</span>
......@@ -67,7 +69,7 @@
</a>
</li>
<li class="partner">
<a href="${reverse('university_profile', args=['HarvardX'])}">
<a href="#">
<img src="${static.url('images/university/harvard/harvard.png')}" />
<div class="name">
<span>HarvardX</span>
......@@ -75,7 +77,7 @@
</a>
</li>
<li class="partner">
<a href="${reverse('university_profile', args=['BerkeleyX'])}">
<a href="#">
<img src="${static.url('images/university/berkeley/berkeley.png')}" />
<div class="name">
<span>BerkeleyX</span>
......@@ -83,7 +85,7 @@
</a>
</li>
<li class="partner">
<a href="${reverse('university_profile', args=['UTx'])}">
<a href="#">
<img src="${static.url('images/university/ut/ut-rollover_350x150.png')}" />
<div class="name">
<span>UTx</span>
......@@ -91,7 +93,7 @@
</a>
</li>
<li class="partner">
<a href="${reverse('university_profile', args=['McGillX'])}">
<a href="#">
<img src="${static.url('images/university/mcgill/mcgill.png')}" />
<div class="name">
<span>McGillX</span>
......@@ -99,7 +101,7 @@
</a>
</li>
<li class="partner">
<a href="${reverse('university_profile', args=['ANUx'])}">
<a href="#">
<img src="${static.url('images/university/anu/anu.png')}" />
<div class="name">
<span>ANUx</span>
......@@ -112,7 +114,7 @@
<ol class="partners">
<li class="partner">
<a href="${reverse('university_profile', args=['WellesleyX'])}">
<a href="#">
<img src="${static.url('images/university/wellesley/wellesley-rollover_350x150.png')}" />
<div class="name">
<span>WellesleyX</span>
......@@ -120,7 +122,7 @@
</a>
</li>
<li class="partner">
<a href="${reverse('university_profile', args=['GeorgetownX'])}">
<a href="#">
<img src="${static.url('images/university/georgetown/georgetown-rollover_350x150.png')}" />
<div class="name">
<span>GeorgetownX</span>
......@@ -128,7 +130,7 @@
</a>
</li>
<li class="partner">
<a href="${reverse('university_profile', args=['TorontoX'])}">
<a href="#">
<img src="${static.url('images/university/toronto/toronto.png')}" />
<div class="name">
<span>University of TorontoX</span>
......@@ -136,7 +138,7 @@
</a>
</li>
<li class="partner">
<a href="${reverse('university_profile', args=['EPFLx'])}">
<a href="#">
<img src="${static.url('images/university/epfl/epfl.png')}" />
<div class="name">
<span>EPFLx</span>
......@@ -144,7 +146,7 @@
</a>
</li>
<li class="partner">
<a href="${reverse('university_profile', args=['DelftX'])}">
<a href="#">
<img src="${static.url('images/university/delft/delft.png')}" />
<div class="name">
<span>DelftX</span>
......@@ -152,7 +154,7 @@
</a>
</li>
<li class="partner">
<a href="${reverse('university_profile', args=['RiceX'])}">
<a href="#">
<img src="${static.url('images/university/rice/rice.png')}" />
<div class="name">
<span>RiceX</span>
......@@ -174,46 +176,6 @@
</section>
</section>
</section>
## Disable press and marketing for non-edX sites
% if not self.theme_enabled():
<section class="container">
<section class="more-info">
<header>
<h2><span class="edx">edX</span> News &amp; Announcements</h2>
<a class="action action-mediakit" href="${reverse('media-kit')}"> <span class="org-name">edX</span> MEDIA KIT</a>
</header>
<section class="news">
<section class="blog-posts">
%for entry in news:
<article>
%if entry.image:
<a href="${entry.link}" class="post-graphics" target="_blank"><img src="${entry.image}" /></a>
%endif
<div class="post-name">
<a href="${entry.link}" target="_blank">${entry.title}</a>
%if entry.summary:
<p>${entry.summary}</p>
%endif
<p class="post-date">${strftime("%m/%d/%y", entry.published_parsed)}</p>
</div>
</article>
%endfor
</section>
<section class="press-links">
<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://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.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 href="${reverse('press')}" class="read-more">Read More &rarr;</a>
</section>
</section>
</section>
</section>
% endif
</section>
<section id="video-modal" class="modal home-page-video-modal video-modal">
......@@ -228,9 +190,8 @@
</div>
</section>
<%block name="js_extra">
<script type="text/javascript"">
<script type="text/javascript">
$(window).load(function() {
if(getParameterByName('next')) {
$('#login').trigger("click");
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/>
......@@ -6,7 +7,7 @@
<%static:css group='course'/>
</%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'" />
......@@ -17,7 +18,7 @@
<section class="container">
<div class="staff-grading" data-ajax_url="${ajax_url}">
<h1>Staff grading</h1>
<h1>${_("Staff grading")}</h1>
<div class="breadcrumbs">
</div>
<div class="error-container">
......@@ -27,12 +28,12 @@
<! -- Problem List View -->
<section class="problem-list-container">
<h2>Instructions</h2>
<h2>${_("Instructions")}</h2>
<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>
<h2>Problem List</h2>
<h2>${_("Problem List")}</h2>
<table class="problem-list">
</table>
</section>
......@@ -48,7 +49,7 @@
</div>
</div>
<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>
</div>
......@@ -56,14 +57,14 @@
</section>
<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>
<section class="grading-wrapper">
<div class="grading-container">
<div class="submission-wrapper">
<h3>Student Response</h3>
<h3>${_("Student Response")}</h3>
<div class="submission-container">
</div>
</div>
......@@ -72,18 +73,18 @@
</p>
<p class="grade-selection-container">
</p>
<h3>Written Feedback</h3>
<textarea name="feedback" placeholder="Feedback for student (optional)"
<h3>${_("Written Feedback")}</h3>
<textarea name="feedback" placeholder="${_("Feedback for student (optional)")}"
class="feedback-area" cols="70" ></textarea>
<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>
</div>
<div class="submission">
<input type="button" value="Submit" class="submit-button" name="show"/>
<input type="button" value="Skip" class="skip-button" name="skip"/>
<input type="button" value="${_("Submit")}" class="submit-button" name="show"/>
<input type="button" value="${_("Skip")}" class="skip-button" name="skip"/>
</div>
</div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" />
<section class="container activation">
<section class="message">
<h1 class="invalid">Invalid email change key</h1>
<h1 class="invalid">${_("Invalid email change key")}</h1>
<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>
<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>The keys are valid for a limited amount of time. Has the key expired?
<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>${_("The keys are valid for a limited amount of time. Has the key expired?")}
</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>
<%! from django.utils.translation import ugettext as _ %>
<dl>
% for license in licenses:
<dt> ${license.software.name}: </dt>
% if license.serial:
<dd> ${license.serial} </dd>
% else:
<dd> None Available </dd>
<dd> ${_("None Available")} </dd>
% endif
% endfor
</dl>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" />
<%namespace name='static' file='static_content.html'/>
......@@ -5,7 +7,7 @@
<%! from django.core.urlresolvers import reverse %>
<%! 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">
<script type="text/javascript">
......@@ -66,13 +68,13 @@
$submitButton.
removeClass('is-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 {
$submitButton.
addClass('is-disabled').
prop('disabled', true).
html('Processing your account information &hellip;');
html(gettext('Processing your account information &hellip;'));
}
}
</script>
......@@ -90,46 +92,46 @@
<!-- status messages -->
<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>
</div>
<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">
<li>Your email or password is incorrect</li>
<li>${_("Your email or password is incorrect")}</li>
</ul>
</div>
<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>
<fieldset class="group group-form group-form-requiredinformation">
<legend class="sr">Required Information</legend>
<legend class="sr">${_('Required Information')}</legend>
<ol class="list-input">
<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" />
</li>
<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" />
<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>
</li>
</ol>
</fieldset>
<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">
<li class="field required checkbox" id="field-remember">
<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>
</ol>
</fieldset>
......@@ -147,27 +149,27 @@
<aside role="complementary">
<header>
<h2 class="sr">Helpful Information</h2>
<h2 class="sr">${_("Helpful Information")}</h2>
</header>
% if settings.MITX_FEATURES.get('AUTH_USE_OPENID'):
<!-- <div class="cta cta-login-options-openid">
<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>
<a class="action action-login-openid" href="#">Login via OpenID</a>
<h3>${_("Login via OpenID")}</h3>
<p>${_('You can now start learning with {platform_name} by logging in with your <a rel="external" href="http://openid.net/">OpenID account</a>.').format(platform_name=settings.PLATFORM_NAME)}</p>
<a class="action action-login-openid" href="#">${_("Login via OpenID")}</a>
</div> -->
% endif
<div class="cta cta-help">
<h3>Not Enrolled?</h3>
<p><a href="${reverse('register_user')}">Sign up for ${settings.PLATFORM_NAME} today!</a></p>
<h3>${_("Not Enrolled?")}</h3>
<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
% if settings.MKTG_URL_LINK_MAP.get('FAQ'):
<h3>Need Help?</h3>
<p>Looking for help in logging in or with your ${settings.PLATFORM_NAME} account?
<h3>${_("Need Help?")}</h3>
<p>${_("Looking for help in logging in or with your {platform_name} account?").format(platform_name=settings.PLATFORM_NAME)}
<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>
% endif
</div>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %>
<%namespace name='static' file='static_content.html'/>
<section id="login-modal" class="modal login-modal">
<div class="inner-wrapper">
<header>
<h2>Log In</h2>
<h2>${_("Log In")}</h2>
<hr>
</header>
<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" />
<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;" />
<label for="login_remember_me" class="remember-me">
<input id="login_remember_me" type="checkbox" name="remember" value="true" />
Remember me
${_("Remember me")}
</label>
<div class="submit">
<input name="submit" type="submit" value="Access My Courses">
<input name="submit" type="submit" value="${_('Access My Courses')}">
</div>
</form>
<section class="login-extra">
<p>
<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>
<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>
</p>
% if settings.MITX_FEATURES.get('AUTH_USE_OPENID'):
<p>
<a href="${MITX_ROOT_URL}/openid/login/">login via openid</a>
<a href="${MITX_ROOT_URL}/openid/login/">${_('login via openid')}</a>
</p>
% endif
</section>
......
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/>
<%! from django.utils import html %>
......@@ -18,10 +20,11 @@
<head>
<%block name="title">
% if stanford_theme_enabled():
<title>Home | class.stanford.edu</title>
<title>${_("Home")} | class.stanford.edu</title>
% else:
## "edX" should not be translated
<title>edX</title>
<script type="text/javascript">
/* immediately break out of an iframe if coming from the marketing website */
(function(window) {
......@@ -33,6 +36,8 @@
% endif
</%block>
<script type="text/javascript" src="/jsi18n/"></script>
<link rel="icon" type="image/x-icon" href="${static.url(settings.FAVICON_PATH)}" />
<%static:css group='application'/>
......
......@@ -2,18 +2,19 @@
{% load compressed %}{% load sekizai_tags i18n %}{% load url from future %}{% load staticfiles %}
<html>
<head>
{# "edX" should *not* be translated #}
{% block title %}<title>edX</title>{% endblock %}
<link rel="icon" type="image/x-icon" href="{% static "images/favicon.ico" %}" />
{% compressed_css 'application' %}
{% block main_vendor_js %}
{% compressed_js 'main_vendor' %}
{% endblock %}
{% block headextra %}{% endblock %}
{% render_block "css" %}
<!--[if lt IE 9]>
<script src="${static.url('js/html5shiv.js')}"></script>
<![endif]-->
......@@ -30,12 +31,12 @@
{% block body %}{% endblock %}
{% block bodyextra %}{% endblock %}
</section>
{% include "footer.html" %}
{% compressed_js 'application' %}
{% compressed_js 'module-js' %}
{% render_block "js" %}
</body>
</html>
......@@ -45,8 +46,8 @@
other pages inherit. This file should be rewritten to reflect any
changes in main.html! Files used by {% include %} can be written
as mako templates.
Inheriting from this file allows us to include apps that use the
django templating system without rewriting all of their views in
mako.
mako.
{% endcomment %}
<%! from django.utils.translation import ugettext as _ %>
<section class="outside-app">
<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>
<h1>${_("There has been an error on the <em>{platform_name}</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:{tech_support_email}\">{tech_support_email}</a> to report any problems or downtime.").format(platform_name=settings.PLATFORM_NAME, tech_support_email=settings.TECH_SUPPORT_EMAIL)}</p>
% if staff_access:
<h1>Details</h1>
<h1>${_("Details")}</h1>
<p>Error:
<p>${_("Error:")}
<pre>
${error | h}
</pre>
</p>
<p>Raw data:
<p>${_("Raw data:")}
<pre>${data | h}</pre>
</p>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" />
<script>
function name_confirm(id) {
postJSON('/accept_name_change',{"id":id},
function(data){
if(data.success){
$("#div"+id).html("Accepted");
$("#div"+id).html(${_("Accepted")});
} else {
alert('Error');
}
alert(${_('Error'));
} }
});
}
......@@ -15,10 +17,10 @@ function name_deny(id) {
postJSON('/reject_name_change',{"id":id},
function(data){
if(data.success){
$("#div"+id).html("Rejected");
$("#div"+id).html(${_("Rejected")});
} else {
alert('Error');
}
alert(${_('Error'));
} }
});
}
</script>
......@@ -26,7 +28,7 @@ function name_deny(id) {
<section class="container">
<div class="gradebook-wrapper">
<section class="gradebook-content">
<h1>Pending name changes</h1>
<h1>${_("Pending name changes")}</h1>
<table>
% for s in students:
<tr>
......@@ -34,8 +36,8 @@ function name_deny(id) {
<td>${s['new_name']|h}</td>
<td>${s['email']|h}</td>
<td>${s['rationale']|h}</td>
<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>
<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>
% endfor
</table>
</section>
......
......@@ -3,6 +3,7 @@
<%namespace file='main.html' import="login_query, stanford_theme_enabled"/>
<%!
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
# App that handles subdomain specific branding
import branding
......@@ -34,16 +35,16 @@ site_status_msg = get_site_status_msg(course_id)
% if course:
<header class="global slim" aria-label="Global Navigation">
<header class="global slim" aria-label="${_('Global Navigation')}">
% else:
<header class="global" aria-label="Global Navigation">
<header class="global" aria-label="${_('Global Navigation')}">
% endif
<nav>
<h1 class="logo">
<a href="${marketing_link('ROOT')}">
<%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="${_('{settings.PLATFORM_NAME} home')}" />
</%block>
</a>
</h1>
......@@ -57,7 +58,7 @@ site_status_msg = get_site_status_msg(course_id)
<ol class="left nav-global authenticated">
<%block name="navigation_global_links_authenticated">
<li class="nav-global-01">
<a href="${marketing_link('COURSES')}">Find Courses</a>
<a href="${marketing_link('COURSES')}">${_('Find Courses')}</a>
</li>
</%block>
</ol>
......@@ -65,16 +66,16 @@ site_status_msg = get_site_status_msg(course_id)
<li class="primary">
<a href="${reverse('dashboard')}" class="user-link">
<span class="avatar"></span>
<span class="sr">Dashboard for: </span> ${user.username}
<span class="sr">${_("Dashboard for:")} </span> ${user.username}
</a>
</li>
<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">
<%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>
<li><a href="${reverse('logout')}">Log Out</a></li>
<li><a href="${reverse('logout')}">${_("Log Out")}</a></li>
</ul>
</li>
</ol>
......@@ -84,24 +85,24 @@ site_status_msg = get_site_status_msg(course_id)
<%block name="navigation_global_links">
% if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'):
<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 class="nav-global-02">
<a href="${marketing_link('COURSES')}">Courses</a>
<a href="${marketing_link('COURSES')}">${_("Courses")}</a>
</li>
<li class="nav-global-03">
<a href="${marketing_link('SCHOOLS')}">Schools</a>
<a href="${marketing_link('SCHOOLS')}">${_("Schools")}</a>
</li>
% endif
</%block>
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
% if course and settings.MITX_FEATURES.get('RESTRICT_ENROLL_BY_REG_METHOD') and course.enrollment_domain:
<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>
% else:
<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>
% endif
% endif
......@@ -111,9 +112,9 @@ site_status_msg = get_site_status_msg(course_id)
<li class="nav-courseware-01">
% if not settings.MITX_FEATURES['DISABLE_LOGIN_BUTTON']:
% 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:
<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
</li>
......@@ -122,7 +123,7 @@ site_status_msg = get_site_status_msg(course_id)
</nav>
</header>
% 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
%if not user.is_authenticated():
......
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/>
<%inherit file="main.html" />
<%!
......@@ -55,27 +57,24 @@
<section class="container">
<div class="notes-wrapper">
<h1>My Notes</h1>
<h1>${_("My Notes")}</h1>
% for note in notes:
<div class="note">
<blockquote>${note.quote|h}</blockquote>
<div class="text">${note.text.replace("\n", "<br />") | n,h}</div>
<ul class="meta">
% if note.tags:
<li class="tags">Tags: ${note.tags|h}</li>
<li class="tags">${_("Tags: {tags}").format(tags=note.tags) | h}</li>
% endif
<li class="user">Author: ${note.user.username}</li>
<li class="time">Created: ${note.created.strftime('%m/%d/%Y %H:%m')}</li>
<li class="uri">Source: <a href="${note.uri}">${note.uri|h}</a></li>
<li class="user">${_('Author: {username}').format(username=note.user.username)}</li>
<li class="time">${_('Created: {datetime}').format(datetime=note.created.strftime('%m/%d/%Y %H:%m'))}</li>
<li class="uri">${_('Source: {link}').format(link='<a href="{url}">{url}</a>'.format(url=note.uri))}</li>
</ul>
</div>
% endfor
% 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
</div>
</section>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/>
......@@ -6,7 +7,7 @@
<%static:css group='course'/>
</%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'" />
......@@ -14,13 +15,13 @@
<section class="container">
<div class="combined-notifications" data-ajax_url="${ajax_url}">
<div class="error-container">${error_text}</div>
<h1>Open Ended Console</h1>
<h2>Instructions</h2>
<p>Here are items that could potentially need your attention.</p>
<h1>${_("Open Ended Console")}</h1>
<h2>${_("Instructions")}</h2>
<p>${_("Here are items that could potentially need your attention.")}</p>
% if success:
% if len(notification_list) == 0:
<div class="message-container">
No items require attention at the moment.
${_("No items require attention at the moment.")}
</div>
%else:
<div class="notification-container">
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/>
......@@ -6,7 +7,7 @@
<%static:css group='course'/>
</%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'" />
......@@ -17,19 +18,19 @@
<section class="container">
<div class="open-ended-problems" data-ajax_url="${ajax_url}">
<div class="error-container">${error_text}</div>
<h1>Flagged Open Ended Problems</h1>
<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>
<h1>${_("Flagged Open Ended Problems")}</h1>
<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>
% if success:
% if len(problem_list) == 0:
<div class="message-container">
No flagged problems exist.
${_("No flagged problems exist.")}
</div>
%else:
<table class="problem-list">
<tr>
<th>Name</th>
<th>Response</th>
<th>${_("Name")}</th>
<th>${_("Response")}</th>
<th></th>
<th></th>
</tr>
......@@ -42,10 +43,10 @@
${problem['student_response']}
</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>
<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>
<div class="action-taken"></div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="/main.html" />
<%block name="bodyclass">${course.css_class}</%block>
<%namespace name='static' file='/static_content.html'/>
......@@ -6,7 +7,7 @@
<%static:css group='course'/>
</%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'" />
......@@ -14,31 +15,31 @@
<section class="container">
<div class="open-ended-problems" data-ajax_url="${ajax_url}">
<div class="error-container">${error_text}</div>
<h1>Open Ended Problems</h1>
<h2>Instructions</h2>
<p>Here are a list of open ended problems for this course.</p>
<h1>${_("Open Ended Problems")}</h1>
<h2>${_("Instructions")}</h2>
<p>${_("Here are a list of open ended problems for this course.")}</p>
% if success:
% if len(problem_list) == 0:
<div class="message-container">
You have not attempted any open ended problems yet.
${_("You have not attempted any open ended problems yet.")}
</div>
%else:
<table class="problem-list">
<tr>
<th>Problem Name</th>
<th>Status</th>
<th>Grader Type</th>
<th>ETA</th>
<th>${_("Problem Name")}</th>
<th>${_("Status")}</th>
<th>${_("Grader Type")}</th>
<th>${_("ETA")}</th>
</tr>
%for problem in problem_list:
<tr>
<td>
<a href="${problem['actual_url']}">${problem['problem_name']}</a>
<a href="${problem['actual_url']}">${problem['problem_name']}</a>
</td>
<td>
${problem['state']}
${problem['state']}
</td>
<td>
<td>
${problem['grader_type']}
</td>
<td>
......
<%! from django.utils.translation import ugettext as _ %>
<section class="container peer-grading-container">
<div class="peer-grading" data-ajax-url="${ajax_url}" data-use-single-location="${use_single_location}">
<div class="error-container">${error_text}</div>
<h1>Peer Grading</h1>
<h2>Instructions</h2>
<p>Here are a list of problems that need to be peer graded for this course.</p>
<h1>${_("Peer Grading")}</h1>
<h2>${_("Instructions")}</h2>
<p>${_("Here are a list of problems that need to be peer graded for this course.")}</p>
% if success:
% if len(problem_list) == 0:
<div class="message-container">
Nothing to grade!
${_("Nothing to grade!")}
</div>
%else:
<div class="problem-list-container">
<table class="problem-list">
<tr>
<th>Problem Name</th>
<th>Due date</th>
<th>Graded</th>
<th>Available</th>
<th>Required</th>
<th>Progress</th>
<th>${_("Problem Name")}</th>
<th>${_("Due date")}</th>
<th>${_("Graded")}</th>
<th>${_("Available")}</th>
<th>${_("Required")}</th>
<th>${_("Progress")}</th>
</tr>
%for problem in problem_list:
<tr data-graded="${problem['num_graded']}" data-required="${problem['num_required']}">
......@@ -33,7 +34,7 @@
% if problem['due']:
${problem['due']}
% else:
No due date
${_("No due date")}
% endif
</td>
<td>
......
<%! from django.utils.translation import ugettext as _ %>
<section class="container peer-grading-container">
<h2>Peer Grading</h2>
<p>The due date has passed, and
<h2>${_("Peer Grading")}</h2>
% 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:
peer grading is closed at this time.
<p>${_("The due date has passed, and peer grading is closed at this time.")} </p>
%endif
</p>
</section>
<%! from django.utils.translation import ugettext as _ %>
<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="error-container"></div>
......@@ -5,15 +6,15 @@
<section class="content-panel">
<div class="instructions-panel">
<div class="calibration-panel">
<h3>Learning to Grade</h3>
<h3>${_("Learning to Grade")}</h3>
</div>
<div class="grading-panel">
<h3>Peer Grading</h3>
<h3>${_("Peer Grading")}</h3>
</div>
</div>
<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">
<section>
<div class="prompt-container">
......@@ -25,7 +26,7 @@
<section class="grading-wrapper">
<h2>Student Response</h2>
<h2>${_("Student Response")}</h2>
<div class="grading-container">
<div class="submission-wrapper">
......@@ -39,17 +40,17 @@
<p class="rubric-selection-container"></p>
<p class="score-selection-container">
</p>
<h3>Written Feedback</h3>
<p>Please include some written feedback as well.</p>
<h3>${_("Written Feedback")}</h3>
<p>${_("Please include some written feedback as well.")}</p>
<textarea name="feedback" placeholder="Feedback for student"
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="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="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>
<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>
......@@ -60,41 +61,41 @@
</section>
<!-- Calibration feedback: Shown after a calibration is sent -->
<section class="calibration-feedback">
<h2>How did I do?</h2>
<h2>${_("How did I do?")}</h2>
<div class="calibration-feedback-wrapper">
</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>
<!-- Interstitial Page: Shown between calibration and grading steps -->
<section class="interstitial-page">
<h1>Ready to grade!</h1>
<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" />
<h1>${_("Ready to grade!")}</h1>
<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" />
</section>
<!-- Calibration Interstitial Page: Shown before calibration -->
<section class="calibration-interstitial-page">
<h1>Learning to grade</h1>
<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> 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" />
<h1>${_("Learning to grade")}</h1>
<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>${_("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" />
</section>
<!-- Flag submission confirmation dialog -->
<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>
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>
<div>
<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-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" />
</div>
</section>
<input type="button" value="Go Back" class="action-button" name="back" />
<input type="button" value="${_("Go Back")}" class="action-button" name="back" />
</div>
</section>
<%! from django.utils.translation import ugettext as _ %>
<%namespace name='static' file='static_content.html'/>
<h2 class="problem-header">
${ problem['name'] }
......@@ -16,17 +18,17 @@
<input class="check ${ check_button }" type="button" value="${ check_button }" />
% endif
% if reset_button:
<input class="reset" type="button" value="Reset" />
<input class="reset" type="button" value="${_('Reset')}" />
% endif
% if save_button:
<input class="save" type="button" value="Save" />
<input class="save" type="button" value="${_('Save')}" />
% endif
% 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
% if attempts_allowed :
<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>
% endif
</section>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="main.html" />
<%namespace name='static' file='static_content.html'/>
......@@ -32,19 +34,19 @@
<section id="login-modal" class="modal login-modal openid-login">
<div class="inner-wrapper">
<header>
<h2>Log In</h2>
<h2>${_("Log In")}</h2>
<hr>
</header>
<form id="login_form" class="login_form" method="post" action="/openid/provider/login/">
%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
<label>E-mail</label>
<input type="text" name="email" placeholder="E-mail" tabindex="1" autofocus="autofocus" />
<label>Password</label>
<input type="password" name="password" placeholder="Password" tabindex="2" />
<label>${_("E-mail")}</label>
<input type="text" name="email" placeholder="${_('E-mail')}" tabindex="1" autofocus="autofocus" />
<label>${_("Password")}</label>
<input type="password" name="password" placeholder="${_('Password')}" tabindex="2" />
<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>
</form>
</div>
......
<h2>Thanks For Registering!</h2>
<p class='activation-message'>Your account is not active yet. An activation link has been sent to <strong>${ email }</strong>, along with
instructions for activating your account.</p>
<%! from django.utils.translation import ugettext as _ %>
<h2>${_("Thanks For Registering!")}</h2>
<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 %>
<%inherit file="../main.html" />
......@@ -7,23 +8,23 @@
<section class="message">
%if not already_active:
<h1 class="valid">Activation Complete!</h1>
<h1 class="valid">${_("Activation Complete!")}</h1>
%else:
<h1>Account already active!</h1>
<h1>${_("Account already active!")}</h1>
%endif
<hr class="horizontal-divider">
<p>
%if not already_active:
Thanks for activating your account.
${_("Thanks for activating your account.")}
%else:
This account has already been activated.
${_("This account has already been activated.")}
%endif
%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:
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
</p>
</section>
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %>
<%inherit file="../main.html" />
......@@ -6,14 +7,14 @@
<section class="container activation">
<section class="message">
<h1 class="invalid">Activation Invalid</h1>
<h1 class="invalid">${_("Activation Invalid")}</h1>
<hr class="horizontal-divider">
<p>Something went wrong. Check to make sure the URL you went to was
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
at <a href="mailto:${settings.BUGS_EMAIL}">${settings.BUGS_EMAIL}</a>.</p>
<p>${_('Something went wrong. Check to make sure the URL you went to was '
'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 '
'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>
<%! from django.utils.translation import ugettext as _ %>
{% extends "registration/base.html" %}
{% block title %}Log in{% endblock %}
{% block title %}${_("Log in")}{% endblock %}
{% block content %}
<h1>Log in</h1>
<h1>${_("Log in")}</h1>
{% if form.errors %}
<p class="error">Please correct the errors below:</p>
<p class="error">${_("Please correct the errors below:")}</p>
{% endif %}
<form method="post" action="?next={{ next|default:"/" }}">
{% csrf_token %}
<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>
<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>
<dt><input type="submit" value="Log in" /></dt>
<dt><input type="submit" value="${_("Log in")}" /></dt>
</dl>
</form>
{% endblock %}
{% block content-related %}
<p>If you don't have an account, you can <a href="/accounts/register/">sign
up</a> for one.
<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>')}
{% endblock %}
<%! from django.utils.translation import ugettext as _ %>
{% extends "registration/base.html" %}
{% block title %}Logged out{% endblock %}
{% block title %}${_("Logged out")}{% endblock %/}
{% block content %}
<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>
{% endblock %}
\ No newline at end of file
<h1>${_("You've been logged out.")}</h1>
<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 %}
<%! from django.utils.translation import ugettext as _ %>
{% load i18n %}
{% load compressed %}
{% load staticfiles %}
......@@ -5,7 +6,7 @@
<html>
<head>
<title>Your Password Reset is Complete</title>
<title>${_("Your Password Reset is Complete")}</title>
{% compressed_css 'application' %}
......@@ -53,13 +54,13 @@
<section class="passwordreset container">
<section class="introduction">
<header>
<h1>Your Password Reset is Complete</h1>
<h1>${_("Your Password Reset is Complete")}</h1>
</header>
</section>
{% block 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>
{% endblock %}
</section>
......
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