Commit a6f349da by David Baumgold

Studio i18n

parent 871ab87b
...@@ -9,12 +9,13 @@ import copy ...@@ -9,12 +9,13 @@ import copy
import logging import logging
import re import re
from xmodule.modulestore.draft import DIRECT_ONLY_CATEGORIES from xmodule.modulestore.draft import DIRECT_ONLY_CATEGORIES
from django.utils.translation import ugettext as _
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
# In order to instantiate an open ended tab automatically, need to have this data # In order to instantiate an open ended tab automatically, need to have this data
OPEN_ENDED_PANEL = {"name": "Open Ended Panel", "type": "open_ended"} OPEN_ENDED_PANEL = {"name": _("Open Ended Panel"), "type": "open_ended"}
NOTES_PANEL = {"name": "My Notes", "type": "notes"} NOTES_PANEL = {"name": _("My Notes"), "type": "notes"}
EXTRA_TAB_PANELS = dict([(p['type'], p) for p in [OPEN_ENDED_PANEL, NOTES_PANEL]]) EXTRA_TAB_PANELS = dict([(p['type'], p) for p in [OPEN_ENDED_PANEL, NOTES_PANEL]])
......
...@@ -13,7 +13,7 @@ from xmodule.modulestore.django import modulestore ...@@ -13,7 +13,7 @@ from xmodule.modulestore.django import modulestore
from ..utils import get_course_for_item, get_modulestore from ..utils import get_course_for_item, get_modulestore
from .access import get_location_and_verify_access from .access import get_location_and_verify_access
__all__ = ['edit_tabs', 'reorder_static_tabs', 'static_pages', 'edit_static'] __all__ = ['edit_tabs', 'reorder_static_tabs', 'static_pages']
def initialize_course_tabs(course): def initialize_course_tabs(course):
...@@ -127,7 +127,3 @@ def static_pages(request, org, course, coursename): ...@@ -127,7 +127,3 @@ def static_pages(request, org, course, coursename):
return render_to_response('static-pages.html', { return render_to_response('static-pages.html', {
'context_course': course, 'context_course': course,
}) })
def edit_static(request, org, course, coursename):
return render_to_response('edit-static-page.html', {})
...@@ -2,6 +2,7 @@ from django.conf import settings ...@@ -2,6 +2,7 @@ from django.conf import settings
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext as _
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from mitxmako.shortcuts import render_to_response from mitxmako.shortcuts import render_to_response
...@@ -78,7 +79,7 @@ def add_user(request, location): ...@@ -78,7 +79,7 @@ def add_user(request, location):
if not email: if not email:
msg = { msg = {
'Status': 'Failed', 'Status': 'Failed',
'ErrMsg': 'Please specify an email address.', 'ErrMsg': _('Please specify an email address.'),
} }
return JsonResponse(msg, 400) return JsonResponse(msg, 400)
...@@ -92,7 +93,7 @@ def add_user(request, location): ...@@ -92,7 +93,7 @@ def add_user(request, location):
if user is None: if user is None:
msg = { msg = {
'Status': 'Failed', 'Status': 'Failed',
'ErrMsg': "Could not find user by email address '{0}'.".format(email), 'ErrMsg': _("Could not find user by email address '{email}'.").format(email=email),
} }
return JsonResponse(msg, 404) return JsonResponse(msg, 404)
...@@ -100,7 +101,7 @@ def add_user(request, location): ...@@ -100,7 +101,7 @@ def add_user(request, location):
if not user.is_active: if not user.is_active:
msg = { msg = {
'Status': 'Failed', 'Status': 'Failed',
'ErrMsg': 'User {0} has registered but has not yet activated his/her account.'.format(email), 'ErrMsg': _('User {email} has registered but has not yet activated his/her account.').format(email=email),
} }
return JsonResponse(msg, 400) return JsonResponse(msg, 400)
...@@ -129,7 +130,7 @@ def remove_user(request, location): ...@@ -129,7 +130,7 @@ def remove_user(request, location):
if user is None: if user is None:
msg = { msg = {
'Status': 'Failed', 'Status': 'Failed',
'ErrMsg': "Could not find user by email address '{0}'.".format(email), 'ErrMsg': _("Could not find user by email address '{email}'.").format(email=email),
} }
return JsonResponse(msg, 404) return JsonResponse(msg, 404)
......
...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
class="course-checklist" class="course-checklist"
<% } %> <% } %>
id="<%= 'course-checklist' + checklistIndex %>"> id="<%= 'course-checklist' + checklistIndex %>">
<% var widthPercentage = 'width:' + percentChecked + '%;'; %> <span class="viz viz-checklist-status"><span class="viz value viz-checklist-status-value" style="width: <%= percentChecked %>%;">
<span class="viz viz-checklist-status"><span class="viz value viz-checklist-status-value" style="<%= widthPercentage %>"> <%= _.template(gettext("{number}% of checklists completed"), {number: '<span class="int">' + percentChecked + '</span>'}, {interpolate: /\{(.+?)\}/g}) %>
<span class="int"><%= percentChecked %></span>% of checklist completed</span></span> </span></span>
<header> <header>
<h3 class="checklist-title title-2 is-selectable" title="Collapse/Expand this Checklist"> <h3 class="checklist-title title-2 is-selectable" title="Collapse/Expand this Checklist">
<i class="icon-caret-down ui-toggle-expansion"></i> <i class="icon-caret-down ui-toggle-expansion"></i>
<%= checklistShortDescription %></h3> <%= checklistShortDescription %></h3>
<span class="checklist-status status"> <span class="checklist-status status">
Tasks Completed: <span class="status-count"><%= itemsChecked %></span>/<span class="status-amount"><%= items.length %></span> <%= gettext("Tasks Completed:") %> <span class="status-count"><%= itemsChecked %></span>/<span class="status-amount"><%= items.length %></span>
<i class="icon-ok"></i> <i class="icon-ok"></i>
</span> </span>
</header> </header>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<li class="action-item"> <li class="action-item">
<a href="<%= item['action_url'] %>" class="action action-primary" <a href="<%= item['action_url'] %>" class="action action-primary"
<% if (item['action_external']) { %> <% if (item['action_external']) { %>
rel="external" title="This link will open in a new browser window/tab" rel="external" title="<%= gettext("This link will open in a new browser window/tab") %>"
<% } %> <% } %>
><%= item['action_text'] %></a> ><%= item['action_text'] %></a>
</li> </li>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<%= model.get('data') %> <%= model.get('data') %>
</div> </div>
<% } else {%> <% } else {%>
<p>You have no handouts defined</p> <p>${_("You have no handouts defined")}</p>
<% } %> <% } %>
<form class="edit-handouts-form" style="display: block;"> <form class="edit-handouts-form" style="display: block;">
<div class="row"> <div class="row">
......
{ {
"static_files": [ "static_files": [
"../jsi18n/",
"js/vendor/RequireJS.js", "js/vendor/RequireJS.js",
"js/vendor/jquery.min.js", "js/vendor/jquery.min.js",
"js/vendor/jquery-ui.min.js", "js/vendor/jquery-ui.min.js",
......
...@@ -79,10 +79,10 @@ $(document).ready(function() { ...@@ -79,10 +79,10 @@ $(document).ready(function() {
}); });
// general link management - new window/tab // general link management - new window/tab
$('a[rel="external"]').attr('title', 'This link will open in a new browser window/tab').bind('click', linkNewWindow); $('a[rel="external"]').attr('title', gettext('This link will open in a new browser window/tab')).bind('click', linkNewWindow);
// general link management - lean modal window // general link management - lean modal window
$('a[rel="modal"]').attr('title', 'This link will open in a modal window').leanModal({ $('a[rel="modal"]').attr('title', gettext('This link will open in a modal window')).leanModal({
overlay: 0.50, overlay: 0.50,
closeButton: '.action-modal-close' closeButton: '.action-modal-close'
}); });
...@@ -199,8 +199,10 @@ function toggleSections(e) { ...@@ -199,8 +199,10 @@ function toggleSections(e) {
$section = $('.courseware-section'); $section = $('.courseware-section');
sectionCount = $section.length; sectionCount = $section.length;
$button = $(this); $button = $(this);
$labelCollapsed = $('<i class="icon-arrow-up"></i> <span class="label">Collapse All Sections</span>'); $labelCollapsed = $('<i class="icon-arrow-up"></i> <span class="label">' +
$labelExpanded = $('<i class="icon-arrow-down"></i> <span class="label">Expand All Sections</span>'); gettext('Collapse All Sections') + '</span>');
$labelExpanded = $('<i class="icon-arrow-down"></i> <span class="label">' +
gettext('Expand All Sections') + '</span>');
var buttonLabel = $button.hasClass('is-activated') ? $labelCollapsed : $labelExpanded; var buttonLabel = $button.hasClass('is-activated') ? $labelCollapsed : $labelExpanded;
$button.toggleClass('is-activated').html(buttonLabel); $button.toggleClass('is-activated').html(buttonLabel);
...@@ -326,7 +328,7 @@ function saveSubsection() { ...@@ -326,7 +328,7 @@ function saveSubsection() {
$changedInput = null; $changedInput = null;
}, },
error: function() { error: function() {
showToastMessage('There has been an error while saving your changes.'); showToastMessage(gettext('There has been an error while saving your changes.'));
} }
}); });
} }
...@@ -372,7 +374,7 @@ function deleteSection(e) { ...@@ -372,7 +374,7 @@ function deleteSection(e) {
} }
function _deleteItem($el) { function _deleteItem($el) {
if (!confirm('Are you sure you wish to delete this item. It cannot be reversed!')) return; if (!confirm(gettext('Are you sure you wish to delete this item. It cannot be reversed!'))) return;
var id = $el.data('id'); var id = $el.data('id');
...@@ -599,7 +601,7 @@ function saveNewCourse(e) { ...@@ -599,7 +601,7 @@ function saveNewCourse(e) {
var display_name = $newCourse.find('.new-course-name').val(); var display_name = $newCourse.find('.new-course-name').val();
if (org == '' || number == '' || display_name == '') { if (org == '' || number == '' || display_name == '') {
alert('You must specify all fields in order to create a new course.'); alert(gettext('You must specify all fields in order to create a new course.'));
return; return;
} }
...@@ -730,18 +732,16 @@ function saveSetSectionScheduleDate(e) { ...@@ -730,18 +732,16 @@ function saveSetSectionScheduleDate(e) {
}) })
}).success(function() { }).success(function() {
var $thisSection = $('.courseware-section[data-id="' + id + '"]'); var $thisSection = $('.courseware-section[data-id="' + id + '"]');
var format = gettext('<strong>Will Release:</strong> %(date)s at %(time)s UTC'); var html = _.template(
var willReleaseAt = interpolate(format, { '<span class="published-status">' +
'date': input_date, '<strong>' + gettext("Will Release:") + '</strong>' +
'time': input_time gettext("<%= date %> at <%= time %> UTC") +
}, '</span>' +
true); '<a href="#" class="edit-button" data-date="<%= date %>" data-time="<%= time %>" data-id="<%= id %>">' +
$thisSection.find('.section-published-date').html( gettext("Edit") +
'<span class="published-status">' + willReleaseAt + '</span>' + '</a>',
'<a href="#" class="edit-button" ' + {date: input_date, time: input_time, id: id});
'" data-date="' + input_date + $thisSection.find('.section-published-date').html(html);
'" data-time="' + input_time +
'" data-id="' + id + '">' + gettext('Edit') + '</a>');
hideModal(); hideModal();
saving.hide(); saving.hide();
}); });
......
...@@ -38,23 +38,23 @@ CMS.Models.Settings.CourseDetails = Backbone.Model.extend({ ...@@ -38,23 +38,23 @@ CMS.Models.Settings.CourseDetails = Backbone.Model.extend({
// A bit funny in that the video key validation is asynchronous; so, it won't stop the validation. // A bit funny in that the video key validation is asynchronous; so, it won't stop the validation.
var errors = {}; var errors = {};
if (newattrs.start_date === null) { if (newattrs.start_date === null) {
errors.start_date = "The course must have an assigned start date."; errors.start_date = gettext("The course must have an assigned start date.");
} }
if (newattrs.start_date && newattrs.end_date && newattrs.start_date >= newattrs.end_date) { if (newattrs.start_date && newattrs.end_date && newattrs.start_date >= newattrs.end_date) {
errors.end_date = "The course end date cannot be before the course start date."; errors.end_date = gettext("The course end date cannot be before the course start date.");
} }
if (newattrs.start_date && newattrs.enrollment_start && newattrs.start_date < newattrs.enrollment_start) { if (newattrs.start_date && newattrs.enrollment_start && newattrs.start_date < newattrs.enrollment_start) {
errors.enrollment_start = "The course start date cannot be before the enrollment start date."; errors.enrollment_start = gettext("The course start date cannot be before the enrollment start date.");
} }
if (newattrs.enrollment_start && newattrs.enrollment_end && newattrs.enrollment_start >= newattrs.enrollment_end) { if (newattrs.enrollment_start && newattrs.enrollment_end && newattrs.enrollment_start >= newattrs.enrollment_end) {
errors.enrollment_end = "The enrollment start date cannot be after the enrollment end date."; errors.enrollment_end = gettext("The enrollment start date cannot be after the enrollment end date.");
} }
if (newattrs.end_date && newattrs.enrollment_end && newattrs.end_date < newattrs.enrollment_end) { if (newattrs.end_date && newattrs.enrollment_end && newattrs.end_date < newattrs.enrollment_end) {
errors.enrollment_end = "The enrollment end date cannot be after the course end date."; errors.enrollment_end = gettext("The enrollment end date cannot be after the course end date.");
} }
if (newattrs.intro_video && newattrs.intro_video !== this.get('intro_video')) { if (newattrs.intro_video && newattrs.intro_video !== this.get('intro_video')) {
if (this._videokey_illegal_chars.exec(newattrs.intro_video)) { if (this._videokey_illegal_chars.exec(newattrs.intro_video)) {
errors.intro_video = "Key should only contain letters, numbers, _, or -"; errors.intro_video = gettext("Key should only contain letters, numbers, _, or -");
} }
// TODO check if key points to a real video using google's youtube api // TODO check if key points to a real video using google's youtube api
} }
......
...@@ -79,14 +79,14 @@ CMS.Models.Settings.CourseGrader = Backbone.Model.extend({ ...@@ -79,14 +79,14 @@ CMS.Models.Settings.CourseGrader = Backbone.Model.extend({
// FIXME somehow this.collection is unbound sometimes. I can't track down when // FIXME somehow this.collection is unbound sometimes. I can't track down when
var existing = this.collection && this.collection.some(function(other) { return (other.cid != this.cid) && (other.get('type') == attrs['type']);}, this); var existing = this.collection && this.collection.some(function(other) { return (other.cid != this.cid) && (other.get('type') == attrs['type']);}, this);
if (existing) { if (existing) {
errors.type = "There's already another assignment type with this name."; errors.type = gettext("There's already another assignment type with this name.");
} }
} }
} }
if (_.has(attrs, 'weight')) { if (_.has(attrs, 'weight')) {
var intWeight = parseInt(attrs.weight); // see if this ensures value saved is int var intWeight = parseInt(attrs.weight); // see if this ensures value saved is int
if (!isFinite(intWeight) || /\D+/.test(attrs.weight) || intWeight < 0 || intWeight > 100) { if (!isFinite(intWeight) || /\D+/.test(attrs.weight) || intWeight < 0 || intWeight > 100) {
errors.weight = "Please enter an integer between 0 and 100."; errors.weight = gettext("Please enter an integer between 0 and 100.");
} }
else { else {
attrs.weight = intWeight; attrs.weight = intWeight;
...@@ -100,18 +100,20 @@ CMS.Models.Settings.CourseGrader = Backbone.Model.extend({ ...@@ -100,18 +100,20 @@ CMS.Models.Settings.CourseGrader = Backbone.Model.extend({
}} }}
if (_.has(attrs, 'min_count')) { if (_.has(attrs, 'min_count')) {
if (!isFinite(attrs.min_count) || /\D+/.test(attrs.min_count)) { if (!isFinite(attrs.min_count) || /\D+/.test(attrs.min_count)) {
errors.min_count = "Please enter an integer."; errors.min_count = gettext("Please enter an integer.");
} }
else attrs.min_count = parseInt(attrs.min_count); else attrs.min_count = parseInt(attrs.min_count);
} }
if (_.has(attrs, 'drop_count')) { if (_.has(attrs, 'drop_count')) {
if (!isFinite(attrs.drop_count) || /\D+/.test(attrs.drop_count)) { if (!isFinite(attrs.drop_count) || /\D+/.test(attrs.drop_count)) {
errors.drop_count = "Please enter an integer."; errors.drop_count = gettext("Please enter an integer.");
} }
else attrs.drop_count = parseInt(attrs.drop_count); else attrs.drop_count = parseInt(attrs.drop_count);
} }
if (_.has(attrs, 'min_count') && _.has(attrs, 'drop_count') && attrs.drop_count > attrs.min_count) { if (_.has(attrs, 'min_count') && _.has(attrs, 'drop_count') && attrs.drop_count > attrs.min_count) {
errors.drop_count = "Cannot drop more " + attrs.type + " than will assigned."; errors.drop_count = _.template(
gettext("Cannot drop more <% attrs.types %> than will assigned."),
attrs, {variable: 'attrs'});
} }
if (!_.isEmpty(errors)) return errors; if (!_.isEmpty(errors)) return errors;
} }
......
...@@ -26,8 +26,8 @@ CMS.Views.ShowTextbook = Backbone.View.extend({ ...@@ -26,8 +26,8 @@ CMS.Views.ShowTextbook = Backbone.View.extend({
if(e && e.preventDefault) { e.preventDefault(); } if(e && e.preventDefault) { e.preventDefault(); }
var textbook = this.model, collection = this.model.collection; var textbook = this.model, collection = this.model.collection;
var msg = new CMS.Views.Prompt.Warning({ var msg = new CMS.Views.Prompt.Warning({
title: _.str.sprintf(gettext("Delete “%s”?"), title: _.template(gettext("Delete “<%= name %>”?"),
textbook.escape('name')), {name: textbook.escape('name')}),
message: gettext("Deleting a textbook cannot be undone and once deleted any reference to it in your courseware's navigation will also be removed."), message: gettext("Deleting a textbook cannot be undone and once deleted any reference to it in your courseware's navigation will also be removed."),
actions: { actions: {
primary: { primary: {
...@@ -241,8 +241,8 @@ CMS.Views.EditChapter = Backbone.View.extend({ ...@@ -241,8 +241,8 @@ CMS.Views.EditChapter = Backbone.View.extend({
asset_path: this.$("input.chapter-asset-path").val() asset_path: this.$("input.chapter-asset-path").val()
}); });
var msg = new CMS.Models.FileUpload({ var msg = new CMS.Models.FileUpload({
title: _.str.sprintf(gettext("Upload a new asset to %s"), title: _.template(gettext("Upload a new asset to “<%= name %>”"),
section.escape('name')), {name: section.escape('name')}),
message: "Files must be in PDF format." message: "Files must be in PDF format."
}); });
var view = new CMS.Views.UploadDialog({model: msg, chapter: this.model}); var view = new CMS.Views.UploadDialog({model: msg, chapter: this.model});
...@@ -260,7 +260,7 @@ CMS.Views.UploadDialog = Backbone.View.extend({ ...@@ -260,7 +260,7 @@ CMS.Views.UploadDialog = Backbone.View.extend({
this.listenTo(this.model, "change", this.render); this.listenTo(this.model, "change", this.render);
}, },
render: function() { render: function() {
var isValid = this.model.isValid() var isValid = this.model.isValid();
var selectedFile = this.model.get('selectedFile'); var selectedFile = this.model.get('selectedFile');
var oldInput = this.$("input[type=file]").get(0); var oldInput = this.$("input[type=file]").get(0);
this.$el.html(this.template({ this.$el.html(this.template({
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="title">Page Not Found</%block> <%block name="title">${_("Page Not Found")}</%block>
<%block name="content"> <%block name="content">
<div class="wrapper-content wrapper"> <div class="wrapper-content wrapper">
<section class="content"> <section class="content">
<h1>Page not found</h1> <h1>${_("Page not found")}</h1>
<p>The page that you were looking for was not found. Go back to the <a href="/">homepage</a> or let us know about any pages that may have been moved at <a href="mailto:technical@edx.org">technical@edx.org</a>.</p> <p>${_('The page that you were looking for was not found.')}
${_('Go back to the {homepage} or let us know about any pages that may have been moved at {email}.').format(
homepage='<a href="/">homepage</a>',
email='<a href="mailto:technical@edx.org">technical@edx.org</a>')}
</p>
</section> </section>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="title">Studio Server Error</%block> <%block name="title">${_("Studio Server Error")}</%block>
<%block name="content"> <%block name="content">
<div class="wrapper-content wrapper"> <div class="wrapper-content wrapper">
<section class="content"> <section class="content">
<h1>The <em>Studio</em> servers encountered an error</h1> <h1>${_("The <em>Studio</em> servers encountered an error")}</h1>
<p> <p>
An error occurred in Studio and the page could not be loaded. Please try again in a few moments. ${_("An error occurred in Studio and the page could not be loaded. Please try again in a few moments.")}
We've logged the error and our staff is currently working to resolve this error as soon as possible. ${_("We've logged the error and our staff is currently working to resolve this error as soon as possible.")}
If the problem persists, please email us at <a href="mailto:technical@edx.org">technical@edx.org</a>. ${_('If the problem persists, please email us at {email}.').format(email='<a href="mailto:technical@edx.org">technical@edx.org</a>')}
</p> </p>
</section> </section>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="content"> <%block name="content">
...@@ -6,8 +7,8 @@ ...@@ -6,8 +7,8 @@
<div> <div>
<section class="activation"> <section class="activation">
<h1>Account already active!</h1> <h1>${_("Account already active!")}</h1>
<p> This account has already been activated. <a href="/signin">Log in here</a>.</p> <p>${_('This account has already been activated.')}<a href="/signin">${_("Log in here.")}</a></p>
</div> </div>
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="content"> <%block name="content">
<section class="tos"> <section class="tos">
<div> <div>
<h1>Activation Complete!</h1> <h1>${_("Activation Complete!")}</h1>
<p>Thanks for activating your account. <a href="/signin">Log in here</a>.</p> <p>${_('Thanks for activating your account.')}<a href="/signin">${_("Log in here.")}</a></p>
</div> </div>
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="content"> <%block name="content">
<section class="tos"> <section class="tos">
<div> <div>
<h1>Activation Invalid</h1> <h1>${_("Activation Invalid")}</h1>
<p>Something went wrong. Check to make sure the URL you went to was <p>${_('Something went wrong. Check to make sure the URL you went to was correct -- e-mail programs will sometimes split it into two lines. If you still have issues, e-mail us to let us know what happened at {email}.').format(email='<a href="mailto:bugs@mitx.mit.edu">bugs@mitx.mit.edu</a>')}</p>
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:bugs@mitx.mit.edu">bugs@mitx.mit.edu</a>.</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>
</div> </div>
</section> </section>
</%block> </%block>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%block name="bodyclass">is-signedin course uploads</%block> <%block name="bodyclass">is-signedin course uploads</%block>
<%block name="title">Files &amp; Uploads</%block> <%block name="title">${_("Files &amp; Uploads")}</%block>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<h3 class="sr">Page Actions</h3> <h3 class="sr">Page Actions</h3>
<ul> <ul>
<li class="nav-item"> <li class="nav-item">
<a href="#" class="button upload-button new-button"><i class="icon-plus"></i> Upload New File</a> <a href="#" class="button upload-button new-button"><i class="icon-plus"></i> ${_("Upload New File")}</a>
</li> </li>
</ul> </ul>
</nav> </nav>
......
## -*- coding: utf-8 -*-
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<!doctype html> <!doctype html>
...@@ -17,6 +18,7 @@ ...@@ -17,6 +18,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="path_prefix" content="${MITX_ROOT_URL}"> <meta name="path_prefix" content="${MITX_ROOT_URL}">
<script type="text/javascript" src="/jsi18n/"></script>
<%static:css group='base-style'/> <%static:css group='base-style'/>
<link rel="stylesheet" type="text/css" href="${static.url('js/vendor/markitup/skins/simple/style.css')}" /> <link rel="stylesheet" type="text/css" href="${static.url('js/vendor/markitup/skins/simple/style.css')}" />
<link rel="stylesheet" type="text/css" href="${static.url('js/vendor/markitup/sets/wiki/style.css')}" /> <link rel="stylesheet" type="text/css" href="${static.url('js/vendor/markitup/sets/wiki/style.css')}" />
...@@ -35,7 +37,6 @@ ...@@ -35,7 +37,6 @@
</script> </script>
## javascript ## javascript
<script type="text/javascript" src="/jsi18n/"></script>
<script type="text/javascript" src="${static.url('js/vendor/json2.js')}"></script> <script type="text/javascript" src="${static.url('js/vendor/json2.js')}"></script>
<script type="text/javascript" src="${static.url('js/vendor/underscore-min.js')}"></script> <script type="text/javascript" src="${static.url('js/vendor/underscore-min.js')}"></script>
<script type="text/javascript" src="${static.url('js/vendor/underscore.string.min.js')}"></script> <script type="text/javascript" src="${static.url('js/vendor/underscore.string.min.js')}"></script>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Course Checklists</%block> <%block name="title">Course Checklists</%block>
...@@ -30,8 +31,8 @@ ...@@ -30,8 +31,8 @@
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast has-actions has-subtitle"> <header class="mast has-actions has-subtitle">
<h1 class="page-header"> <h1 class="page-header">
<small class="subtitle">Tools</small> <small class="subtitle">${_("Tools")}</small>
<span class="sr">&gt; </span>Course Checklists <span class="sr">&gt; </span>${_("Course Checklists")}
</h1> </h1>
</header> </header>
</div> </div>
...@@ -40,18 +41,18 @@ ...@@ -40,18 +41,18 @@
<section class="content"> <section class="content">
<article class="content-primary" role="main"> <article class="content-primary" role="main">
<form id="course-checklists" class="course-checklists" method="post" action=""> <form id="course-checklists" class="course-checklists" method="post" action="">
<h2 class="title title-3 sr">Current Checklists</h2> <h2 class="title title-3 sr">${_("Current Checklists")}</h2>
</form> </form>
</article> </article>
<aside class="content-supplementary" role="complimentary"> <aside class="content-supplementary" role="complimentary">
<div class="bit"> <div class="bit">
<h3 class="title title-3">What are checklists?</h3> <h3 class="title title-3">${_("What are checklists?")}</h3>
<p> <p>
Running a course on edX is a complex undertaking. Course checklists are designed to help you understand and keep track of all the steps necessary to get your course ready for students. ${_("Running a course on edX is a complex undertaking. Course checklists are designed to help you understand and keep track of all the steps necessary to get your course ready for students.")}
</p> </p>
<p> <p>
These checklists are shared among your course team, and any changes you make are immediately visible to other members of the team and saved automatically. ${_("These checklists are shared among your course team, and any changes you make are immediately visible to other members of the team and saved automatically.")}
</p> </p>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<!-- TODO decode course # from context_course into title --> <!-- TODO decode course # from context_course into title -->
<%block name="title">Course Updates</%block> <%block name="title">${_("Course Updates")}</%block>
<%block name="bodyclass">is-signedin course course-info updates</%block> <%block name="bodyclass">is-signedin course course-info updates</%block>
...@@ -44,15 +45,15 @@ ...@@ -44,15 +45,15 @@
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast has-actions has-subtitle"> <header class="mast has-actions has-subtitle">
<h1 class="page-header"> <h1 class="page-header">
<small class="subtitle">Content</small> <small class="subtitle">${_("Content")}</small>
<span class="sr">&gt; </span>Course Updates <span class="sr">&gt; </span>${_("Course Updates")}
</h1> </h1>
<nav class="nav-actions"> <nav class="nav-actions">
<h3 class="sr">Page Actions</h3> <h3 class="sr">${_('Page Actions')}</h3>
<ul> <ul>
<li class="nav-item"> <li class="nav-item">
<a href="#" class=" button new-button new-update-button"><i class="icon-plus"></i> New Update</a> <a href="#" class=" button new-button new-update-button"><i class="icon-plus"></i> ${_('New Update')}</a>
</li> </li>
</ul> </ul>
</nav> </nav>
...@@ -62,7 +63,7 @@ ...@@ -62,7 +63,7 @@
<div class="wrapper-content wrapper"> <div class="wrapper-content wrapper">
<section class="content"> <section class="content">
<div class="introduction"> <div class="introduction">
<p clas="copy">Course updates are announcements or notifications you want to share with your class. Other course authors have used them for important exam/date reminders, change in schedules, and to call out any important steps students need to be aware of.</p> <p clas="copy">${_('Course updates are announcements or notifications you want to share with your class. Other course authors have used them for important exam/date reminders, change in schedules, and to call out any important steps students need to be aware of.')}</p>
</div> </div>
</section> </section>
</div> </div>
......
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Static Pages</%block> <%block name="title">Static Pages</%block>
<%block name="bodyclass">is-signedin course pages static-pages</%block> <%block name="bodyclass">is-signedin course pages static-pages</%block>
...@@ -19,15 +20,15 @@ ...@@ -19,15 +20,15 @@
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast has-actions has-subtitle"> <header class="mast has-actions has-subtitle">
<h1 class="page-header"> <h1 class="page-header">
<small class="subtitle">Content</small> <small class="subtitle">${_("Content")}</small>
<span class="sr">&gt; </span>Static Pages <span class="sr">&gt; </span>${_("Static Pages")}
</h1> </h1>
<nav class="nav-actions"> <nav class="nav-actions">
<h3 class="sr">Page Actions</h3> <h3 class="sr">${_("Page Actions")}</h3>
<ul> <ul>
<li class="nav-item"> <li class="nav-item">
<a href="#" class="button new-button new-tab"><i class="icon-plus"></i> New Page</a> <a href="#" class="button new-button new-tab"><i class="icon-plus"></i> ${_("New Page")}</a>
</li> </li>
</ul> </ul>
</nav> </nav>
...@@ -37,11 +38,11 @@ ...@@ -37,11 +38,11 @@
<div class="wrapper-content wrapper"> <div class="wrapper-content wrapper">
<section class="content"> <section class="content">
<div class="introduction has-links"> <div class="introduction has-links">
<p class="copy">Static Pages are additional pages that supplement your Courseware. Other course authors have used them to share a syllabus, calendar, handouts, and more.</p> <p class="copy">${_("Static Pages are additional pages that supplement your Courseware. Other course authors have used them to share a syllabus, calendar, handouts, and more.")}</p>
<nav class="nav-introduction-supplementary"> <nav class="nav-introduction-supplementary">
<ul> <ul>
<li class="nav-item"> <li class="nav-item">
<a rel="modal" href="#preview-lms-staticpages"><i class="icon-question-sign"></i>How do Static Pages look to students in my course?</a> <a rel="modal" href="#preview-lms-staticpages"><i class="icon-question-sign"></i>${_("How do Static Pages look to students in my course?")}</a>
</li> </li>
</ul> </ul>
</nav> </nav>
...@@ -69,15 +70,15 @@ ...@@ -69,15 +70,15 @@
</div> </div>
<div class="content-modal" id="preview-lms-staticpages"> <div class="content-modal" id="preview-lms-staticpages">
<h3 class="title">How Static Pages are Used in Your Course</h3> <h3 class="title">${_("How Static Pages are Used in Your Course")}</h3>
<figure> <figure>
<img src="/static/img/preview-lms-staticpages.png" alt="Preview of how Static Pages are used in your course" /> <img src="/static/img/preview-lms-staticpages.png" alt="${_('Preview of how Static Pages are used in your course')}" />
<figcaption class="description">These pages will be presented in your course's main navigation alongside Courseware, Course Info, Discussion, etc.</figcaption> <figcaption class="description">${_("These pages will be presented in your course's main navigation alongside Courseware, Course Info, Discussion, etc.")}</figcaption>
</figure> </figure>
<a href="#" rel="view" class="action action-modal-close"> <a href="#" rel="view" class="action action-modal-close">
<i class="icon-remove-sign"></i> <i class="icon-remove-sign"></i>
<span class="label">close modal</span> <span class="label">${_("close modal")}</span>
</a> </a>
</div> </div>
</%block> </%block>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! <%!
import logging import logging
...@@ -5,7 +6,7 @@ ...@@ -5,7 +6,7 @@
%> %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">CMS Subsection</%block> <%block name="title">${_("CMS Subsection")}</%block>
<%block name="bodyclass">is-signedin course subsection</%block> <%block name="bodyclass">is-signedin course subsection</%block>
...@@ -18,11 +19,11 @@ ...@@ -18,11 +19,11 @@
<div class="main-column"> <div class="main-column">
<article class="subsection-body window" data-id="${subsection.location}"> <article class="subsection-body window" data-id="${subsection.location}">
<div class="subsection-name-input"> <div class="subsection-name-input">
<label>Display Name:</label> <label>${_("Display Name:")}</label>
<input type="text" value="${subsection.display_name_with_default | h}" class="subsection-display-name-input" data-metadata-name="display_name"/> <input type="text" value="${subsection.display_name_with_default | h}" class="subsection-display-name-input" data-metadata-name="display_name"/>
</div> </div>
<div class="sortable-unit-list"> <div class="sortable-unit-list">
<label>Units:</label> <label>${_("Units:")}</label>
${units.enum_units(subsection, subsection_units=subsection_units)} ${units.enum_units(subsection, subsection_units=subsection_units)}
</div> </div>
</article> </article>
...@@ -30,18 +31,18 @@ ...@@ -30,18 +31,18 @@
<div class="sidebar"> <div class="sidebar">
<div class="unit-settings window id-holder" data-id="${subsection.location}"> <div class="unit-settings window id-holder" data-id="${subsection.location}">
<h4 class="header">Subsection Settings</h4> <h4 class="header">${_("Subsection Settings")}</h4>
<div class="window-contents"> <div class="window-contents">
<div class="scheduled-date-input row"> <div class="scheduled-date-input row">
<div class="datepair" data-language="javascript"> <div class="datepair" data-language="javascript">
<div class="field field-start-date"> <div class="field field-start-date">
<label for="start_date">Release Day</label> <label for="start_date">${_("Release Day")}</label>
<input type="text" id="start_date" name="start_date" <input type="text" id="start_date" name="start_date"
value="${subsection.lms.start.strftime('%m/%d/%Y') if subsection.lms.start else ''}" value="${subsection.lms.start.strftime('%m/%d/%Y') if subsection.lms.start else ''}"
placeholder="MM/DD/YYYY" class="date" size='15' autocomplete="off"/> placeholder="MM/DD/YYYY" class="date" size='15' autocomplete="off"/>
</div> </div>
<div class="field field-start-time"> <div class="field field-start-time">
<label for="start_time">Release Time (<abbr title="Coordinated Universal Time">UTC</abbr>)</label> <label for="start_time">${_("Release Time")} (<abbr title="${_("Coordinated Universal Time")}">${_("UTC")}</abbr>)</label>
<input type="text" id="start_time" name="start_time" <input type="text" id="start_time" name="start_time"
value="${subsection.lms.start.strftime('%H:%M') if subsection.lms.start else ''}" value="${subsection.lms.start.strftime('%H:%M') if subsection.lms.start else ''}"
placeholder="HH:MM" class="time" size='10' autocomplete="off"/> placeholder="HH:MM" class="time" size='10' autocomplete="off"/>
...@@ -49,44 +50,42 @@ ...@@ -49,44 +50,42 @@
</div> </div>
% if subsection.lms.start and not almost_same_datetime(subsection.lms.start, parent_item.lms.start): % if subsection.lms.start and not almost_same_datetime(subsection.lms.start, parent_item.lms.start):
% if parent_item.lms.start is None: % if parent_item.lms.start is None:
<p class="notice">The date above differs from the release date of <p class="notice">${_("The date above differs from the release date of {name}, which is unset.").format(name=parent_item.display_name_with_default)}
${parent_item.display_name_with_default}, which is unset.
% else: % else:
<p class="notice">The date above differs from the release date of ${parent_item.display_name_with_default} – <p class="notice">${_("The date above differs from the release date of {name} - {start_time}").format(name=parent_item.display_name_with_default, start_time=get_default_time_display(parent_item.lms.start))}.
${get_default_time_display(parent_item.lms.start)}.
% endif % endif
<a href="#" class="sync-date no-spinner">Sync to ${parent_item.display_name_with_default}.</a></p> <a href="#" class="sync-date no-spinner">${_("Sync to {name}.").format(name=parent_item.display_name_with_default)}</a></p>
% endif % endif
</div> </div>
<div class="row gradable"> <div class="row gradable">
<label>Graded as:</label> <label>${_("Graded as:")}</label>
<div class="gradable-status" data-initial-status="${subsection.lms.format if subsection.lms.format is not None else 'Not Graded'}"> <div class="gradable-status" data-initial-status="${subsection.lms.format if subsection.lms.format is not None else _('Not Graded')}">
</div> </div>
<div class="due-date-input row"> <div class="due-date-input row">
<a href="#" class="set-date">Set a due date</a> <a href="#" class="set-date">${_("Set a due date")}</a>
<div class="datepair date-setter"> <div class="datepair date-setter">
<div class="field field-start-date"> <div class="field field-start-date">
<label for="due_date">Due Day</label> <label for="due_date">${_("Due Day")}</label>
<input type="text" id="due_date" name="due_date" <input type="text" id="due_date" name="due_date"
value="${subsection.lms.due.strftime('%m/%d/%Y') if subsection.lms.due else ''}" value="${subsection.lms.due.strftime('%m/%d/%Y') if subsection.lms.due else ''}"
placeholder="MM/DD/YYYY" class="date" size='15' autocomplete="off"/> placeholder="MM/DD/YYYY" class="date" size='15' autocomplete="off"/>
</div> </div>
<div class="field field-start-time"> <div class="field field-start-time">
<label for="due_time">Due Time (<abbr title="Coordinated Universal Time">UTC</abbr>)</label> <label for="due_time">${_("Due Time")} (<abbr title="${_('Coordinated Universal Time')}">UTC</abbr>)</label>
<input type="text" id="due_time" name="due_time" <input type="text" id="due_time" name="due_time"
value="${subsection.lms.due.strftime('%H:%M') if subsection.lms.due else ''}" value="${subsection.lms.due.strftime('%H:%M') if subsection.lms.due else ''}"
placeholder="HH:MM" class="time" size='10' autocomplete="off"/> placeholder="HH:MM" class="time" size='10' autocomplete="off"/>
</div> </div>
<a href="#" class="remove-date">Remove due date</a> <a href="#" class="remove-date">${_("Remove due date")}</a>
</div> </div>
</div> </div>
<div class="row unit-actions"> <div class="row unit-actions">
<a href="${preview_link}" target="_blank" class="preview-button">Preview Drafts</a> <a href="${preview_link}" target="_blank" class="preview-button">${_("Preview Drafts")}</a>
%if can_view_live: %if can_view_live:
<a href="${lms_link}" target="_blank" class="preview-button">View Live</a> <a href="${lms_link}" target="_blank" class="preview-button">${_("View Live")}</a>
%endif %endif
</div> </div>
</div> </div>
......
Thank you for signing up for edX Studio! To activate your account, <%! from django.utils.translation import ugettext as _ %>
please copy and paste this address into your web browser's
address bar: ${_("Thank you for signing up for edX Studio! To activate your account, please copy and paste this address into your web browser's address bar:")}
% if is_secure: % if is_secure:
https://${ site }/activate/${ key } https://${ site }/activate/${ key }
...@@ -8,6 +8,4 @@ address bar: ...@@ -8,6 +8,4 @@ address bar:
http://${ site }/activate/${ key } http://${ site }/activate/${ key }
% endif % endif
If you didn't request this, you don't need to do anything; you won't ${_("If you didn't request this, you don't need to do anything; you won't receive any more email from us. Please do not reply to this e-mail; if you require assistance, check the help section of the edX web site.")}
receive any more email from us. Please do not reply to this e-mail; if
you require assistance, check the help section of the edX web site.
Your account for edX Studio <%! from django.utils.translation import ugettext as _ %>
${_("Your account for edX Studio")}
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="bodyclass">error</%block> <%block name="bodyclass">error</%block>
<%block name="title"> <%block name="title">
% if error == '404': % if error == '404':
404 - Page Not Found 404 - ${_("Page Not Found")}
% elif error == '500': % elif error == '500':
500 - Internal Server Error 500 - ${_("Internal Server Error")}
% endif % endif
</%block> </%block>
<%block name="content"> <%block name="content">
<article class="error-prompt"> <article class="error-prompt">
% if error == '404': % if error == '404':
<h1>Hmm…</h1> <h1>${_("The Page You Requested Page Cannot be Found")}</h1>
<p class="description">we can't find that page.</p> <p class="description">${_("We're sorry. We couldn't find the Studio page you're looking for. You may want to return to the Studio Dashboard and try again. If you are still having problems accessing things, please feel free to {link_start}contact Studio support{link_end} for further help.").format(
link_start='<a href="http://help.edge.edx.org/discussion/new" class="show-tender" title="{title}">'.format(title=_("Use our feedback tool, Tender, to share your feedback")),
link_end='</a>',
)}</p>
% elif error == '500': % elif error == '500':
<h1>Oops…</h1> <h1>${_("The Server Encountered an Error")}</h1>
<p class="description">there was a problem with the server.</p> <p class="description">${_("We're sorry. There was a problem with the server while trying to process your last request. You may want to return to the Studio Dashboard or try this request again. If you are still having problems accessing things, please feel free to {link_start}contact Studio support{link_end} for further help.").format(
link_start='<a href="http://help.edge.edx.org/discussion/new" class="show-tender" title="{title}">'.format(title=_("Use our feedback tool, Tender, to share your feedback")),
link_end='</a>',
)}</p>
% endif % endif
<a href="/" class="back-button">Back to dashboard</a> <a href="/" class="back-button">${_("Back to dashboard")}</a>
</article> </article>
</%block> </%block>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Course Export</%block> <%block name="title">${_("Course Export")}</%block>
<%block name="bodyclass">is-signedin course tools export</%block> <%block name="bodyclass">is-signedin course tools export</%block>
<%block name="content"> <%block name="content">
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast has-subtitle"> <header class="mast has-subtitle">
<h1 class="page-header"> <h1 class="page-header">
<small class="subtitle">Tools</small> <small class="subtitle">${_("Tools")}</small>
<span class="sr">&gt; </span>Course Export <span class="sr">&gt; </span>${_("Course Export")}
</h1> </h1>
</header> </header>
</div> </div>
...@@ -19,28 +20,29 @@ ...@@ -19,28 +20,29 @@
<div class="inner-wrapper"> <div class="inner-wrapper">
<article class="export-overview"> <article class="export-overview">
<div class="description"> <div class="description">
<h2>About Exporting Courses</h2> <h2>${_("About Exporting Courses")}</h2>
<p>When exporting your course, you will receive a .tar.gz formatted file that contains the following course data:</p> ## Translators: ".tar.gz" is a file extension, and should not be translated
<p>${_("When exporting your course, you will receive a .tar.gz formatted file that contains the following course data:")}</p>
<ul> <ul>
<li>Course Structure (Sections and sub-section ordering)</li> <li>${_("Course Structure (Sections and sub-section ordering)")}</li>
<li>Individual Units</li> <li>${_("Individual Units")}</li>
<li>Individual Problems</li> <li>${_("Individual Problems")}</li>
<li>Static Pages</li> <li>${_("Static Pages")}</li>
<li>Course Assets</li> <li>${_("Course Assets")}</li>
</ul> </ul>
<p>Your course export <strong>will not include</strong>: student data, forum/discussion data, course settings, certificates, grading information, or user data.</p> <p>${_("Your course export <strong>will not include</strong>: student data, forum/discussion data, course settings, certificates, grading information, or user data.")}</p>
</div> </div>
<!-- default state --> <!-- default state -->
<div class="export-form-wrapper"> <div class="export-form-wrapper">
<form action="${reverse('generate_export_course', kwargs=dict(org=context_course.location.org, course=context_course.location.course, name=context_course.location.name))}" method="post" enctype="multipart/form-data" class="export-form"> <form action="${reverse('generate_export_course', kwargs=dict(org=context_course.location.org, course=context_course.location.course, name=context_course.location.name))}" method="post" enctype="multipart/form-data" class="export-form">
<h2>Export Course:</h2> <h2>${_("Export Course:")}</h2>
<p class="error-block"></p> <p class="error-block"></p>
<a href="${reverse('generate_export_course', kwargs=dict(org=context_course.location.org, course=context_course.location.course, name=context_course.location.name))}" class="button-export">Download Files</a> <a href="${reverse('generate_export_course', kwargs=dict(org=context_course.location.org, course=context_course.location.course, name=context_course.location.name))}" class="button-export">${_("Download Files")}</a>
</form> </form>
</div> </div>
...@@ -48,12 +50,12 @@ ...@@ -48,12 +50,12 @@
<%doc> <%doc>
<div class="export-form-wrapper is-downloading"> <div class="export-form-wrapper is-downloading">
<form action="${reverse('export_course', kwargs=dict(org=context_course.location.org, course=context_course.location.course, name=context_course.location.name))}" method="post" enctype="multipart/form-data" class="export-form"> <form action="${reverse('export_course', kwargs=dict(org=context_course.location.org, course=context_course.location.course, name=context_course.location.name))}" method="post" enctype="multipart/form-data" class="export-form">
<h2>Export Course:</h2> <h2>${_("Export Course:")}</h2>
<p class="error-block"></p> <p class="error-block"></p>
<a href="#" class="button-export disabled">Files Downloading</a> <a href="#" class="button-export disabled">Files Downloading</a>
<p class="message-status">Download not start? <a href="#" class="text-export">Try again</a></p> <p class="message-status">${_("Download not start?")} <a href="#" class="text-export">${_("Try again")}</a></p>
</form> </form>
</div> </div>
</%doc> </%doc>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Welcome</%block> <%block name="title">${_("Welcome")}</%block>
<%block name="bodyclass">not-signedin index howitworks</%block> <%block name="bodyclass">not-signedin index howitworks</%block>
<%block name="content"> <%block name="content">
...@@ -9,8 +10,9 @@ ...@@ -9,8 +10,9 @@
<div class="wrapper-content-header wrapper"> <div class="wrapper-content-header wrapper">
<section class="content content-header"> <section class="content content-header">
<header> <header>
<h1>Welcome to <span class="logo">edX Studio</span></h1> ## "edX Studio" should not be translated
<p class="tagline">Studio helps manage your courses online, so you can focus on teaching them</p> <h1>${_('Welcome to')}<span class="logo">edX Studio</span></h1>
<p class="tagline">${_("Studio helps manage your courses online, so you can focus on teaching them")}</p>
</header> </header>
</section> </section>
</div> </div>
...@@ -18,15 +20,15 @@ ...@@ -18,15 +20,15 @@
<div class="wrapper-content-features wrapper"> <div class="wrapper-content-features wrapper">
<section class="content content-features"> <section class="content content-features">
<header> <header>
<h2 class="sr">Studio's Many Features</h2> <h2 class="sr">${_("Studio's Many Features")}</h2>
</header> </header>
<ol class="list-features"> <ol class="list-features">
<li class="feature"> <li class="feature">
<figure class="img zoom"> <figure class="img zoom">
<a rel="modal" href="#hiw-feature1"> <a rel="modal" href="#hiw-feature1">
<img src="/static/img/thumb-hiw-feature1.png" alt="Studio Helps You Keep Your Courses Organized" /> <img src="/static/img/thumb-hiw-feature1.png" alt="${_('Studio Helps You Keep Your Courses Organized')}" />
<figcaption class="sr">Studio Helps You Keep Your Courses Organized</figcaption> <figcaption class="sr">${_("Studio Helps You Keep Your Courses Organized")}</figcaption>
<span class="action-zoom"> <span class="action-zoom">
<i class="icon-zoom-in"></i> <i class="icon-zoom-in"></i>
</span> </span>
...@@ -34,23 +36,23 @@ ...@@ -34,23 +36,23 @@
</figure> </figure>
<div class="copy"> <div class="copy">
<h3>Keeping Your Course Organized</h3> <h3>${_("Keeping Your Course Organized")}</h3>
<p>The backbone of your course is how it is organized. Studio offers an <strong>Outline</strong> editor, providing a simple hierarchy and easy drag and drop to help you and your students stay organized.</p> <p>${_("The backbone of your course is how it is organized. Studio offers an <strong>Outline</strong> editor, providing a simple hierarchy and easy drag and drop to help you and your students stay organized.")}</p>
<ul class="list-proofpoints"> <ul class="list-proofpoints">
<li class="proofpoint"> <li class="proofpoint">
<h4 class="title">Simple Organization For Content</h4> <h4 class="title">${_("Simple Organization For Content")}</h4>
<p>Studio uses a simple hierarchy of <strong>sections</strong> and <strong>subsections</strong> to organize your content.</p> <p>${_("Studio uses a simple hierarchy of <strong>sections</strong> and <strong>subsections</strong> to organize your content.")}</p>
</li> </li>
<li class="proofpoint"> <li class="proofpoint">
<h4 class="title">Change Your Mind Anytime</h4> <h4 class="title">${_("Change Your Mind Anytime")}</h4>
<p>Draft your outline and build content anywhere. Simple drag and drop tools let your reorganize quickly.</p> <p>${_("Draft your outline and build content anywhere. Simple drag and drop tools let your reorganize quickly.")}</p>
</li> </li>
<li class="proofpoint"> <li class="proofpoint">
<h4 class="title">Go A Week Or A Semester At A Time</h4> <h4 class="title">${_("Go A Week Or A Semester At A Time")}</h4>
<p>Build and release <strong>sections</strong> to your students incrementally. You don't have to have it all done at once.</p> <p>${_("Build and release <strong>sections</strong> to your students incrementally. You don't have to have it all done at once.")}</p>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -59,8 +61,8 @@ ...@@ -59,8 +61,8 @@
<li class="feature"> <li class="feature">
<figure class="img zoom"> <figure class="img zoom">
<a rel="modal" href="#hiw-feature2"> <a rel="modal" href="#hiw-feature2">
<img src="/static/img/thumb-hiw-feature2.png" alt="Learning is More than Just Lectures" /> <img src="/static/img/thumb-hiw-feature2.png" alt="${_('Learning is More than Just Lectures')}" />
<figcaption class="sr">Learning is More than Just Lectures</figcaption> <figcaption class="sr">${_("Learning is More than Just Lectures")}</figcaption>
<span class="action-zoom"> <span class="action-zoom">
<i class="icon-zoom-in"></i> <i class="icon-zoom-in"></i>
</span> </span>
...@@ -68,23 +70,23 @@ ...@@ -68,23 +70,23 @@
</figure> </figure>
<div class="copy"> <div class="copy">
<h3>Learning is More than Just Lectures</h3> <h3>${_("Learning is More than Just Lectures")}</h3>
<p>Studio lets you weave your content together in a way that reinforces learning &mdash; short video lectures interleaved with exercises and more. Insert videos and author a wide variety of exercise types with just a few clicks. </p> <p>${_("Studio lets you weave your content together in a way that reinforces learning &mdash; short video lectures interleaved with exercises and more. Insert videos and author a wide variety of exercise types with just a few clicks.")} </p>
<ul class="list-proofpoints"> <ul class="list-proofpoints">
<li class="proofpoint"> <li class="proofpoint">
<h4 class="title">Create Learning Pathways</h4> <h4 class="title">${_("Create Learning Pathways")}</h4>
<p>Help your students understand a small interactive piece at a time with multimedia, HTML, and exercises.</p> <p>${_("Help your students understand a small interactive piece at a time with multimedia, HTML, and exercises.")}</p>
</li> </li>
<li class="proofpoint"> <li class="proofpoint">
<h4 class="title">Work Visually, Organize Quickly</h4> <h4 class="title">${_("Work Visually, Organize Quickly")}</h4>
<p>Work visually and see exactly what your students will see. Reorganize all your content with drag and drop.</p> <p>${_("Work visually and see exactly what your students will see. Reorganize all your content with drag and drop.")}</p>
</li> </li>
<li class="proofpoint"> <li class="proofpoint">
<h4 class="title">A Broad Library of Problem Types</h4> <h4 class="title">${_("A Broad Library of Problem Types")}</h4>
<p>It's more than just multiple choice. Studio has nearly a dozen types of problems to challenge your learners.</p> <p>${_("It's more than just multiple choice. Studio has nearly a dozen types of problems to challenge your learners.")}</p>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -93,8 +95,8 @@ ...@@ -93,8 +95,8 @@
<li class="feature"> <li class="feature">
<figure class="img zoom"> <figure class="img zoom">
<a rel="modal" href="#hiw-feature3"> <a rel="modal" href="#hiw-feature3">
<img src="/static/img/thumb-hiw-feature3.png" alt="Studio Gives You Simple, Fast, and Incremental Publishing. With Friends." /> <img src="/static/img/thumb-hiw-feature3.png" alt="${_('Studio Gives You Simple, Fast, and Incremental Publishing. With Friends.')}" />
<figcaption class="sr">Studio Gives You Simple, Fast, and Incremental Publishing. With Friends.</figcaption> <figcaption class="sr">${_("Studio Gives You Simple, Fast, and Incremental Publishing. With Friends.")}</figcaption>
<span class="action-zoom"> <span class="action-zoom">
<i class="icon-zoom-in"></i> <i class="icon-zoom-in"></i>
</span> </span>
...@@ -102,23 +104,23 @@ ...@@ -102,23 +104,23 @@
</figure> </figure>
<div class="copy"> <div class="copy">
<h3>Simple, Fast, and Incremental Publishing. With Friends.</h3> <h3>${_("Simple, Fast, and Incremental Publishing. With Friends.")}</h3>
<p>Studio works like web applications you already know, yet understands how you build curriculum. Instant publishing to the web when you want it, incremental release when it makes sense. And with co-authors, you can have a whole team building a course, together.</p> <p>${_("Studio works like web applications you already know, yet understands how you build curriculum. Instant publishing to the web when you want it, incremental release when it makes sense. And with co-authors, you can have a whole team building a course, together.")}</p>
<ul class="list-proofpoints"> <ul class="list-proofpoints">
<li class="proofpoint"> <li class="proofpoint">
<h4 class="title">Instant Changes</h4> <h4 class="title">${_("Instant Changes")}</h4>
<p>Caught a bug? No problem. When you want, your changes to live when you hit Save.</p> <p>${_("Caught a bug? No problem. When you want, your changes to live when you hit Save.")}</p>
</li> </li>
<li class="proofpoint"> <li class="proofpoint">
<h4 class="title">Release-On Date Publishing</h4> <h4 class="title">${_("Release-On Date Publishing")}</h4>
<p>When you've finished a <strong>section</strong>, pick when you want it to go live and Studio takes care of the rest. Build your course incrementally.</p> <p>${_("When you've finished a <strong>section</strong>, pick when you want it to go live and Studio takes care of the rest. Build your course incrementally.")}</p>
</li> </li>
<li class="proofpoint"> <li class="proofpoint">
<h4 class="title">Work in Teams</h4> <h4 class="title">${_("Work in Teams")}</h4>
<p>Co-authors have full access to all the same authoring tools. Make your course better through a team effort.</p> <p>${_("Co-authors have full access to all the same authoring tools. Make your course better through a team effort.")}</p>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -130,56 +132,56 @@ ...@@ -130,56 +132,56 @@
<div class="wrapper-content-cta wrapper"> <div class="wrapper-content-cta wrapper">
<section class="content content-cta"> <section class="content content-cta">
<header> <header>
<h2 class="sr">Sign Up for Studio Today!</h2> <h2 class="sr">${_("Sign Up for Studio Today!")}</h2>
</header> </header>
<ul class="list-actions"> <ul class="list-actions">
<li class="action-item"> <li class="action-item">
<a href="${reverse('signup')}" class="action action-primary">Sign Up &amp; Start Making an edX Course</a> <a href="${reverse('signup')}" class="action action-primary">${_("Sign Up &amp; Start Making an edX Course")}</a>
</li> </li>
<li class="action-item"> <li class="action-item">
<a href="${reverse('login')}" class="action action-secondary">Already have a Studio Account? Sign In</a> <a href="${reverse('login')}" class="action action-secondary">${_("Already have a Studio Account? Sign In")}</a>
</li> </li>
</ul> </ul>
</section> </section>
</div> </div>
<div class="content-modal" id="hiw-feature1"> <div class="content-modal" id="hiw-feature1">
<h3 class="title">Outlining Your Course</h3> <h3 class="title">${_("Outlining Your Course")}</h3>
<figure> <figure>
<img src="/static/img/hiw-feature1.png" alt="" /> <img src="/static/img/hiw-feature1.png" alt="" />
<figcaption class="description">Simple two-level outline to organize your couse. Drag and drop, and see your course at a glance.</figcaption> <figcaption class="description">${_("Simple two-level outline to organize your couse. Drag and drop, and see your course at a glance.")}</figcaption>
</figure> </figure>
<a href="" rel="view" class="action action-modal-close"> <a href="" rel="view" class="action action-modal-close">
<i class="icon-remove-sign"></i> <i class="icon-remove-sign"></i>
<span class="label">close modal</span> <span class="label">${_("close modal")}</span>
</a> </a>
</div> </div>
<div class="content-modal" id="hiw-feature2"> <div class="content-modal" id="hiw-feature2">
<h3 class="title">More than Just Lectures</h3> <h3 class="title">${_("More than Just Lectures")}</h3>
<figure> <figure>
<img src="/static/img/hiw-feature2.png" alt="" /> <img src="/static/img/hiw-feature2.png" alt="" />
<figcaption class="description">Quickly create videos, text snippets, inline discussions, and a variety of problem types.</figcaption> <figcaption class="description">${_("Quickly create videos, text snippets, inline discussions, and a variety of problem types.")}</figcaption>
</figure> </figure>
<a href="" rel="view" class="action action-modal-close"> <a href="" rel="view" class="action action-modal-close">
<i class="icon-remove-sign"></i> <i class="icon-remove-sign"></i>
<span class="label">close modal</span> <span class="label">${_("close modal")}</span>
</a> </a>
</div> </div>
<div class="content-modal" id="hiw-feature3"> <div class="content-modal" id="hiw-feature3">
<h3 class="title">Publishing on Date</h3> <h3 class="title">${_("Publishing on Date")}</h3>
<figure> <figure>
<img src="/static/img/hiw-feature3.png" alt="" /> <img src="/static/img/hiw-feature3.png" alt="" />
<figcaption class="description">Simply set the date of a section or subsection, and Studio will publish it to your students for you.</figcaption> <figcaption class="description">${_("Simply set the date of a section or subsection, and Studio will publish it to your students for you.")}</figcaption>
</figure> </figure>
<a href="" rel="view" class="action action-modal-close"> <a href="" rel="view" class="action action-modal-close">
<i class="icon-remove-sign"></i> <i class="icon-remove-sign"></i>
<span class="label">close modal</span> <span class="label">${_("close modal")}</span>
</a> </a>
</div> </div>
</%block> </%block>
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Course Import</%block> <%block name="title">${_("Course Import")}</%block>
<%block name="bodyclass">is-signedin course tools import</%block> <%block name="bodyclass">is-signedin course tools import</%block>
<%block name="content"> <%block name="content">
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast has-subtitle"> <header class="mast has-subtitle">
<h1 class="page-header"> <h1 class="page-header">
<small class="subtitle">Tools</small> <small class="subtitle">${_("Tools")}</small>
<span class="sr">&gt; </span>Course Import <span class="sr">&gt; </span>${_("Course Import")}
</h1> </h1>
</header> </header>
</div> </div>
...@@ -19,19 +20,18 @@ ...@@ -19,19 +20,18 @@
<div class="inner-wrapper"> <div class="inner-wrapper">
<article class="import-overview"> <article class="import-overview">
<div class="description"> <div class="description">
<p><strong>Importing a new course will delete all content currently associated with your course <p><strong>${_("Importing a new course will delete all content currently associated with your course and replace it with the contents of the uploaded file.")}</strong></p>
and replace it with the contents of the uploaded file.</strong></p> ## Translators: ".tar.gz" is a file extension, and files with that extension are called "gzipped tar files": these terms should not be translated
<p>File uploads must be gzipped tar files (.tar.gz) containing, at a minimum, a <code>course.xml</code> file.</p> <p>${_("File uploads must be gzipped tar files (.tar.gz) containing, at a minimum, a {filename} file.").format(filename='<code>course.xml</code>')}</p>
<p>Please note that if your course has any problems with auto-generated <code>url_name</code> nodes, <p>${_("Please note that if your course has any problems with auto-generated {nodename} nodes, re-importing your course could cause the loss of student data associated with those problems.").format(nodename='<code>url_name</code>')}</p>
re-importing your course could cause the loss of student data associated with those problems.</p>
</div> </div>
<form action="${reverse('import_course', kwargs=dict(org=context_course.location.org, course=context_course.location.course, name=context_course.location.name))}" method="post" enctype="multipart/form-data" class="import-form"> <form action="${reverse('import_course', kwargs=dict(org=context_course.location.org, course=context_course.location.course, name=context_course.location.name))}" method="post" enctype="multipart/form-data" class="import-form">
<h2>Course to import:</h2> <h2>${_("Course to import:")}</h2>
<p class="error-block"></p> <p class="error-block"></p>
<a href="#" class="choose-file-button">Choose File</a> <a href="#" class="choose-file-button">${_("Choose File")}</a>
<p class="file-name-block"><span class="file-name"></span><a href="#" class="choose-file-button-inline">change</a></p> <p class="file-name-block"><span class="file-name"></span><a href="#" class="choose-file-button-inline">${_("change")}</a></p>
<input type="file" name="course-data" class="file-input"> <input type="file" name="course-data" class="file-input">
<input type="submit" value="Replace my course with the one above" class="submit-button"> <input type="submit" value="${_('Replace my course with the one above')}" class="submit-button">
<div class="progress-bar"> <div class="progress-bar">
<div class="progress-fill"></div> <div class="progress-fill"></div>
<div class="percent">0%</div> <div class="percent">0%</div>
...@@ -68,11 +68,11 @@ $('form').ajaxForm({ ...@@ -68,11 +68,11 @@ $('form').ajaxForm({
}, },
complete: function(xhr) { complete: function(xhr) {
if (xhr.status == 200) { if (xhr.status == 200) {
alert('Your import was successful.'); alert('${_("Your import was successful.")}');
window.location = '${successful_import_redirect_url}'; window.location = '${successful_import_redirect_url}';
} }
else else
alert('Your import has failed.\n\n' + xhr.responseText); alert('${_("Your import has failed.")}\n\n' + xhr.responseText);
submitBtn.show(); submitBtn.show();
bar.hide(); bar.hide();
} }
......
...@@ -11,22 +11,22 @@ ...@@ -11,22 +11,22 @@
<div class="item-details"> <div class="item-details">
<form class="course-info"> <form class="course-info">
<div class="row"> <div class="row">
<label>Course Name</label> <label>${_("Course Name")}</label>
<input type="text" class="new-course-name" /> <input type="text" class="new-course-name" />
</div> </div>
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<label>Organization</label> <label>${_("Organization")}</label>
<input type="text" class="new-course-org" /> <input type="text" class="new-course-org" />
</div> </div>
<div class="column"> <div class="column">
<label>Course Number</label> <label>${_("Course Number")}</label>
<input type="text" class="new-course-number" /> <input type="text" class="new-course-number" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<input type="submit" value="Save" class="new-course-save" data-template="${new_course_template}" /> <input type="submit" value="${_('Save')}" class="new-course-save" data-template="${new_course_template}" />
<input type="button" value="Cancel" class="new-course-cancel" /> <input type="button" value="${_('Cancel')}" class="new-course-cancel" />
</div> </div>
</form> </form>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Sign In</%block> <%block name="title">${_("Sign In")}</%block>
<%block name="bodyclass">not-signedin signin</%block> <%block name="bodyclass">not-signedin signin</%block>
<%block name="content"> <%block name="content">
...@@ -8,32 +9,32 @@ ...@@ -8,32 +9,32 @@
<div class="wrapper-content wrapper"> <div class="wrapper-content wrapper">
<section class="content"> <section class="content">
<header> <header>
<h1 class="title title-1">Sign In to edX Studio</h1> <h1 class="title title-1">${_("Sign In to edX Studio")}</h1>
<a href="${reverse('signup')}" class="action action-signin">Don't have a Studio Account? Sign up!</a> <a href="${reverse('signup')}" class="action action-signin">${_("Don't have a Studio Account? Sign up!")}</a>
</header> </header>
<article class="content-primary" role="main"> <article class="content-primary" role="main">
<form id="login_form" method="post" action="login_post"> <form id="login_form" method="post" action="login_post">
<fieldset> <fieldset>
<legend class="sr">Required Information to Sign In to edX Studio</legend> <legend class="sr">${_("Required Information to Sign In to edX Studio")}</legend>
<ol class="list-input"> <ol class="list-input">
<li class="field text required" id="field-email"> <li class="field text required" id="field-email">
<label for="email">Email Address</label> <label for="email">${_("Email Address")}</label>
<input id="email" type="email" name="email" placeholder="e.g. jane.doe@gmail.com" /> <input id="email" type="email" name="email" placeholder="e.g. jane.doe@gmail.com" />
</li> </li>
<li class="field text required" id="field-password"> <li class="field text required" id="field-password">
<a href="${forgot_password_link}" class="action action-forgotpassword" tabindex="-1">Forgot password?</a> <a href="${forgot_password_link}" class="action action-forgotpassword" tabindex="-1">${_("Forgot password?")}</a>
<label for="password">Password</label> <label for="password">${_("Password")}</label>
<input id="password" type="password" name="password" /> <input id="password" type="password" name="password" />
</li> </li>
</ol> </ol>
</fieldset> </fieldset>
<div class="form-actions"> <div class="form-actions">
<button type="submit" id="submit" name="submit" class="action action-primary">Sign In to edX Studio</button> <button type="submit" id="submit" name="submit" class="action action-primary">${_("Sign In to edX Studio")}</button>
</div> </div>
<!-- no honor code for CMS, but need it because we're using the lms student object --> <!-- no honor code for CMS, but need it because we're using the lms student object -->
...@@ -42,11 +43,11 @@ ...@@ -42,11 +43,11 @@
</article> </article>
<aside class="content-supplementary" role="complimentary"> <aside class="content-supplementary" role="complimentary">
<h2 class="sr">Studio Support</h2> <h2 class="sr">${_("Studio Support")}</h2>
<div class="bit"> <div class="bit">
<h3 class="title-3">Need Help?</h3> <h3 class="title-3">${_("Need Help?")}</h3>
<p>Having trouble with your account? Use <a href="http://help.edge.edx.org" rel="external">our support center</a> to look over self help steps, find solutions others have found to the same problem, or let us know of your issue.</p> <p>${_('Having trouble with your account? Use {link_start}our support center{link_end} to look over self help steps, find solutions others have found to the same problem, or let us know of your issue.').format(link_start='<a href="http://help.edge.edx.org" rel="external">', link_end='</a>')}</p>
</div> </div>
</aside> </aside>
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="title">Course Team Settings</%block> <%block name="title">${_("Course Team Settings")}</%block>
<%block name="bodyclass">is-signedin course users settings team</%block> <%block name="bodyclass">is-signedin course users settings team</%block>
...@@ -7,16 +8,16 @@ ...@@ -7,16 +8,16 @@
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast has-actions has-subtitle"> <header class="mast has-actions has-subtitle">
<h1 class="page-header"> <h1 class="page-header">
<small class="subtitle">Course Settings</small> <small class="subtitle">${_("Course Settings")}</small>
<span class="sr">&gt; </span>Course Team <span class="sr">&gt; </span>${_("Course Team")}
</h1> </h1>
<nav class="nav-actions"> <nav class="nav-actions">
<h3 class="sr">Page Actions</h3> <h3 class="sr">${_("Page Actions")}</h3>
<ul> <ul>
%if allow_actions: %if allow_actions:
<li class="nav-item"> <li class="nav-item">
<a href="#" class="button new-button new-user-button"><i class="icon-plus"></i> New User</a> <a href="#" class="button new-button new-user-button"><i class="icon-plus"></i> ${_("New User")}</a>
</li> </li>
%endif %endif
</ul> </ul>
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
<div class="inner-wrapper"> <div class="inner-wrapper">
<div class="details"> <div class="details">
<p>The following list of users have been designated as course staff. This means that these users will have permissions to modify course content. You may add additional course staff below, if you are the course instructor. Please note that they must have already registered and verified their account.</p> <p>${_("The following list of users have been designated as course staff. This means that these users will have permissions to modify course content. You may add additional course staff below, if you are the course instructor. Please note that they must have already registered and verified their account.")}</p>
</div> </div>
<article class="user-overview"> <article class="user-overview">
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! <%!
import logging import logging
from xmodule.util import date_utils from xmodule.util import date_utils
%> %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Course Outline</%block> <%block name="title">${_("Course Outline")}</%block>
<%block name="bodyclass">is-signedin course outline</%block> <%block name="bodyclass">is-signedin course outline</%block>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
<%namespace name="units" file="widgets/units.html" /> <%namespace name="units" file="widgets/units.html" />
<%block name="jsextra"> <%block name="jsextra">
<link rel="stylesheet" type="text/css" href="${static.url('js/vendor/timepicker/jquery.timepicker.css')}" /> <link rel="stylesheet" type="text/css" href="${static.url('js/vendor/timepicker/jquery.timepicker.css')}" />
<script src="${static.url('js/vendor/timepicker/jquery.timepicker.js')}"></script> <script src="${static.url('js/vendor/timepicker/jquery.timepicker.js')}"></script>
<script src="${static.url('js/vendor/timepicker/datepair.js')}"></script> <script src="${static.url('js/vendor/timepicker/datepair.js')}"></script>
<script src="${static.url('js/vendor/date.js')}"></script> <script src="${static.url('js/vendor/date.js')}"></script>
...@@ -60,13 +61,13 @@ ...@@ -60,13 +61,13 @@
<script type="text/template" id="new-section-template"> <script type="text/template" id="new-section-template">
<section class="courseware-section branch new-section"> <section class="courseware-section branch new-section">
<header> <header>
<a href="#" data-tooltip="Collapse/expand this section" class="expand-collapse-icon collapse"></a> <a href="#" data-tooltip="${_('Collapse/expand this section')}" class="expand-collapse-icon collapse"></a>
<div class="item-details"> <div class="item-details">
<h3 class="section-name"> <h3 class="section-name">
<form class="section-name-form"> <form class="section-name-form">
<input type="text" value="New Section Name" class="new-section-name" /> <input type="text" value="${_('New Section Name')}" class="new-section-name" />
<input type="submit" class="new-section-name-save" data-parent="${parent_location}" data-template="${new_section_template}" value="Save" /> <input type="submit" class="new-section-name-save" data-parent="${parent_location}" data-template="${new_section_template}" value="${_('Save')}" />
<input type="button" class="new-section-name-cancel" value="Cancel" /></h3> <input type="button" class="new-section-name-cancel" value="${_('Cancel')}" /></h3>
</form> </form>
</div> </div>
</header> </header>
...@@ -76,19 +77,19 @@ ...@@ -76,19 +77,19 @@
<script type="text/template" id="blank-slate-template"> <script type="text/template" id="blank-slate-template">
<section class="courseware-section branch new-section"> <section class="courseware-section branch new-section">
<header> <header>
<a href="#" data-tooltip="Collapse/expand this section" class="expand-collapse-icon collapse"></a> <a href="#" data-tooltip="${_('Collapse/expand this section')}" class="expand-collapse-icon collapse"></a>
<div class="item-details"> <div class="item-details">
<h3 class="section-name"> <h3 class="section-name">
<span class="section-name-span">Click here to set the section name</span> <span class="section-name-span">Click here to set the section name</span>
<form class="section-name-form"> <form class="section-name-form">
<input type="text" value="New Section Name" class="new-section-name" /> <input type="text" value="${_('New Section Name')}" class="new-section-name" />
<input type="submit" class="new-section-name-save" data-parent="${parent_location}" data-template="${new_section_template}" value="Save" /> <input type="submit" class="new-section-name-save" data-parent="${parent_location}" data-template="${new_section_template}" value="${_('Save')}" />
<input type="button" class="new-section-name-cancel" value="Cancel" /></h3> <input type="button" class="new-section-name-cancel" value="${_('Cancel')}" /></h3>
</form> </form>
</div> </div>
<div class="item-actions"> <div class="item-actions">
<a href="#" data-tooltip="Delete this section" class="delete-button delete-section-button"><span class="delete-icon"></span></a> <a href="#" data-tooltip="${_('Delete this section')}" class="delete-button delete-section-button"><span class="delete-icon"></span></a>
<a href="#" data-tooltip="Drag to re-order" class="drag-handle"></a> <a href="#" data-tooltip="${_('Drag to re-order')}" class="drag-handle"></a>
</div> </div>
</header> </header>
</section> </section>
...@@ -100,16 +101,16 @@ ...@@ -100,16 +101,16 @@
<form class="new-subsection-form"> <form class="new-subsection-form">
<span class="folder-icon"></span> <span class="folder-icon"></span>
<span class="subsection-name"> <span class="subsection-name">
<input type="text" value="New Subsection" class="new-subsection-name-input" /> <input type="text" value="${_('New Subsection')}" class="new-subsection-name-input" />
</span> </span>
<input type="submit" value="Save" class="new-subsection-name-save" /> <input type="submit" value="${_('Save')}" class="new-subsection-name-save" />
<input type="button" value="Cancel" class="new-subsection-name-cancel" /> <input type="button" value="${_('Cancel')}" class="new-subsection-name-cancel" />
</form> </form>
</div> </div>
<ol> <ol>
<li> <li>
<a href="unit.html" class="new-unit-item"> <a href="unit.html" class="new-unit-item">
<span class="new-unit-icon"></span>New Unit <span class="new-unit-icon"></span>${_('New Unit')}
</a> </a>
</li> </li>
</ol> </ol>
...@@ -121,21 +122,21 @@ ...@@ -121,21 +122,21 @@
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast has-actions has-subtitle"> <header class="mast has-actions has-subtitle">
<h1 class="page-header"> <h1 class="page-header">
<small class="subtitle">Content</small> <small class="subtitle">${_("Content")}</small>
<span class="sr">&gt; </span>Course Outline <span class="sr">&gt; </span>${_("Course Outline")}
</h1> </h1>
<nav class="nav-actions"> <nav class="nav-actions">
<h3 class="sr">Page Actions</h3> <h3 class="sr">${_("Page Actions")}</h3>
<ul> <ul>
<li class="nav-item"> <li class="nav-item">
<a href="#" class="toggle-button toggle-button-sections"><i class="icon-arrow-up"></i> <span class="label">Collapse All Sections</span></a> <a href="#" class="toggle-button toggle-button-sections"><i class="icon-arrow-up"></i> <span class="label">${_("Collapse All Sections")}</span></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="#" class="button new-button new-courseware-section-button"><i class="icon-plus"></i> New Section</a> <a href="#" class="button new-button new-courseware-section-button"><i class="icon-plus"></i> ${_("New Section")}</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a href="${lms_link}" rel="external" class="button view-button view-live-button">View Live</a> <a href="${lms_link}" rel="external" class="button view-button view-live-button">${_("View Live")}</a>
</li> </li>
</ul> </ul>
</nav> </nav>
...@@ -148,7 +149,7 @@ ...@@ -148,7 +149,7 @@
% for section in sections: % for section in sections:
<section class="courseware-section branch" data-id="${section.location}"> <section class="courseware-section branch" data-id="${section.location}">
<header> <header>
<a href="#" data-tooltip="Expand/collapse this section" class="expand-collapse-icon collapse"></a> <a href="#" data-tooltip="${_('Expand/collapse this section')}" class="expand-collapse-icon collapse"></a>
<div class="item-details" data-id="${section.location}"> <div class="item-details" data-id="${section.location}">
<h3 class="section-name" data-name="${section.display_name_with_default | h}"></h3> <h3 class="section-name" data-name="${section.display_name_with_default | h}"></h3>
...@@ -162,26 +163,26 @@ ...@@ -162,26 +163,26 @@
start_time_str = '' start_time_str = ''
%> %>
%if section.lms.start is None: %if section.lms.start is None:
<span class="published-status">This section has not been released.</span> <span class="published-status">${_("This section has not been released.")}</span>
<a href="#" class="schedule-button" data-date="" data-time="" data-id="${section.location}">Schedule</a> <a href="#" class="schedule-button" data-date="" data-time="" data-id="${section.location}">${_("Schedule")}</a>
%else: %else:
<span class="published-status"><strong>Will Release:</strong> <span class="published-status"><strong>${_("Will Release:")}</strong>
${date_utils.get_default_time_display(section.lms.start)}</span> ${date_utils.get_default_time_display(section.lms.start)}</span>
<a href="#" class="edit-button" data-date="${start_date_str}" <a href="#" class="edit-button" data-date="${start_date_str}"
data-time="${start_time_str}" data-id="${section.location}">Edit</a> data-time="${start_time_str}" data-id="${section.location}">${_("Edit")}</a>
%endif %endif
</div> </div>
</div> </div>
<div class="item-actions"> <div class="item-actions">
<a href="#" data-tooltip="Delete this section" class="delete-button delete-section-button"><span class="delete-icon"></span></a> <a href="#" data-tooltip="${_('Delete this section')}" class="delete-button delete-section-button"><span class="delete-icon"></span></a>
<a href="#" data-tooltip="Drag to reorder" class="drag-handle"></a> <a href="#" data-tooltip="${_('Drag to reorder')}" class="drag-handle"></a>
</div> </div>
</header> </header>
<div class="subsection-list"> <div class="subsection-list">
<div class="list-header"> <div class="list-header">
<a href="#" class="new-subsection-item" data-template="${new_subsection_template}"> <a href="#" class="new-subsection-item" data-template="${new_subsection_template}">
<span class="new-folder-icon"></span>New Subsection <span class="new-folder-icon"></span>${_("New Subsection")}
</a> </a>
</div> </div>
<ol data-section-id="${section.location.url()}"> <ol data-section-id="${section.location.url()}">
...@@ -189,19 +190,19 @@ ...@@ -189,19 +190,19 @@
<li class="branch collapsed id-holder" data-id="${subsection.location}"> <li class="branch collapsed id-holder" data-id="${subsection.location}">
<div class="section-item"> <div class="section-item">
<div class="details"> <div class="details">
<a href="#" data-tooltip="Expand/collapse this subsection" class="expand-collapse-icon expand"></a> <a href="#" data-tooltip="${_('Expand/collapse this subsection')}" class="expand-collapse-icon expand"></a>
<a href="${reverse('edit_subsection', args=[subsection.location])}"> <a href="${reverse('edit_subsection', args=[subsection.location])}">
<span class="folder-icon"></span> <span class="folder-icon"></span>
<span class="subsection-name"><span class="subsection-name-value">${subsection.display_name_with_default}</span></span> <span class="subsection-name"><span class="subsection-name-value">${subsection.display_name_with_default}</span></span>
</a> </a>
</div> </div>
<div class="gradable-status" data-initial-status="${subsection.lms.format if subsection.lms.format is not None else 'Not Graded'}"> <div class="gradable-status" data-initial-status="${subsection.lms.format if subsection.lms.format is not None else _('Not Graded')}">
</div> </div>
<div class="item-actions"> <div class="item-actions">
<a href="#" data-tooltip="Delete this subsection" class="delete-button delete-subsection-button"><span class="delete-icon"></span></a> <a href="#" data-tooltip="${_('Delete this subsection')}" class="delete-button delete-subsection-button"><span class="delete-icon"></span></a>
<a href="#" data-tooltip="Drag to reorder" class="drag-handle"></a> <a href="#" data-tooltip="${_('Drag to reorder')}" class="drag-handle"></a>
</div> </div>
</div> </div>
${units.enum_units(subsection)} ${units.enum_units(subsection)}
...@@ -218,22 +219,22 @@ ...@@ -218,22 +219,22 @@
<div class="edit-subsection-publish-settings"> <div class="edit-subsection-publish-settings">
<div class="settings"> <div class="settings">
<h3>Section Release Date</h3> <h3>${_("Section Release Date")}</h3>
<div class="picker datepair"> <div class="picker datepair">
<div class="field field-start-date"> <div class="field field-start-date">
<label for="">Release Day</label> <label for="">${_("Release Day")}</label>
<input class="start-date date" type="text" name="start_date" value="" placeholder="MM/DD/YYYY" class="date" size='15' autocomplete="off"/> <input class="start-date date" type="text" name="start_date" value="" placeholder="MM/DD/YYYY" class="date" size='15' autocomplete="off"/>
</div> </div>
<div class="field field-start-time"> <div class="field field-start-time">
<label for="">Release Time (<abbr title="Coordinated Universal Time">UTC</abbr>)</label> <label for="">${_("Release Time")} (<abbr title="${_("Coordinated Universal Time")}">UTC</abbr>)</label>
<input class="start-time time" type="text" name="start_time" value="" placeholder="HH:MM" class="time" size='10' autocomplete="off"/> <input class="start-time time" type="text" name="start_time" value="" placeholder="HH:MM" class="time" size='10' autocomplete="off"/>
</div> </div>
<div class="description"> <div class="description">
<p>On the date set above, this section – <strong class="section-name"></strong> – will be released to students. Any units marked private will only be visible to admins.</p> <p>${_('On the date set above, this section - {name} - will be released to students. Any units marked private will only be visible to admins.').format(name='<strong class="section-name"></strong>')}</p>
</div> </div>
</div> </div>
<a href="#" class="save-button">Save</a><a href="#" class="cancel-button">Cancel</a> <a href="#" class="save-button">${_("Save")}</a><a href="#" class="cancel-button">${_("Cancel")}</a>
</div> </div>
</div> </div>
</%block> </%block>
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%inherit file="../base.html" /> <%inherit file="../base.html" />
...@@ -16,15 +17,15 @@ ...@@ -16,15 +17,15 @@
<p style='padding-top:100px; text-align:center;'> <p style='padding-top:100px; text-align:center;'>
%if not already_active: %if not already_active:
Thanks for activating your account. ${_("Thanks for activating your account.")}
%else: %else:
This account has already been activated. ${_("This account has already been activated.")}
%endif %endif
%if user_logged_in: %if user_logged_in:
Visit your <a href="/">dashboard</a> to see your courses. ${_("Visit your {link_start}dashboard{link_end} to see your courses.").format(link_start='<a href="/">', link_end='</a>')}
%else: %else:
You can now <a href="${reverse('login')}">login</a>. ${_("You can now {link_start}login{link_end}.").format(link_start='<a href="{url}">'.format(url=reverse('login')), link_end='</a>')}
%endif %endif
</p> </p>
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<h1>Check your email</h1> <h1>Check your email</h1>
<p>An activation link has been sent to ${ email }, along with <p>${_("An activation link has been sent to {emaiL}, along with instructions for activating your account.").format(email=email)}</p>
instructions for activating your account.</p>
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="title">Schedule &amp; Details Settings</%block> <%block name="title">${_("Schedule &amp; Details Settings")}</%block>
<%block name="bodyclass">is-signedin course schedule settings</%block> <%block name="bodyclass">is-signedin course schedule settings</%block>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Advanced Settings</%block> <%block name="title">${_("Advanced Settings")}</%block>
<%block name="bodyclass">is-signedin course advanced settings</%block> <%block name="bodyclass">is-signedin course advanced settings</%block>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
...@@ -44,8 +45,8 @@ editor.render(); ...@@ -44,8 +45,8 @@ editor.render();
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast has-subtitle"> <header class="mast has-subtitle">
<h1 class="page-header"> <h1 class="page-header">
<small class="subtitle">Settings</small> <small class="subtitle">${_("Settings")}</small>
<span class="sr">&gt; </span>Advanced Settings <span class="sr">&gt; </span>${_("Advanced Settings")}
</h1> </h1>
</header> </header>
</div> </div>
...@@ -56,20 +57,20 @@ editor.render(); ...@@ -56,20 +57,20 @@ editor.render();
<form id="settings_advanced" class="settings-advanced" method="post" action=""> <form id="settings_advanced" class="settings-advanced" method="post" action="">
<div class="message message-status confirm"> <div class="message message-status confirm">
Your policy changes have been saved. ${_("Your policy changes have been saved.")}
</div> </div>
<div class="message message-status error"> <div class="message message-status error">
There was an error saving your information. Please see below. ${_("There was an error saving your information. Please see below.")}
</div> </div>
<section class="group-settings advanced-policies"> <section class="group-settings advanced-policies">
<header> <header>
<h2 class="title-2">Manual Policy Definition</h2> <h2 class="title-2">${_("Manual Policy Definition")}</h2>
<span class="tip">Manually Edit Course Policy Values (JSON Key / Value pairs)</span> <span class="tip">${_("Manually Edit Course Policy Values (JSON Key / Value pairs)")}</span>
</header> </header>
<p class="instructions"><strong>Warning</strong>: Do not modify these policies unless you are familiar with their purpose.</p> <p class="instructions">${_("<strong>Warning</strong>: Do not modify these policies unless you are familiar with their purpose.")}</p>
<ul class="list-input course-advanced-policy-list enum"> <ul class="list-input course-advanced-policy-list enum">
...@@ -80,22 +81,22 @@ editor.render(); ...@@ -80,22 +81,22 @@ editor.render();
<aside class="content-supplementary" role="complimentary"> <aside class="content-supplementary" role="complimentary">
<div class="bit"> <div class="bit">
<h3 class="title-3">How will these settings be used?</h3> <h3 class="title-3">${_("How will these settings be used?")}</h3>
<p>Manual policies are JSON-based key and value pairs that give you control over specific course settings that edX Studio will use when displaying and running your course.</p> <p>${_("Manual policies are JSON-based key and value pairs that give you control over specific course settings that edX Studio will use when displaying and running your course.")}</p>
<p>Any policies you modify here will override any other information you've defined elsewhere in Studio. With this in mind, please be very careful and do not edit policies that you are unfamiliar with (both their purpose and their syntax).</p> <p>${_("Any policies you modify here will override any other information you've defined elsewhere in Studio. With this in mind, please be very careful and do not edit policies that you are unfamiliar with (both their purpose and their syntax)")}.</p>
</div> </div>
<div class="bit"> <div class="bit">
% if context_course: % if context_course:
<% ctx_loc = context_course.location %> <% ctx_loc = context_course.location %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<h3 class="title-3">Other Course Settings</h3> <h3 class="title-3">${_("Other Course Settings")}</h3>
<nav class="nav-related"> <nav class="nav-related">
<ul> <ul>
<li class="nav-item"><a href="${reverse('contentstore.views.get_course_settings', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}">Details &amp; Schedule</a></li> <li class="nav-item"><a href="${reverse('contentstore.views.get_course_settings', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}">${_("Details &amp; Schedule")}</a></li>
<li class="nav-item"><a href="${reverse('contentstore.views.course_config_graders_page', kwargs={'org' : ctx_loc.org, 'course' : ctx_loc.course, 'name': ctx_loc.name})}">Grading</a></li> <li class="nav-item"><a href="${reverse('contentstore.views.course_config_graders_page', kwargs={'org' : ctx_loc.org, 'course' : ctx_loc.course, 'name': ctx_loc.name})}">${_("Grading")}</a></li>
<li class="nav-item"><a href="${reverse('manage_users', kwargs=dict(location=ctx_loc))}">Course Team</a></li> <li class="nav-item"><a href="${reverse('manage_users', kwargs=dict(location=ctx_loc))}">${_("Course Team")}</a></li>
</ul> </ul>
</nav> </nav>
% endif % endif
......
<%! from django.utils.translation import ugettext as _ %>
<!-- NOTE not used currently but retained b/c it's yet-to-be-wired functionality --> <!-- NOTE not used currently but retained b/c it's yet-to-be-wired functionality -->
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="title">Schedule and details</%block> <%block name="title">${_("Schedule and details")}</%block>
<%block name="bodyclass">is-signedin course settings</%block> <%block name="bodyclass">is-signedin course settings</%block>
...@@ -26,17 +27,17 @@ from contentstore import utils ...@@ -26,17 +27,17 @@ from contentstore import utils
<!-- --> <!-- -->
<div class="main-wrapper"> <div class="main-wrapper">
<div class="inner-wrapper"> <div class="inner-wrapper">
<h1>Settings</h1> <h1>${_("Settings")}</h1>
<article class="settings-overview"> <article class="settings-overview">
<div class="settings-page-section main-column"> <div class="settings-page-section main-column">
<section class="settings-faculty"> <section class="settings-faculty">
<h2 class="title">Faculty</h2> <h2 class="title">${_("Faculty")}</h2>
<section class="settings-faculty-members"> <section class="settings-faculty-members">
<header> <header>
<h3>Faculty Members</h3> <h3>${_("Faculty Members")}</h3>
<span class="detail">Individuals instructing and help with this course</span> <span class="detail">${_("Individuals instructing and help with this course")}</span>
</header> </header>
<div class="row"> <div class="row">
...@@ -44,74 +45,74 @@ from contentstore import utils ...@@ -44,74 +45,74 @@ from contentstore import utils
<ul class="input-list course-faculty-list"> <ul class="input-list course-faculty-list">
<li class="input input-existing multi course-faculty-list-item"> <li class="input input-existing multi course-faculty-list-item">
<div class="row row-col2"> <div class="row row-col2">
<label for="course-faculty-1-firstname">Faculty First Name:</label> <label for="course-faculty-1-firstname">${_("Faculty First Name:")}</label>
<div class="field"> <div class="field">
<input type="text" class="long" id="course-faculty-1-firstname"> <input type="text" class="long" id="course-faculty-1-firstname">
</div> </div>
</div> </div>
<div class="row row-col2"> <div class="row row-col2">
<label for="course-faculty-1-lastname">Faculty Last Name:</label> <label for="course-faculty-1-lastname">${_("Faculty Last Name:")}</label>
<div class="field"> <div class="field">
<input type="text" class="long" id="course-faculty-1-lastname"> <input type="text" class="long" id="course-faculty-1-lastname">
</div> </div>
</div> </div>
<div class="row row-col2"> <div class="row row-col2">
<label for="course-faculty-1-photo">Faculty Photo</label> <label for="course-faculty-1-photo">${_("Faculty Photo")}</label>
<div class="field"> <div class="field">
<div class="input input-existing"> <div class="input input-existing">
<div class="current current-faculty-1-photo"> <div class="current current-faculty-1-photo">
<a href="#" class="remove-item remove-faculty-photo remove-video-data"><span class="delete-icon"></span> Delete Faculty Photo</a> <a href="#" class="remove-item remove-faculty-photo remove-video-data"><span class="delete-icon"></span> ${_("Delete Faculty Photo")}</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label for="course-faculty-1-bio">Faculty Bio:</label> <label for="course-faculty-1-bio">${_("Faculty Bio:")}</label>
<div class="field"> <div class="field">
<textarea class="long tall edit-box tinymce" id="course-faculty-1-bio"></textarea> <textarea class="long tall edit-box tinymce" id="course-faculty-1-bio"></textarea>
<span class="tip tip-stacked">A brief description of your education, experience, and expertise</span> <span class="tip tip-stacked">${_("A brief description of your education, experience, and expertise")}</span>
</div> </div>
</div> </div>
<a href="#" class="remove-item remove-faculty-data"><span class="delete-icon"></span> Delete Faculty Member</a> <a href="#" class="remove-item remove-faculty-data"><span class="delete-icon"></span> ${_("Delete Faculty Member")}</a>
</li> </li>
<li class="input multi course-faculty-list-item"> <li class="input multi course-faculty-list-item">
<div class="row row-col2"> <div class="row row-col2">
<label for="course-faculty-2-firstname">Faculty First Name:</label> <label for="course-faculty-2-firstname">${_("Faculty First Name:")}</label>
<div class="field"> <div class="field">
<input type="text" class="long" id="course-faculty-2-firstname"> <input type="text" class="long" id="course-faculty-2-firstname">
</div> </div>
</div> </div>
<div class="row row-col2"> <div class="row row-col2">
<label for="course-faculty-2-lastname">Faculty Last Name:</label> <label for="course-faculty-2-lastname">${_("Faculty Last Name:")}</label>
<div class="field"> <div class="field">
<input type="text" class="long" id="course-faculty-2-lastname"> <input type="text" class="long" id="course-faculty-2-lastname">
</div> </div>
</div> </div>
<div class="row row-col2"> <div class="row row-col2">
<label for="course-faculty-2-photo">Faculty Photo</label> <label for="course-faculty-2-photo">${_("Faculty Photo")}</label>
<div class="field"> <div class="field">
<div class="input"> <div class="input">
<a href="#" class="new-item new-faculty-photo add-faculty-photo-data" id="course-faculty-2-photo"> <a href="#" class="new-item new-faculty-photo add-faculty-photo-data" id="course-faculty-2-photo">
<span class="upload-icon"></span>Upload Faculty Photo <span class="upload-icon"></span>${_("Upload Faculty Photo")}
</a> </a>
<span class="tip tip-inline">Max size: 30KB</span> <span class="tip tip-inline">${_("Max size: 30KB")}</span>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label for="course-faculty-2-bio">Faculty Bio:</label> <label for="course-faculty-2-bio">${_("Faculty Bio:")}</label>
<div class="field"> <div class="field">
<div clas="input"> <div clas="input">
<textarea class="long tall edit-box tinymce" id="course-faculty-2-bio"></textarea> <textarea class="long tall edit-box tinymce" id="course-faculty-2-bio"></textarea>
<span class="tip tip-stacked">A brief description of your education, experience, and expertise</span> <span class="tip tip-stacked">${_("A brief description of your education, experience, and expertise")}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -119,7 +120,7 @@ from contentstore import utils ...@@ -119,7 +120,7 @@ from contentstore import utils
</ul> </ul>
<a href="#" class="new-item new-course-faculty-item add-faculty-data"> <a href="#" class="new-item new-course-faculty-item add-faculty-data">
<span class="plus-icon"></span>New Faculty Member <span class="plus-icon"></span>${_("New Faculty Member")}
</a> </a>
</div> </div>
</div> </div>
...@@ -128,78 +129,78 @@ from contentstore import utils ...@@ -128,78 +129,78 @@ from contentstore import utils
</section><!-- .settings-staff --> </section><!-- .settings-staff -->
<section class="settings-problems"> <section class="settings-problems">
<h2 class="title">Problems</h2> <h2 class="title">${_("Problems")}</h2>
<section class="settings-problems-general"> <section class="settings-problems-general">
<header> <header>
<h3>General Settings</h3> <h3>${_("General Settings")}</h3>
<span class="detail">Course-wide settings for all problems</span> <span class="detail">${_("Course-wide settings for all problems")}</span>
</header> </header>
<div class="row row-col2"> <div class="row row-col2">
<h4 class="label">Problem Randomization:</h4> <h4 class="label">${_("Problem Randomization:")}</h4>
<div class="field"> <div class="field">
<div class="input input-radio"> <div class="input input-radio">
<input checked="checked" type="radio" name="course-problems-general-randomization" id="course-problems-general-randomization-always" value="Always"> <input checked="checked" type="radio" name="course-problems-general-randomization" id="course-problems-general-randomization-always" value="${_('Always')}">
<div class="copy"> <div class="copy">
<label for="course-problems-general-randomization-always">Always</label> <label for="course-problems-general-randomization-always">${_("Always")}</label>
<span class="tip tip-stacked"><strong>randomize all</strong> problems</span> <span class="tip tip-stacked">${_("<strong>randomize all</strong> problems")}</span>
</div> </div>
</div> </div>
<div class="input input-radio"> <div class="input input-radio">
<input type="radio" name="course-problems-general-randomization" id="course-problems-general-randomization-never" value="Never"> <input type="radio" name="course-problems-general-randomization" id="course-problems-general-randomization-never" value="${_('Never')}">
<div class="copy"> <div class="copy">
<label for="course-problems-general-randomization-never">Never</label> <label for="course-problems-general-randomization-never">${_("Never")}</label>
<span class="tip tip-stacked"><strong>do not randomize</strong> problems</span> <span class="tip tip-stacked">${_("<strong>do not randomize</strong> problems")}</span>
</div> </div>
</div> </div>
<div class="input input-radio"> <div class="input input-radio">
<input type="radio" name="course-problems-general-randomization" id="course-problems-general-randomization-perstudent" value="Per Student"> <input type="radio" name="course-problems-general-randomization" id="course-problems-general-randomization-perstudent" value="${_('Per Student')}">
<div class="copy"> <div class="copy">
<label for="course-problems-general-randomization-perstudent">Per Student</label> <label for="course-problems-general-randomization-perstudent">${_("Per Student")}</label>
<span class="tip tip-stacked">randomize problems <strong>per student</strong></span> <span class="tip tip-stacked">${_("randomize problems <strong>per student</strong>")}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row row-col2"> <div class="row row-col2">
<h4 class="label">Show Answers:</h4> <h4 class="label">${_("Show Answers:")}</h4>
<div class="field"> <div class="field">
<div class="input input-radio"> <div class="input input-radio">
<input checked="checked" type="radio" name="course-problems-general-showanswer" id="course-problems-general-showanswer-always" value="Always"> <input checked="checked" type="radio" name="course-problems-general-showanswer" id="course-problems-general-showanswer-always" value="${_('Always')}">
<div class="copy"> <div class="copy">
<label for="course-problems-general-showanswer-always">Always</label> <label for="course-problems-general-showanswer-always">${_("Always")}</label>
<span class="tip tip-stacked">Answers will be shown after the number of attempts has been met</span> <span class="tip tip-stacked">${_("Answers will be shown after the number of attempts has been met")}</span>
</div> </div>
</div> </div>
<div class="input input-radio"> <div class="input input-radio">
<input type="radio" name="course-problems-general-showanswer" id="course-problems-general-showanswer-never" value="Never"> <input type="radio" name="course-problems-general-showanswer" id="course-problems-general-showanswer-never" value="${_('Never')}">
<div class="copy"> <div class="copy">
<label for="course-problems-general-showanswer-never">Never</label> <label for="course-problems-general-showanswer-never">${_("Never")}</label>
<span class="tip tip-stacked">Answers will never be shown, regardless of attempts</span> <span class="tip tip-stacked">${_("Answers will never be shown, regardless of attempts")}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row row-col2"> <div class="row row-col2">
<label for="pcourse-roblems-general-attempts">Number of Attempts <br /> Allowed on Problems: </label> <label for="pcourse-roblems-general-attempts">${_("Number of Attempts <br /> Allowed on Problems:")} </label>
<div class="field"> <div class="field">
<div class="input"> <div class="input">
<input type="text" class="short" id="course-problems-general-attempts" placeholder="0 or higher" value="0"> <input type="text" class="short" id="course-problems-general-attempts" placeholder="0 or higher" value="0">
<span class="tip tip-stacked">Students will this have this number of chances to answer a problem. To set infinite atttempts, use "0"</span> <span class="tip tip-stacked">${_('Students will this have this number of chances to answer a problem. To set infinite atttempts, use "0"')}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -207,73 +208,73 @@ from contentstore import utils ...@@ -207,73 +208,73 @@ from contentstore import utils
<section class="settings-problems-assignment-1 settings-extras"> <section class="settings-problems-assignment-1 settings-extras">
<header> <header>
<h3>[Assignment Type Name]</h3> <h3>[${_("Assignment Type Name")}]</h3>
</header> </header>
<div class="row row-col2"> <div class="row row-col2">
<h4 class="label">Problem Randomization:</h4> <h4 class="label">${_("Problem Randomization:")}</h4>
<div class="field"> <div class="field">
<div class="input input-radio"> <div class="input input-radio">
<input checked="checked" type="radio" name="course-problems-assignment-1-randomization" id="course-problems-assignment-1-randomization-always" value="Always"> <input checked="checked" type="radio" name="course-problems-assignment-1-randomization" id="course-problems-assignment-1-randomization-always" value="${_('Always')}">
<div class="copy"> <div class="copy">
<label for="course-problems-assignment-1-randomization-always">Always</label> <label for="course-problems-assignment-1-randomization-always">${_("Always")}</label>
<span class="tip tip-stacked"><strong>randomize all</strong> problems</span> <span class="tip tip-stacked">${_("<strong>randomize all</strong> problems")}</span>
</div> </div>
</div> </div>
<div class="input input-radio"> <div class="input input-radio">
<input type="radio" name="course-problems-assignment-1-randomization" id="course-problems-assignment-1-randomization-never" value="Never"> <input type="radio" name="course-problems-assignment-1-randomization" id="course-problems-assignment-1-randomization-never" value="${_('Never')}">
<div class="copy"> <div class="copy">
<label for="course-problems-assignment-1-randomization-never">Never</label> <label for="course-problems-assignment-1-randomization-never">${_("Never")}</label>
<span class="tip tip-stacked"><strong>do not randomize</strong> problems</span> <span class="tip tip-stacked">${_("<strong>do not randomize</strong> problems")}</span>
</div> </div>
</div> </div>
<div class="input input-radio"> <div class="input input-radio">
<input type="radio" name="course-problems-assignment-1-randomization" id="course-problems-assignment-1-randomization-perstudent" value="Per Student"> <input type="radio" name="course-problems-assignment-1-randomization" id="course-problems-assignment-1-randomization-perstudent" value="${_('Per Student')}">
<div class="copy"> <div class="copy">
<label for="course-problems-assignment-1-randomization-perstudent">Per Student</label> <label for="course-problems-assignment-1-randomization-perstudent">${_("Per Student")}</label>
<span class="tip tip-stacked">randomize problems <strong>per student</strong></span> <span class="tip tip-stacked">${_("randomize problems <strong>per student</strong>")}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row row-col2"> <div class="row row-col2">
<h4 class="label">Show Answers:</h4> <h4 class="label">${_("Show Answers:")}</h4>
<div class="field"> <div class="field">
<div class="input input-radio"> <div class="input input-radio">
<input checked="checked" type="radio" name="course-problems-assignment-1-showanswer" id="course-problems-assignment-1-showanswer-always" value="Always"> <input checked="checked" type="radio" name="course-problems-assignment-1-showanswer" id="course-problems-assignment-1-showanswer-always" value="${_('Always')}">
<div class="copy"> <div class="copy">
<label for="course-problems-assignment-1-showanswer-always">Always</label> <label for="course-problems-assignment-1-showanswer-always">${_("Always")}</label>
<span class="tip tip-stacked">Answers will be shown after the number of attempts has been met</span> <span class="tip tip-stacked">${_("Answers will be shown after the number of attempts has been met")}</span>
</div> </div>
</div> </div>
<div class="input input-radio"> <div class="input input-radio">
<input type="radio" name="course-problems-assignment-1-showanswer" id="course-problems-assignment-1-showanswer-never" value="Never"> <input type="radio" name="course-problems-assignment-1-showanswer" id="course-problems-assignment-1-showanswer-never" value="${_('Never')}">
<div class="copy"> <div class="copy">
<label for="pcourse-roblems-assignment-1-showanswer-never">Never</label> <label for="pcourse-roblems-assignment-1-showanswer-never">${_("Never")}</label>
<span class="tip tip-stacked">Answers will never be shown, regardless of attempts</span> <span class="tip tip-stacked">${_("Answers will never be shown, regardless of attempts")}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row row-col2"> <div class="row row-col2">
<label for="course-problems-assignment-1-attempts">Number of Attempts <br /> Allowed on Problems: </label> <label for="course-problems-assignment-1-attempts">${_("Number of Attempts <br /> Allowed on Problems: ")}</label>
<div class="field"> <div class="field">
<div class="input"> <div class="input">
<input type="text" class="short" id="course-problems-assignment-1-attempts" placeholder="0 or higher" value="0"> <input type="text" class="short" id="course-problems-assignment-1-attempts" placeholder="${_('0 or higher')}" value="0">
<span class="tip tip-stacked">Students will this have this number of chances to answer a problem. To set infinite atttempts, use "0"</span> <span class="tip tip-stacked">${_('Students will this have this number of chances to answer a problem. To set infinite atttempts, use "0"')}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -281,71 +282,71 @@ from contentstore import utils ...@@ -281,71 +282,71 @@ from contentstore import utils
</section><!-- .settings-problems --> </section><!-- .settings-problems -->
<section class="settings-discussions"> <section class="settings-discussions">
<h2 class="title">Discussions</h2> <h2 class="title">${_("Discussions")}</h2>
<section class="settings-discussions-general"> <section class="settings-discussions-general">
<header> <header>
<h3>General Settings</h3> <h3>${_("General Settings")}</h3>
<span class="detail">Course-wide settings for online discussion</span> <span class="detail">${_("Course-wide settings for online discussion")}</span>
</header> </header>
<div class="row row-col2"> <div class="row row-col2">
<h4 class="label">Anonymous Discussions:</h4> <h4 class="label">${_("Anonymous Discussions:")}</h4>
<div class="field"> <div class="field">
<div class="input input-radio"> <div class="input input-radio">
<input type="radio" name="course-discussions-anonymous" id="course-discussions-anonymous-allow" value="Allow"> <input type="radio" name="course-discussions-anonymous" id="course-discussions-anonymous-allow" value="${_('Allow')}">
<div class="copy"> <div class="copy">
<label for="course-discussions-anonymous-allow">Allow</label> <label for="course-discussions-anonymous-allow">${_("Allow")}</label>
<span class="tip tip-stacked">Students and faculty <strong>will be able to post anonymously</strong></span> <span class="tip tip-stacked">${_("Students and faculty <strong>will be able to post anonymously</strong>")}</span>
</div> </div>
</div> </div>
<div class="input input-radio"> <div class="input input-radio">
<input checked="checked" type="radio" name="course-discussions-anonymous" id="course-discussions-anonymous-dontallow" value="Do Not Allow"> <input checked="checked" type="radio" name="course-discussions-anonymous" id="course-discussions-anonymous-dontallow" value="${_('Do Not Allow')}">
<div class="copy"> <div class="copy">
<label for="course-discussions-anonymous-dontallow">Do not allow</label> <label for="course-discussions-anonymous-dontallow">${_("Do not allow")}</label>
<span class="tip tip-stacked"><strong>Posting anonymously is not allowed</strong>. Any previous anonymous posts <strong>will be reverted to non-anonymous</strong></span> <span class="tip tip-stacked">${_("<strong>Posting anonymously is not allowed</strong>. Any previous anonymous posts <strong>will be reverted to non-anonymous</strong>")}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row row-col2"> <div class="row row-col2">
<h4 class="label">Anonymous Discussions:</h4> <h4 class="label">${_("Anonymous Discussions:")}</h4>
<div class="field"> <div class="field">
<div class="input input-radio"> <div class="input input-radio">
<input checked="checked" type="radio" name="course-discussions-anonymous" id="course-discussions-anonymous-allow" value="Allow"> <input checked="checked" type="radio" name="course-discussions-anonymous" id="course-discussions-anonymous-allow" value="${_('Allow')}">
<div class="copy"> <div class="copy">
<label for="course-discussions-anonymous-allow">Allow</label> <label for="course-discussions-anonymous-allow">${_("Allow")}</label>
<span class="tip tip-stacked">Students and faculty <strong>will be able to post anonymously</strong></span> <span class="tip tip-stacked">${_("Students and faculty <strong>will be able to post anonymously</strong>")}</span>
</div> </div>
</div> </div>
<div class="input input-radio"> <div class="input input-radio">
<input disabled="disabled" type="radio" name="course-discussions-anonymous" id="course-discussions-anonymous-dontallow" value="Do Not Allow"> <input disabled="disabled" type="radio" name="course-discussions-anonymous" id="course-discussions-anonymous-dontallow" value="${_('Do Not Allow')}">
<div class="copy"> <div class="copy">
<label for="course-discussions-anonymous-dontallow">Do not allow</label> <label for="course-discussions-anonymous-dontallow">${_("Do not allow")}</label>
<span class="tip tip-stacked">This option is disabled since there are previous discussions that are anonymous.</span> <span class="tip tip-stacked">${_("This option is disabled since there are previous discussions that are anonymous.")}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row row-col2"> <div class="row row-col2">
<h4 class="label">Discussion Categories</h4> <h4 class="label">${_("Discussion Categories")}</h4>
<div class="field enum"> <div class="field enum">
<ul class="input-list course-discussions-categories-list sortable"> <ul class="input-list course-discussions-categories-list sortable">
<li class="input input-existing input-default course-discussions-categories-list-item sortable-item"> <li class="input input-existing input-default course-discussions-categories-list-item sortable-item">
<div class="group"> <div class="group">
<label for="course-discussions-categories-1-name">Category Name: </label> <label for="course-discussions-categories-1-name">${_("Category Name:")} </label>
<input type="text" class="course-discussions-categories-name" id="course-discussions-categories-1-name" placeholder="" value="General" disabled="disabled"> <input type="text" class="course-discussions-categories-name" id="course-discussions-categories-1-name" placeholder="" value="${_('General')}" disabled="disabled">
</div> </div>
<a href="#" class="drag-handle"></a> <a href="#" class="drag-handle"></a>
...@@ -353,7 +354,7 @@ from contentstore import utils ...@@ -353,7 +354,7 @@ from contentstore import utils
<li class="input input-existing input-default course-discussions-categories-list-item sortable-item"> <li class="input input-existing input-default course-discussions-categories-list-item sortable-item">
<div class="group"> <div class="group">
<label for="course-discussions-categories-2-name">Category Name: </label> <label for="course-discussions-categories-2-name">${_("Category Name:")} </label>
<input type="text" class="course-discussions-categories-name" id="course-discussions-categories-2-name" placeholder="" value="Feedback" disabled="disabled"> <input type="text" class="course-discussions-categories-name" id="course-discussions-categories-2-name" placeholder="" value="Feedback" disabled="disabled">
</div> </div>
...@@ -362,8 +363,8 @@ from contentstore import utils ...@@ -362,8 +363,8 @@ from contentstore import utils
<li class="input input-existing input-default course-discussions-categories-list-item sortable-item"> <li class="input input-existing input-default course-discussions-categories-list-item sortable-item">
<div class="group"> <div class="group">
<label for="course-discussions-categories-3-name">Category Name: </label> <label for="course-discussions-categories-3-name">${_("Category Name:")} </label>
<input type="text" class="course-discussions-categories-name" id="course-discussions-categories-3-name" placeholder="" value="Troubleshooting" disabled="disabled"> <input type="text" class="course-discussions-categories-name" id="course-discussions-categories-3-name" placeholder="" value="${_('Troubleshooting')}" disabled="disabled">
</div> </div>
<a href="#" class="drag-handle"></a> <a href="#" class="drag-handle"></a>
...@@ -371,10 +372,10 @@ from contentstore import utils ...@@ -371,10 +372,10 @@ from contentstore import utils
<li class="input input-existing course-discussions-categories-list-item sortable-item"> <li class="input input-existing course-discussions-categories-list-item sortable-item">
<div class="group"> <div class="group">
<label for="course-discussions-categories-4-name">Category Name: </label> <label for="course-discussions-categories-4-name">${_("Category Name:")} </label>
<input type="text" class="course-discussions-categories-name" id="course-discussions-categories-4-name" placeholder="" value="Study Groups"> <input type="text" class="course-discussions-categories-name" id="course-discussions-categories-4-name" placeholder="" value="${_('Study Groups')}">
<a href="#" class="remove-item remove-course-discussions-categories-data"><span class="delete-icon"></span> Delete Category</a> <a href="#" class="remove-item remove-course-discussions-categories-data"><span class="delete-icon"></span> ${_("Delete Category")}</a>
</div> </div>
<a href="#" class="drag-handle"></a> <a href="#" class="drag-handle"></a>
...@@ -382,40 +383,40 @@ from contentstore import utils ...@@ -382,40 +383,40 @@ from contentstore import utils
<li class="input input-existing course-discussions-categories-list-item sortable-item"> <li class="input input-existing course-discussions-categories-list-item sortable-item">
<div class="group"> <div class="group">
<label for="course-discussions-categories-5-name">Category Name: </label> <label for="course-discussions-categories-5-name">${_("Category Name:")} </label>
<input type="text" class="course-discussions-categories-name" id="course-discussions-categories-5-name" placeholder="" value="Lectures"> <input type="text" class="course-discussions-categories-name" id="course-discussions-categories-5-name" placeholder="" value="${_('Lectures')}">
</div> </div>
<a href="#" class="remove-item remove-course-discussions-categories-data"><span class="delete-icon"></span> Delete Category</a> <a href="#" class="remove-item remove-course-discussions-categories-data"><span class="delete-icon"></span> ${_("Delete Category")}</a>
<a href="#" class="drag-handle"></a> <a href="#" class="drag-handle"></a>
</li> </li>
<li class="input input-existing course-discussions-categories-list-item sortable-item"> <li class="input input-existing course-discussions-categories-list-item sortable-item">
<div class="group"> <div class="group">
<label for="course-discussions-categories-6-name">Category Name: </label> <label for="course-discussions-categories-6-name">${_("Category Name:")} </label>
<input type="text" class="course-discussions-categories-name" id="course-discussions-categories-6-name" placeholder="" value="Labs"> <input type="text" class="course-discussions-categories-name" id="course-discussions-categories-6-name" placeholder="" value="${_('Labs')}">
</div> </div>
<a href="#" class="remove-item remove-course-discussions-categories-data"><span class="delete-icon"></span> Delete Category</a> <a href="#" class="remove-item remove-course-discussions-categories-data"><span class="delete-icon"></span> ${_("Delete Category")}</a>
<a href="#" class="drag-handle"></a> <a href="#" class="drag-handle"></a>
</li> </li>
<li class="input input-existing course-discussions-categories-list-item sortable-item"> <li class="input input-existing course-discussions-categories-list-item sortable-item">
<div class="group"> <div class="group">
<label for="course-discussions-categories-6-name">Category Name: </label> <label for="course-discussions-categories-6-name">${_("Category Name:")} </label>
<input type="text" class="course-discussions-categories-name" id="course-discussions-categories-6-name" placeholder="" value=""> <input type="text" class="course-discussions-categories-name" id="course-discussions-categories-6-name" placeholder="" value="">
</div> </div>
<a href="#" class="remove-item remove-course-discussions-categories-data"><span class="delete-icon"></span> Delete Category</a> <a href="#" class="remove-item remove-course-discussions-categories-data"><span class="delete-icon"></span> ${_("Delete Category")}</a>
<a href="#" class="drag-handle"></a> <a href="#" class="drag-handle"></a>
</li> </li>
</ul> </ul>
<a href="#" class="new-item new-course-discussions-categories-item add-categories-data"> <a href="#" class="new-item new-course-discussions-categories-item add-categories-data">
<span class="plus-icon"></span>New Discussion Category <span class="plus-icon"></span>${_("New Discussion Category")}
</a> </a>
</div> </div>
</div> </div>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="title">Grading Settings</%block> <%block name="title">${_("Grading Settings")}</%block>
<%block name="bodyclass">is-signedin course grading settings</%block> <%block name="bodyclass">is-signedin course grading settings</%block>
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
...@@ -41,8 +42,8 @@ from contentstore import utils ...@@ -41,8 +42,8 @@ from contentstore import utils
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast has-subtitle"> <header class="mast has-subtitle">
<h1 class="page-header"> <h1 class="page-header">
<small class="subtitle">Settings</small> <small class="subtitle">${_("Settings")}</small>
<span class="sr">&gt; </span>Grading <span class="sr">&gt; </span>${_("Grading")}
</h1> </h1>
</header> </header>
</div> </div>
...@@ -53,8 +54,8 @@ from contentstore import utils ...@@ -53,8 +54,8 @@ from contentstore import utils
<form id="settings_details" class="settings-grading" method="post" action=""> <form id="settings_details" class="settings-grading" method="post" action="">
<section class="group-settings grade-range"> <section class="group-settings grade-range">
<header> <header>
<h2 class="title-2">Overall Grade Range</h2> <h2 class="title-2">${_("Overall Grade Range")}</h2>
<span class="tip">Your overall grading scale for student final grades</span> <span class="tip">${_("Your overall grading scale for student final grades")}</span>
</header> </header>
<ol class="list-input"> <ol class="list-input">
...@@ -89,15 +90,15 @@ from contentstore import utils ...@@ -89,15 +90,15 @@ from contentstore import utils
<section class="group-settings grade-rules"> <section class="group-settings grade-rules">
<header> <header>
<h2 class="title-2">Grading Rules &amp; Policies</h2> <h2 class="title-2">${_("Grading Rules &amp; Policies")}</h2>
<span class="tip">Deadlines, requirements, and logistics around grading student work</span> <span class="tip">${_("Deadlines, requirements, and logistics around grading student work")}</span>
</header> </header>
<ol class="list-input"> <ol class="list-input">
<li class="field text" id="field-course-grading-graceperiod"> <li class="field text" id="field-course-grading-graceperiod">
<label for="course-grading-graceperiod">Grace Period on Deadline:</label> <label for="course-grading-graceperiod">${_("Grace Period on Deadline:")}</label>
<input type="text" class="short time" id="course-grading-graceperiod" value="0:00" placeholder="HH:MM" autocomplete="off" /> <input type="text" class="short time" id="course-grading-graceperiod" value="0:00" placeholder="HH:MM" autocomplete="off" />
<span class="tip tip-inline">Leeway on due dates</span> <span class="tip tip-inline">${_("Leeway on due dates")}</span>
</li> </li>
</ol> </ol>
</section> </section>
...@@ -106,8 +107,8 @@ from contentstore import utils ...@@ -106,8 +107,8 @@ from contentstore import utils
<section class="group-settings assignment-types"> <section class="group-settings assignment-types">
<header> <header>
<h2 class="title-2">Assignment Types</h2> <h2 class="title-2">${_("Assignment Types")}</h2>
<span class="tip">Categories and labels for any exercises that are gradable</span> <span class="tip">${_("Categories and labels for any exercises that are gradable")}</span>
</header> </header>
<ol class="list-input course-grading-assignment-list enum"> <ol class="list-input course-grading-assignment-list enum">
...@@ -116,7 +117,7 @@ from contentstore import utils ...@@ -116,7 +117,7 @@ from contentstore import utils
<div class="actions"> <div class="actions">
<a href="#" class="new-button new-course-grading-item add-grading-data"> <a href="#" class="new-button new-course-grading-item add-grading-data">
<i class="icon-plus"></i>New Assignment Type <i class="icon-plus"></i>${_("New Assignment Type")}
</a> </a>
</div> </div>
</section> </section>
...@@ -125,22 +126,22 @@ from contentstore import utils ...@@ -125,22 +126,22 @@ from contentstore import utils
<aside class="content-supplementary" role="complimentary"> <aside class="content-supplementary" role="complimentary">
<div class="bit"> <div class="bit">
<h3 class="title-3">How will these settings be used?</h3> <h3 class="title-3">${_("How will these settings be used?")}</h3>
<p>Your grading settings will be used to calculate students grades and performance.</p> <p>${_("Your grading settings will be used to calculate students grades and performance.")}</p>
<p>Overall grade range will be used in students' final grades, which are calculated by the weighting you determine for each custom assignment type.</p> <p>${_("Overall grade range will be used in students' final grades, which are calculated by the weighting you determine for each custom assignment type.")}</p>
</div> </div>
<div class="bit"> <div class="bit">
% if context_course: % if context_course:
<% ctx_loc = context_course.location %> <% ctx_loc = context_course.location %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<h3 class="title-3">Other Course Settings</h3> <h3 class="title-3">${_("Other Course Settings")}</h3>
<nav class="nav-related"> <nav class="nav-related">
<ul> <ul>
<li class="nav-item"><a href="${reverse('contentstore.views.get_course_settings', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}">Details &amp; Schedule</a></li> <li class="nav-item"><a href="${reverse('contentstore.views.get_course_settings', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}">${_("Details &amp; Schedule")}</a></li>
<li class="nav-item"><a href="${reverse('manage_users', kwargs=dict(location=ctx_loc))}">Course Team</a></li> <li class="nav-item"><a href="${reverse('manage_users', kwargs=dict(location=ctx_loc))}">${_("Course Team")}</a></li>
<li class="nav-item"><a href="${reverse('course_advanced_settings', kwargs={'org' : ctx_loc.org, 'course' : ctx_loc.course, 'name': ctx_loc.name})}">Advanced Settings</a></li> <li class="nav-item"><a href="${reverse('course_advanced_settings', kwargs={'org' : ctx_loc.org, 'course' : ctx_loc.course, 'name': ctx_loc.name})}">${_("Advanced Settings")}</a></li>
</ul> </ul>
</nav> </nav>
% endif % endif
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Sign Up</%block> <%block name="title">${_("Sign Up")}</%block>
<%block name="bodyclass">not-signedin signup</%block> <%block name="bodyclass">not-signedin signup</%block>
<%block name="content"> <%block name="content">
...@@ -9,11 +10,11 @@ ...@@ -9,11 +10,11 @@
<div class="wrapper-content wrapper"> <div class="wrapper-content wrapper">
<section class="content"> <section class="content">
<header> <header>
<h1 class="title title-1">Sign Up for edX Studio</h1> <h1 class="title title-1">${_("Sign Up for edX Studio")}</h1>
<a href="${reverse('login')}" class="action action-signin">Already have a Studio Account? Sign in</a> <a href="${reverse('login')}" class="action action-signin">${_("Already have a Studio Account? Sign in")}</a>
</header> </header>
<p class="introduction">Ready to start creating online courses? Sign up below and start creating your first edX course today.</p> <p class="introduction">${_("Ready to start creating online courses? Sign up below and start creating your first edX course today.")}</p>
<article class="content-primary" role="main"> <article class="content-primary" role="main">
<form id="register_form" method="post" action="register_post"> <form id="register_form" method="post" action="register_post">
...@@ -21,51 +22,51 @@ ...@@ -21,51 +22,51 @@
</div> </div>
<fieldset> <fieldset>
<legend class="sr">Required Information to Sign Up for edX Studio</legend> <legend class="sr">${_("Required Information to Sign Up for edX Studio")}</legend>
<ol class="list-input"> <ol class="list-input">
<li class="field text required" id="field-email"> <li class="field text required" id="field-email">
<label for="email">Email Address</label> <label for="email">${_("Email Address")}</label>
<input id="email" type="email" name="email" placeholder="e.g. jane.doe@gmail.com" /> <input id="email" type="email" name="email" placeholder="e.g. jane.doe@gmail.com" />
</li> </li>
<li class="field text required" id="field-password"> <li class="field text required" id="field-password">
<label for="password">Password</label> <label for="password">${_("Password")}</label>
<input id="password" type="password" name="password" /> <input id="password" type="password" name="password" />
</li> </li>
<li class="field text required" id="field-username"> <li class="field text required" id="field-username">
<label for="username">Public Username</label> <label for="username">${_("Public Username")}</label>
<input id="username" type="text" name="username" placeholder="e.g. janedoe" /> <input id="username" type="text" name="username" placeholder="e.g. janedoe" />
<span class="tip tip-stacked">This will be used in public discussions with your courses and in our edX101 support forums</span> <span class="tip tip-stacked">${_("This will be used in public discussions with your courses and in our edX101 support forums")}</span>
</li> </li>
<li class="field text required" id="field-name"> <li class="field text required" id="field-name">
<label for="name">Full Name</label> <label for="name">${_("Full Name")}</label>
<input id="name" type="text" name="name" placeholder="e.g. Jane Doe" /> <input id="name" type="text" name="name" placeholder="e.g. Jane Doe" />
</li> </li>
<li class="field-group"> <li class="field-group">
<div class="field text" id="field-location"> <div class="field text" id="field-location">
<label for="location">Your Location</label> <label for="location">${_("Your Location")}</label>
<input class="short" id="location" type="text" name="location" /> <input class="short" id="location" type="text" name="location" />
</div> </div>
<div class="field text" id="field-language"> <div class="field text" id="field-language">
<label for="language">Preferred Language</label> <label for="language">${_("Preferred Language")}</label>
<input class="short" id="language" type="text" name="language" /> <input class="short" id="language" type="text" name="language" />
</div> </div>
</li> </li>
<li class="field checkbox required" id="field-tos"> <li class="field checkbox required" id="field-tos">
<input id="tos" name="terms_of_service" type="checkbox" value="true" /> <input id="tos" name="terms_of_service" type="checkbox" value="true" />
<label for="tos">I agree to the Terms of Service</label> <label for="tos">${_("I agree to the Terms of Service")}</label>
</li> </li>
</ol> </ol>
</fieldset> </fieldset>
<div class="form-actions"> <div class="form-actions">
<button type="submit" id="submit" name="submit" class="action action-primary">Create My Account & Start Authoring Courses</button> <button type="submit" id="submit" name="submit" class="action action-primary">${_("Create My Account &amp; Start Authoring Courses")}</button>
</div> </div>
<!-- no honor code for CMS, but need it because we're using the lms student object --> <!-- no honor code for CMS, but need it because we're using the lms student object -->
...@@ -74,21 +75,21 @@ ...@@ -74,21 +75,21 @@
</article> </article>
<aside class="content-supplementary" role="complimentary"> <aside class="content-supplementary" role="complimentary">
<h2 class="sr">Common Studio Questions</h2> <h2 class="sr">${_("Common Studio Questions")}</h2>
<div class="bit"> <div class="bit">
<h3 class="title-3">Who is Studio for?</h3> <h3 class="title-3">${_("Who is Studio for?")}</h3>
<p>Studio is for anyone that wants to create online courses that leverage the global edX platform. Our users are often faculty members, teaching assistants and course staff, and members of instructional technology groups.</p> <p>${_("Studio is for anyone that wants to create online courses that leverage the global edX platform. Our users are often faculty members, teaching assistants and course staff, and members of instructional technology groups.")}</p>
</div> </div>
<div class="bit"> <div class="bit">
<h3 class="title-3">How technically savvy do I need to be to create courses in Studio?</h3> <h3 class="title-3">${_("How technically savvy do I need to be to create courses in Studio?")}</h3>
<p>Studio is designed to be easy to use by almost anyone familiar with common web-based authoring environments (Wordpress, Moodle, etc.). No programming knowledge is required, but for some of the more advanced features, a technical background would be helpful. As always, we are here to help, so don't hesitate to dive right in.</p> <p>${_("Studio is designed to be easy to use by almost anyone familiar with common web-based authoring environments (Wordpress, Moodle, etc.). No programming knowledge is required, but for some of the more advanced features, a technical background would be helpful. As always, we are here to help, so don't hesitate to dive right in.")}</p>
</div> </div>
<div class="bit"> <div class="bit">
<h3 class="title-3">I've never authored a course online before. Is there help?</h3> <h3 class="title-3">${_("I've never authored a course online before. Is there help?")}</h3>
<p>Absolutely. We have created an online course, edX101, that describes some best practices: from filming video, creating exercises, to the basics of running an online course. Additionally, we're always here to help, just drop us a note.</p> <p>${_("Absolutely. We have created an online course, edX101, that describes some best practices: from filming video, creating exercises, to the basics of running an online course. Additionally, we're always here to help, just drop us a note.")}</p>
</div> </div>
</aside> </aside>
</section> </section>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Static Pages</%block> <%block name="title">${_("Static Pages")}</%block>
<%block name="bodyclass">static-pages</%block> <%block name="bodyclass">static-pages</%block>
<%block name="content"> <%block name="content">
...@@ -11,24 +12,24 @@ ...@@ -11,24 +12,24 @@
</div> </div>
<article class="static-page-overview"> <article class="static-page-overview">
<a href="#" class="new-static-page-button wip-box"><span class="plus-icon"></span> New Static Page</a> <a href="#" class="new-static-page-button wip-box"><span class="plus-icon"></span> ${_("New Static Page")}</a>
<ul class="static-page-list"> <ul class="static-page-list">
<li class="static-page-item"> <li class="static-page-item">
<a href="#" class="page-name">Course Info</a> <a href="#" class="page-name">${_("Course Info")}</a>
<div class="item-actions"> <div class="item-actions">
<a href="#" class="edit-button wip"><span class="delete-icon"></span></a> <a href="#" class="edit-button wip"><span class="delete-icon"></span></a>
<a href="#" class="drag-handle wip"></a> <a href="#" class="drag-handle wip"></a>
</div> </div>
</li> </li>
<li class="static-page-item"> <li class="static-page-item">
<a href="#" class="page-name">Textbook</a> <a href="#" class="page-name">${_("Textbook")}</a>
<div class="item-actions"> <div class="item-actions">
<a href="#" class="edit-button wip"><span class="delete-icon"></span></a> <a href="#" class="edit-button wip"><span class="delete-icon"></span></a>
<a href="#" class="drag-handle wip"></a> <a href="#" class="drag-handle wip"></a>
</div> </div>
</li> </li>
<li class="static-page-item"> <li class="static-page-item">
<a href="#" class="page-name">Syllabus</a> <a href="#" class="page-name">${_("Syllabus")}</a>
<div class="item-actions"> <div class="item-actions">
<a href="#" class="edit-button wip"><span class="delete-icon"></span></a> <a href="#" class="edit-button wip"><span class="delete-icon"></span></a>
<a href="#" class="drag-handle wip"></a> <a href="#" class="drag-handle wip"></a>
......
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%namespace name="units" file="widgets/units.html" /> <%namespace name="units" file="widgets/units.html" />
<%block name="title">Individual Unit</%block> <%block name="title">${_("Individual Unit")}</%block>
<%block name="bodyclass">is-signedin course unit</%block> <%block name="bodyclass">is-signedin course unit</%block>
<%block name="jsextra"> <%block name="jsextra">
...@@ -35,30 +36,30 @@ ...@@ -35,30 +36,30 @@
<div class="main-wrapper edit-state-${unit_state}" data-id="${unit_location}"> <div class="main-wrapper edit-state-${unit_state}" data-id="${unit_location}">
<div class="inner-wrapper"> <div class="inner-wrapper">
<div class="alert editing-draft-alert"> <div class="alert editing-draft-alert">
<p class="alert-message"><strong>You are editing a draft.</strong> <p class="alert-message"><strong>${_("You are editing a draft.")}</strong>
% if published_date: % if published_date:
This unit was originally published on ${published_date}. ${_("This unit was originally published on {date}.").format(date=published_date)}
% endif % endif
</p> </p>
<a href="${published_preview_link}" target="_blank" class="alert-action secondary">View the Live Version</a> <a href="${published_preview_link}" target="_blank" class="alert-action secondary">${_("View the Live Version")}</a>
</div> </div>
<div class="main-column"> <div class="main-column">
<article class="unit-body window"> <article class="unit-body window">
<p class="unit-name-input"><label>Display Name:</label><input type="text" value="${unit.display_name_with_default | h}" class="unit-display-name-input" /></p> <p class="unit-name-input"><label>${_("Display Name:")}</label><input type="text" value="${unit.display_name_with_default | h}" class="unit-display-name-input" /></p>
<ol class="components"> <ol class="components">
% for id in components: % for id in components:
<li class="component" data-id="${id}"/> <li class="component" data-id="${id}"/>
% endfor % endfor
<li class="new-component-item adding"> <li class="new-component-item adding">
<div class="new-component"> <div class="new-component">
<h5>Add New Component</h5> <h5>${_("Add New Component")}</h5>
<ul class="new-component-type"> <ul class="new-component-type">
% for type, templates in sorted(component_templates.items()): % for type, templates in sorted(component_templates.items()):
<li> <li>
% if type == 'advanced' or len(templates) > 1: % if type == 'advanced' or len(templates) > 1:
<a href="#" class="multiple-templates" data-type="${type}"> <a href="#" class="multiple-templates" data-type="${type}">
% else: % else:
% for _, location, _ in templates: % for __, location, __ in templates:
<a href="#" class="single-template" data-type="${type}" data-location="${location}"> <a href="#" class="single-template" data-type="${type}" data-location="${location}">
% endfor % endfor
% endif % endif
...@@ -76,10 +77,10 @@ ...@@ -76,10 +77,10 @@
<div class="tab-group tabs"> <div class="tab-group tabs">
<ul class="problem-type-tabs nav-tabs"> <ul class="problem-type-tabs nav-tabs">
<li class="current"> <li class="current">
<a class="link-tab" href="#tab1">Common Problem Types</a> <a class="link-tab" href="#tab1">${_("Common Problem Types")}</a>
</li> </li>
<li> <li>
<a class="link-tab" href="#tab2">Advanced</a> <a class="link-tab" href="#tab2">${_("Advanced")}</a>
</li> </li>
</ul> </ul>
% endif % endif
...@@ -113,7 +114,7 @@ ...@@ -113,7 +114,7 @@
</div> </div>
</div> </div>
% endif % endif
<a href="#" class="cancel-button">Cancel</a> <a href="#" class="cancel-button">${_("Cancel")}</a>
</div> </div>
% endif % endif
% endfor % endfor
...@@ -124,35 +125,40 @@ ...@@ -124,35 +125,40 @@
<div class="sidebar"> <div class="sidebar">
<div class="unit-settings window"> <div class="unit-settings window">
<h4 class="header">Unit Settings</h4> <h4 class="header">${_("Unit Settings")}</h4>
<div class="window-contents"> <div class="window-contents">
<div class="row visibility"> <div class="row visibility">
<label class="inline-label">Visibility:</label> <label class="inline-label">${_("Visibility:")}</label>
<select class='visibility-select'> <select class='visibility-select'>
<option value="public">Public</option> <option value="public">${_("Public")}</option>
<option value="private">Private</option> <option value="private">${_("Private")}</option>
</select> </select>
</div> </div>
<div class="row published-alert"> <div class="row published-alert">
<p class="edit-draft-message">This unit has been published. To make changes, you must <a href="#" class="create-draft">edit a draft</a>.</p> <p class="edit-draft-message">${_('This unit has been published. To make changes, you must {link_start}edit a draft{link_end}.').format(link_start='<a href="#" class="create-draft">', link_end='</a>')}</p>
<p class="publish-draft-message">This is a draft of the published unit. To update the live version, you must <a href="#" class="publish-draft">replace it with this draft</a>.</p> <p class="publish-draft-message">${_('This is a draft of the published unit. To update the live version, you must {link_start}replace it with this draft{link_end}.').format(link_start='<a href="#" class="publish-draft">', link_end='</a>')}</p>
</div> </div>
<div class="row status"> <div class="row status">
<p>This unit is scheduled to be released to <strong>students</strong> <p>${_("This unit is scheduled to be released to <strong>students</strong>")}
% if release_date is not None: % if release_date is not None:
on <strong>${release_date}</strong> ${_(u"on {date}").format(date=u"<strong>{}</strong>".format(release_date))}
% endif % endif
with the subsection <a href="${reverse('edit_subsection', kwargs={'location': subsection.location})}">"${subsection.display_name_with_default}"</a></p> ${_("with the subsection {link_start}{name}{link_end}").format(
name=subsection.display_name_with_default,
link_start='<a href="{url}">'.format(url=reverse('edit_subsection', kwargs={'location': subsection.location})),
link_end='</a>',
)}
</p>
</div> </div>
<div class="row unit-actions"> <div class="row unit-actions">
<a href="#" class="delete-draft delete-button">Delete Draft</a> <a href="#" class="delete-draft delete-button">${_("Delete Draft")}</a>
<a href="${draft_preview_link}" target="_blank" class="preview-button">Preview</a> <a href="${draft_preview_link}" target="_blank" class="preview-button">${_("Preview")}</a>
<a href="${published_preview_link}" target="_blank" class="view-button">View Live</a> <a href="${published_preview_link}" target="_blank" class="view-button">${_("View Live")}</a>
</div> </div>
</div> </div>
</div> </div>
<div class="window unit-location"> <div class="window unit-location">
<h4 class="header">Unit Location</h4> <h4 class="header">${_("Unit Location")}</h4>
<div class="window-contents"> <div class="window-contents">
<div><input type="text" class="url" value="/courseware/${section.url_name}/${subsection.url_name}" disabled /></div> <div><input type="text" class="url" value="/courseware/${section.url_name}/${subsection.url_name}" disabled /></div>
<ol> <ol>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<header class="primary" role="banner"> <header class="primary" role="banner">
<div class="wrapper wrapper-l"> <div class="wrapper wrapper-l">
## "edX Studio" should not be translated
<h1 class="branding"><a href="/"><img src="/static/img/logo-edx-studio.png" alt="edX Studio" /></a></h1> <h1 class="branding"><a href="/"><img src="/static/img/logo-edx-studio.png" alt="edX Studio" /></a></h1>
% if context_course: % if context_course:
...@@ -18,7 +19,7 @@ ...@@ -18,7 +19,7 @@
</h2> </h2>
<nav class="nav-course nav-dd ui-left"> <nav class="nav-course nav-dd ui-left">
<h2 class="sr">${_("{}'s Navigation:".format(context_course.display_name_with_default))}</h2> <h2 class="sr">${_("{course_name}'s Navigation:").format(course_name=context_course.display_name_with_default)}</h2>
<ol> <ol>
<li class="nav-item nav-course-courseware"> <li class="nav-item nav-course-courseware">
<h3 class="title"><span class="label"><span class="label-prefix sr">${_("Course")} </span>${_("Content")}</span> <i class="icon-caret-down ui-toggle-dd"></i></h3> <h3 class="title"><span class="label"><span class="label-prefix sr">${_("Course")} </span>${_("Content")}</span> <i class="icon-caret-down ui-toggle-dd"></i></h3>
...@@ -96,7 +97,7 @@ ...@@ -96,7 +97,7 @@
<div class="wrapper wrapper-r"> <div class="wrapper wrapper-r">
% if user.is_authenticated(): % if user.is_authenticated():
<nav class="nav-account nav-is-signedin nav-dd ui-right"> <nav class="nav-account nav-is-signedin nav-dd ui-right">
<h2 class="sr">Help &amp; Account Navigation</h2> <h2 class="sr">${_("Help &amp; Account Navigation")}</h2>
<ol> <ol>
<li class="nav-item nav-account-help"> <li class="nav-item nav-account-help">
...@@ -106,13 +107,13 @@ ...@@ -106,13 +107,13 @@
<div class="nav-sub"> <div class="nav-sub">
<ul> <ul>
<li class="nav-item nav-help-documentation"> <li class="nav-item nav-help-documentation">
<a href="http://files.edx.org/Getting_Started_with_Studio.pdf" title="This is a PDF Document">Studio Documentation</a> <a href="http://files.edx.org/Getting_Started_with_Studio.pdf" title="${_("This is a PDF Document")}">${_("Studio Documentation")}</a>
</li> </li>
<li class="nav-item nav-help-helpcenter"> <li class="nav-item nav-help-helpcenter">
<a href="http://help.edge.edx.org/" rel="external">Studio Help Center</a> <a href="http://help.edge.edx.org/" rel="external">${_("Studio Help Center")}</a>
</li> </li>
<li class="nav-item nav-help-feedback"> <li class="nav-item nav-help-feedback">
<a href="http://help.edge.edx.org/discussion/new" class="show-tender" title="Use our feedback tool, Tender, to share your feedback">Contact Us</a> <a href="http://help.edge.edx.org/discussion/new" class="show-tender" title="${_("Use our feedback tool, Tender, to share your feedback")}">${_("Contact Us")}</a>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -120,7 +121,7 @@ ...@@ -120,7 +121,7 @@
</li> </li>
<li class="nav-item nav-account-user"> <li class="nav-item nav-account-user">
<h3 class="title"><span class="label"><span class="label-prefix sr">Currently signed in as:</span><span class="account-username" title="${ user.username }">${ user.username }</span></span> <i class="icon-caret-down ui-toggle-dd"></i></h3> <h3 class="title"><span class="label"><span class="label-prefix sr">${_("Currently signed in as:")}</span><span class="account-username" title="${ user.username }">${ user.username }</span></span> <i class="icon-caret-down ui-toggle-dd"></i></h3>
<div class="wrapper wrapper-nav-sub"> <div class="wrapper wrapper-nav-sub">
<div class="nav-sub"> <div class="nav-sub">
......
<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<div class="wrapper-sock wrapper"> <div class="wrapper-sock wrapper">
<ul class="list-actions list-cta"> <ul class="list-actions list-cta">
<li class="action-item"> <li class="action-item">
<a href="#sock" class="cta cta-show-sock"><i class="icon-question-sign"></i> <span class="copy">Looking for Help with Studio?</span></a> <a href="#sock" class="cta cta-show-sock"><i class="icon-question-sign"></i> <span class="copy">${_("Looking for Help with Studio?")}</span></a>
</li> </li>
</ul> </ul>
<div class="wrapper-inner wrapper"> <div class="wrapper-inner wrapper">
<section class="sock" id="sock"> <section class="sock" id="sock">
<header> <header>
<h2 class="title sr">edX Studio Help</h2> <h2 class="title sr">${_("edX Studio Help")}</h2>
</header> </header>
<div class="support"> <div class="support">
<h3 class="title">Studio Support</h3> <h3 class="title">${_("Studio Support")}</h3>
<div class="copy"> <div class="copy">
<p>Need help with Studio? Creating a course is complex, so we're here to help. Take advantage of our documentation, help center, as well as our edX101 introduction course for course authors.</p> <p>${_("Need help with Studio? Creating a course is complex, so we're here to help. Take advantage of our documentation, help center, as well as our edX101 introduction course for course authors.")}</p>
</div> </div>
<ul class="list-actions"> <ul class="list-actions">
<li class="action-item"> <li class="action-item">
<a href="http://files.edx.org/Getting_Started_with_Studio.pdf" class="action action-primary" title="This is a PDF Document">Download Studio Documentation</a> <a href="http://files.edx.org/Getting_Started_with_Studio.pdf" class="action action-primary" title='${_("This is a PDF Document")}'>${_("Download Studio Documentation")}</a>
<span class="tip">How to use Studio to build your course</span> <span class="tip">${_("How to use Studio to build your course")}</span>
</li> </li>
<li class="action-item"> <li class="action-item">
<a href="http://help.edge.edx.org/" rel="external" class="action action-primary">Studio Help Center</a> <a href="http://help.edge.edx.org/" rel="external" class="action action-primary">${_("Studio Help Center")}</a>
<span class="tip">Studio Help Center</span> <span class="tip">${_("Studio Help Center")}</span>
</li> </li>
<li class="action-item"> <li class="action-item">
<a href="https://edge.edx.org/courses/edX/edX101/How_to_Create_an_edX_Course/about" rel="external" class="action action-primary">Enroll in edX101</a> <a href="https://edge.edx.org/courses/edX/edX101/How_to_Create_an_edX_Course/about" rel="external" class="action action-primary">${_("Enroll in edX101")}</a>
<span class="tip">How to use Studio to build your course</span> <span class="tip">${_("How to use Studio to build your course")}</span>
</li> </li>
</ul> </ul>
</div> </div>
<div class="feedback"> <div class="feedback">
<h3 class="title">Contact us about Studio</h3> <h3 class="title">${_("Contact us about Studio")}</h3>
<div class="copy"> <div class="copy">
<p>Have problems, questions, or suggestions about Studio? We're also here to listen to any feedback you want to share.</p> <p>${_("Have problems, questions, or suggestions about Studio? We're also here to listen to any feedback you want to share.")}</p>
</div> </div>
<ul class="list-actions"> <ul class="list-actions">
<li class="action-item"> <li class="action-item">
<a href="http://help.edge.edx.org/discussion/new" class="action action-primary show-tender" title="Use our feedback tool, Tender, to share your feedback"><i class="icon-comments"></i> Contact Us</a> <a href="http://help.edge.edx.org/discussion/new" class="action action-primary show-tender" title='${_("Use our feedback tool, Tender, to share your feedback")}'><i class="icon-comments"></i>${_("Contact Us")}</a>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -72,8 +72,6 @@ urlpatterns = ('', # nopep8 ...@@ -72,8 +72,6 @@ urlpatterns = ('', # nopep8
url(r'^pages/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$', url(r'^pages/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$',
'contentstore.views.static_pages', 'contentstore.views.static_pages',
name='static_pages'), name='static_pages'),
url(r'^edit_static/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$',
'contentstore.views.edit_static', name='edit_static'),
url(r'^edit_tabs/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$', url(r'^edit_tabs/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$',
'contentstore.views.edit_tabs', name='edit_tabs'), 'contentstore.views.edit_tabs', name='edit_tabs'),
......
...@@ -36,6 +36,7 @@ class MakoMiddleware(object): ...@@ -36,6 +36,7 @@ class MakoMiddleware(object):
module_directory=module_directory, module_directory=module_directory,
output_encoding='utf-8', output_encoding='utf-8',
input_encoding='utf-8', input_encoding='utf-8',
default_filters=['decode.utf8'],
encoding_errors='replace', encoding_errors='replace',
) )
......
...@@ -25,6 +25,7 @@ from django.shortcuts import redirect ...@@ -25,6 +25,7 @@ from django.shortcuts import redirect
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from django.utils.http import cookie_date from django.utils.http import cookie_date
from django.utils.http import base36_to_int from django.utils.http import base36_to_int
from django.utils.translation import ugettext as _
from mitxmako.shortcuts import render_to_response, render_to_string from mitxmako.shortcuts import render_to_response, render_to_string
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
...@@ -357,7 +358,7 @@ def change_enrollment(request): ...@@ -357,7 +358,7 @@ def change_enrollment(request):
action = request.POST.get("enrollment_action") action = request.POST.get("enrollment_action")
course_id = request.POST.get("course_id") course_id = request.POST.get("course_id")
if course_id is None: if course_id is None:
return HttpResponseBadRequest("Course id not specified") return HttpResponseBadRequest(_("Course id not specified"))
if action == "enroll": if action == "enroll":
# Make sure the course exists # Make sure the course exists
...@@ -367,10 +368,10 @@ def change_enrollment(request): ...@@ -367,10 +368,10 @@ def change_enrollment(request):
except ItemNotFoundError: except ItemNotFoundError:
log.warning("User {0} tried to enroll in non-existent course {1}" log.warning("User {0} tried to enroll in non-existent course {1}"
.format(user.username, course_id)) .format(user.username, course_id))
return HttpResponseBadRequest("Course id is invalid") return HttpResponseBadRequest(_("Course id is invalid"))
if not has_access(user, course, 'enroll'): if not has_access(user, course, 'enroll'):
return HttpResponseBadRequest("Enrollment is closed") return HttpResponseBadRequest(_("Enrollment is closed"))
org, course_num, run = course_id.split("/") org, course_num, run = course_id.split("/")
statsd.increment("common.student.enrollment", statsd.increment("common.student.enrollment",
...@@ -399,9 +400,9 @@ def change_enrollment(request): ...@@ -399,9 +400,9 @@ def change_enrollment(request):
return HttpResponse() return HttpResponse()
except CourseEnrollment.DoesNotExist: except CourseEnrollment.DoesNotExist:
return HttpResponseBadRequest("You are not enrolled in this course") return HttpResponseBadRequest(_("You are not enrolled in this course"))
else: else:
return HttpResponseBadRequest("Enrollment action is invalid") return HttpResponseBadRequest(_("Enrollment action is invalid"))
@ensure_csrf_cookie @ensure_csrf_cookie
...@@ -416,7 +417,7 @@ def login_user(request, error=""): ...@@ -416,7 +417,7 @@ def login_user(request, error=""):
''' AJAX request to log in the user. ''' ''' AJAX request to log in the user. '''
if 'email' not in request.POST or 'password' not in request.POST: if 'email' not in request.POST or 'password' not in request.POST:
return HttpResponse(json.dumps({'success': False, return HttpResponse(json.dumps({'success': False,
'value': 'There was an error receiving your login information. Please email us.'})) # TODO: User error message 'value': _('There was an error receiving your login information. Please email us.')})) # TODO: User error message
email = request.POST['email'] email = request.POST['email']
password = request.POST['password'] password = request.POST['password']
...@@ -425,14 +426,14 @@ def login_user(request, error=""): ...@@ -425,14 +426,14 @@ def login_user(request, error=""):
except User.DoesNotExist: except User.DoesNotExist:
log.warning(u"Login failed - Unknown user email: {0}".format(email)) log.warning(u"Login failed - Unknown user email: {0}".format(email))
return HttpResponse(json.dumps({'success': False, return HttpResponse(json.dumps({'success': False,
'value': 'Email or password is incorrect.'})) # TODO: User error message 'value': _('Email or password is incorrect.')})) # TODO: User error message
username = user.username username = user.username
user = authenticate(username=username, password=password) user = authenticate(username=username, password=password)
if user is None: if user is None:
log.warning(u"Login failed - password for {0} is invalid".format(email)) log.warning(u"Login failed - password for {0} is invalid".format(email))
return HttpResponse(json.dumps({'success': False, return HttpResponse(json.dumps({'success': False,
'value': 'Email or password is incorrect.'})) 'value': _('Email or password is incorrect.')}))
if user is not None and user.is_active: if user is not None and user.is_active:
try: try:
...@@ -450,7 +451,7 @@ def login_user(request, error=""): ...@@ -450,7 +451,7 @@ def login_user(request, error=""):
try_change_enrollment(request) try_change_enrollment(request)
statsd.increment("common.student.successful_login") statsd.increment(_("common.student.successful_login"))
response = HttpResponse(json.dumps({'success': True})) response = HttpResponse(json.dumps({'success': True}))
# set the login cookie for the edx marketing site # set the login cookie for the edx marketing site
...@@ -477,9 +478,7 @@ def login_user(request, error=""): ...@@ -477,9 +478,7 @@ def login_user(request, error=""):
log.warning(u"Login failed - Account not active for user {0}, resending activation".format(username)) log.warning(u"Login failed - Account not active for user {0}, resending activation".format(username))
reactivation_email_for_user(user) reactivation_email_for_user(user)
not_activated_msg = "This account has not been activated. We have " + \ not_activated_msg = _("This account has not been activated. We have sent another activation message. Please check your e-mail for the activation instructions.")
"sent another activation message. Please check your " + \
"e-mail for the activation instructions."
return HttpResponse(json.dumps({'success': False, return HttpResponse(json.dumps({'success': False,
'value': not_activated_msg})) 'value': not_activated_msg}))
...@@ -537,12 +536,12 @@ def _do_create_account(post_vars): ...@@ -537,12 +536,12 @@ def _do_create_account(post_vars):
js = {'success': False} js = {'success': False}
# Figure out the cause of the integrity error # Figure out the cause of the integrity error
if len(User.objects.filter(username=post_vars['username'])) > 0: if len(User.objects.filter(username=post_vars['username'])) > 0:
js['value'] = "An account with the Public Username '" + post_vars['username'] + "' already exists." js['value'] = _("An account with the Public Username '{username}' already exists.").format(username=post_vars['username'])
js['field'] = 'username' js['field'] = 'username'
return HttpResponse(json.dumps(js)) return HttpResponse(json.dumps(js))
if len(User.objects.filter(email=post_vars['email'])) > 0: if len(User.objects.filter(email=post_vars['email'])) > 0:
js['value'] = "An account with the Email '" + post_vars['email'] + "' already exists." js['value'] = _("An account with the Email '{email}' already exists.").format(email=post_vars['email'])
js['field'] = 'email' js['field'] = 'email'
return HttpResponse(json.dumps(js)) return HttpResponse(json.dumps(js))
...@@ -566,7 +565,7 @@ def _do_create_account(post_vars): ...@@ -566,7 +565,7 @@ def _do_create_account(post_vars):
try: try:
profile.save() profile.save()
except Exception: except Exception:
log.exception("UserProfile creation failed for user {0}.".format(user.id)) log.exception("UserProfile creation failed for user {id}.".format(id=user.id))
return (user, profile, registration) return (user, profile, registration)
...@@ -603,12 +602,12 @@ def create_account(request, post_override=None): ...@@ -603,12 +602,12 @@ def create_account(request, post_override=None):
# Confirm we have a properly formed request # Confirm we have a properly formed request
for a in ['username', 'email', 'password', 'name']: for a in ['username', 'email', 'password', 'name']:
if a not in post_vars: if a not in post_vars:
js['value'] = "Error (401 {field}). E-mail us.".format(field=a) js['value'] = _("Error (401 {field}). E-mail us.").format(field=a)
js['field'] = a js['field'] = a
return HttpResponse(json.dumps(js)) return HttpResponse(json.dumps(js))
if post_vars.get('honor_code', 'false') != u'true': if post_vars.get('honor_code', 'false') != u'true':
js['value'] = "To enroll, you must follow the honor code.".format(field=a) js['value'] = _("To enroll, you must follow the honor code.").format(field=a)
js['field'] = 'honor_code' js['field'] = 'honor_code'
return HttpResponse(json.dumps(js)) return HttpResponse(json.dumps(js))
...@@ -619,7 +618,7 @@ def create_account(request, post_override=None): ...@@ -619,7 +618,7 @@ def create_account(request, post_override=None):
if not tos_not_required: if not tos_not_required:
if post_vars.get('terms_of_service', 'false') != u'true': if post_vars.get('terms_of_service', 'false') != u'true':
js['value'] = "You must accept the terms of service.".format(field=a) js['value'] = _("You must accept the terms of service.").format(field=a)
js['field'] = 'terms_of_service' js['field'] = 'terms_of_service'
return HttpResponse(json.dumps(js)) return HttpResponse(json.dumps(js))
...@@ -648,14 +647,14 @@ def create_account(request, post_override=None): ...@@ -648,14 +647,14 @@ def create_account(request, post_override=None):
try: try:
validate_email(post_vars['email']) validate_email(post_vars['email'])
except ValidationError: except ValidationError:
js['value'] = "Valid e-mail is required.".format(field=a) js['value'] = _("Valid e-mail is required.").format(field=a)
js['field'] = 'email' js['field'] = 'email'
return HttpResponse(json.dumps(js)) return HttpResponse(json.dumps(js))
try: try:
validate_slug(post_vars['username']) validate_slug(post_vars['username'])
except ValidationError: except ValidationError:
js['value'] = "Username should only consist of A-Z and 0-9, with no spaces.".format(field=a) js['value'] = _("Username should only consist of A-Z and 0-9, with no spaces.").format(field=a)
js['field'] = 'username' js['field'] = 'username'
return HttpResponse(json.dumps(js)) return HttpResponse(json.dumps(js))
...@@ -685,7 +684,7 @@ def create_account(request, post_override=None): ...@@ -685,7 +684,7 @@ def create_account(request, post_override=None):
res = user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL) res = user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL)
except: except:
log.warning('Unable to send activation email to user', exc_info=True) log.warning('Unable to send activation email to user', exc_info=True)
js['value'] = 'Could not send activation e-mail.' js['value'] = _('Could not send activation e-mail.')
return HttpResponse(json.dumps(js)) return HttpResponse(json.dumps(js))
# Immediately after a user creates an account, we log them in. They are only # Immediately after a user creates an account, we log them in. They are only
...@@ -956,7 +955,7 @@ def activate_account(request, key): ...@@ -956,7 +955,7 @@ def activate_account(request, key):
return resp return resp
if len(r) == 0: if len(r) == 0:
return render_to_response("registration/activation_invalid.html", {'csrf': csrf(request)['csrf_token']}) return render_to_response("registration/activation_invalid.html", {'csrf': csrf(request)['csrf_token']})
return HttpResponse("Unknown error. Please e-mail us to let us know how it happened.") return HttpResponse(_("Unknown error. Please e-mail us to let us know how it happened."))
@ensure_csrf_cookie @ensure_csrf_cookie
...@@ -975,7 +974,8 @@ def password_reset(request): ...@@ -975,7 +974,8 @@ def password_reset(request):
'value': render_to_string('registration/password_reset_done.html', {})})) 'value': render_to_string('registration/password_reset_done.html', {})}))
else: else:
return HttpResponse(json.dumps({'success': False, return HttpResponse(json.dumps({'success': False,
'error': 'Invalid e-mail or user'})) 'error': _('Invalid e-mail or user')}))
def password_reset_confirm_wrapper(request, uidb36=None, token=None): def password_reset_confirm_wrapper(request, uidb36=None, token=None):
''' A wrapper around django.contrib.auth.views.password_reset_confirm. ''' A wrapper around django.contrib.auth.views.password_reset_confirm.
...@@ -997,7 +997,7 @@ def reactivation_email_for_user(user): ...@@ -997,7 +997,7 @@ def reactivation_email_for_user(user):
reg = Registration.objects.get(user=user) reg = Registration.objects.get(user=user)
except Registration.DoesNotExist: except Registration.DoesNotExist:
return HttpResponse(json.dumps({'success': False, return HttpResponse(json.dumps({'success': False,
'error': 'No inactive user with this e-mail exists'})) 'error': _('No inactive user with this e-mail exists')}))
d = {'name': user.profile.name, d = {'name': user.profile.name,
'key': reg.activation_key} 'key': reg.activation_key}
...@@ -1010,7 +1010,7 @@ def reactivation_email_for_user(user): ...@@ -1010,7 +1010,7 @@ def reactivation_email_for_user(user):
res = user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL) res = user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL)
except: except:
log.warning('Unable to send reactivation email', exc_info=True) log.warning('Unable to send reactivation email', exc_info=True)
return HttpResponse(json.dumps({'success': False, 'error': 'Unable to send reactivation email'})) return HttpResponse(json.dumps({'success': False, 'error': _('Unable to send reactivation email')}))
return HttpResponse(json.dumps({'success': True})) return HttpResponse(json.dumps({'success': True}))
...@@ -1027,19 +1027,19 @@ def change_email_request(request): ...@@ -1027,19 +1027,19 @@ def change_email_request(request):
if not user.check_password(request.POST['password']): if not user.check_password(request.POST['password']):
return HttpResponse(json.dumps({'success': False, return HttpResponse(json.dumps({'success': False,
'error': 'Invalid password'})) 'error': _('Invalid password')}))
new_email = request.POST['new_email'] new_email = request.POST['new_email']
try: try:
validate_email(new_email) validate_email(new_email)
except ValidationError: except ValidationError:
return HttpResponse(json.dumps({'success': False, return HttpResponse(json.dumps({'success': False,
'error': 'Valid e-mail address required.'})) 'error': _('Valid e-mail address required.')}))
if User.objects.filter(email=new_email).count() != 0: if User.objects.filter(email=new_email).count() != 0:
## CRITICAL TODO: Handle case sensitivity for e-mails ## CRITICAL TODO: Handle case sensitivity for e-mails
return HttpResponse(json.dumps({'success': False, return HttpResponse(json.dumps({'success': False,
'error': 'An account with this e-mail already exists.'})) 'error': _('An account with this e-mail already exists.')}))
pec_list = PendingEmailChange.objects.filter(user=request.user) pec_list = PendingEmailChange.objects.filter(user=request.user)
if len(pec_list) == 0: if len(pec_list) == 0:
...@@ -1055,7 +1055,7 @@ def change_email_request(request): ...@@ -1055,7 +1055,7 @@ def change_email_request(request):
if pec.new_email == user.email: if pec.new_email == user.email:
pec.delete() pec.delete()
return HttpResponse(json.dumps({'success': False, return HttpResponse(json.dumps({'success': False,
'error': 'Old email is the same as the new email.'})) 'error': _('Old email is the same as the new email.')}))
d = {'key': pec.activation_key, d = {'key': pec.activation_key,
'old_email': user.email, 'old_email': user.email,
...@@ -1144,7 +1144,7 @@ def change_name_request(request): ...@@ -1144,7 +1144,7 @@ def change_name_request(request):
pnc.new_name = request.POST['new_name'] pnc.new_name = request.POST['new_name']
pnc.rationale = request.POST['rationale'] pnc.rationale = request.POST['rationale']
if len(pnc.new_name) < 2: if len(pnc.new_name) < 2:
return HttpResponse(json.dumps({'success': False, 'error': 'Name required'})) return HttpResponse(json.dumps({'success': False, 'error': _('Name required')}))
pnc.save() pnc.save()
# The following automatically accepts name change requests. Remove this to # The following automatically accepts name change requests. Remove this to
...@@ -1179,7 +1179,7 @@ def reject_name_change(request): ...@@ -1179,7 +1179,7 @@ def reject_name_change(request):
try: try:
pnc = PendingNameChange.objects.get(id=int(request.POST['id'])) pnc = PendingNameChange.objects.get(id=int(request.POST['id']))
except PendingNameChange.DoesNotExist: except PendingNameChange.DoesNotExist:
return HttpResponse(json.dumps({'success': False, 'error': 'Invalid ID'})) return HttpResponse(json.dumps({'success': False, 'error': _('Invalid ID')}))
pnc.delete() pnc.delete()
return HttpResponse(json.dumps({'success': True})) return HttpResponse(json.dumps({'success': True}))
...@@ -1189,7 +1189,7 @@ def accept_name_change_by_id(id): ...@@ -1189,7 +1189,7 @@ def accept_name_change_by_id(id):
try: try:
pnc = PendingNameChange.objects.get(id=id) pnc = PendingNameChange.objects.get(id=id)
except PendingNameChange.DoesNotExist: except PendingNameChange.DoesNotExist:
return HttpResponse(json.dumps({'success': False, 'error': 'Invalid ID'})) return HttpResponse(json.dumps({'success': False, 'error': _('Invalid ID')}))
u = pnc.user u = pnc.user
up = UserProfile.objects.get(user=u) up = UserProfile.objects.get(user=u)
......
...@@ -5,7 +5,6 @@ from lxml import etree ...@@ -5,7 +5,6 @@ from lxml import etree
from path import path # NOTE (THK): Only used for detecting presence of syllabus from path import path # NOTE (THK): Only used for detecting presence of syllabus
import requests import requests
from datetime import datetime from datetime import datetime
import dateutil.parser import dateutil.parser
from xmodule.modulestore import Location from xmodule.modulestore import Location
......
""" """
Convenience methods for working with datetime objects Convenience methods for working with datetime objects
""" """
from datetime import timedelta
from django.utils.translation import ugettext as _
import datetime
def get_default_time_display(dt, show_timezone=True): def get_default_time_display(dt, show_timezone=True):
""" """
Converts a datetime to a string representation. This is the default Converts a datetime to a string representation. This is the default
...@@ -14,20 +16,21 @@ def get_default_time_display(dt, show_timezone=True): ...@@ -14,20 +16,21 @@ def get_default_time_display(dt, show_timezone=True):
The default value of show_timezone is True. The default value of show_timezone is True.
""" """
if dt is None: if dt is None:
return "" return u""
timezone = "" timezone = u""
if show_timezone: if show_timezone:
if dt.tzinfo is not None: if dt.tzinfo is not None:
try: try:
timezone = " " + dt.tzinfo.tzname(dt) timezone = u" " + dt.tzinfo.tzname(dt)
except NotImplementedError: except NotImplementedError:
timezone = dt.strftime('%z') timezone = dt.strftime('%z')
else: else:
timezone = " UTC" timezone = u" UTC"
return dt.strftime("%b %d, %Y at %H:%M") + timezone return unicode(dt.strftime(u"%b %d, %Y {at} %H:%M{tz}")).format(
at=_(u"at"), tz=timezone).strip()
def almost_same_datetime(dt1, dt2, allowed_delta=datetime.timedelta(minutes=1)): def almost_same_datetime(dt1, dt2, allowed_delta=timedelta(minutes=1)):
""" """
Returns true if these are w/in a minute of each other. (in case secs saved to db Returns true if these are w/in a minute of each other. (in case secs saved to db
or timezone aren't same) or timezone aren't same)
......
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