diff --git a/cms/djangoapps/contentstore/views/requests.py b/cms/djangoapps/contentstore/views/requests.py index 8a05bf1258f0..abbf84755ef3 100644 --- a/cms/djangoapps/contentstore/views/requests.py +++ b/cms/djangoapps/contentstore/views/requests.py @@ -1,4 +1,5 @@ from django.http import HttpResponse +from django.shortcuts import redirect from mitxmako.shortcuts import render_to_string, render_to_response __all__ = ['edge', 'event', 'landing'] @@ -11,7 +12,7 @@ def landing(request, org, course, coursename): # points to the temporary edge page def edge(request): - return render_to_response('university_profiles/edge.html', {}) + return redirect('/') def event(request): diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 74b465f69013..440dd4fbd377 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -90,10 +90,7 @@ def index(request, extra_context={}, user=None): courses = get_courses(None, domain=domain) courses = sort_by_announcement(courses) - # Get the 3 most recent news - top_news = _get_news(top=3) - - context = {'courses': courses, 'news': top_news} + context = {'courses': courses} context.update(extra_context) return render_to_response('index.html', context) @@ -285,9 +282,6 @@ def dashboard(request): exam_registrations = {course.id: exam_registration_info(request.user, course) for course in courses} - # Get the 3 most recent news - top_news = _get_news(top=3) if not settings.MITX_FEATURES.get('ENABLE_MKTG_SITE', False) else None - # get info w.r.t ExternalAuthMap external_auth_map = None try: @@ -302,7 +296,6 @@ def dashboard(request): 'errored_courses': errored_courses, 'show_courseware_links_for': show_courseware_links_for, 'cert_statuses': cert_statuses, - 'news': top_news, 'exam_registrations': exam_registrations, } @@ -1242,28 +1235,3 @@ def accept_name_change(request): raise Http404 return accept_name_change_by_id(int(request.POST['id'])) - - -def _get_news(top=None): - "Return the n top news items on settings.RSS_URL" - - # Don't return anything if we're in a themed site - if settings.MITX_FEATURES["USE_CUSTOM_THEME"]: - return None - - feed_data = cache.get("students_index_rss_feed_data") - if feed_data is None: - if hasattr(settings, 'RSS_URL'): - feed_data = urllib.urlopen(settings.RSS_URL).read() - else: - feed_data = render_to_string("feed.rss", None) - cache.set("students_index_rss_feed_data", feed_data, settings.RSS_TIMEOUT) - - feed = feedparser.parse(feed_data) - entries = feed['entries'][0:top] # all entries if top is None - for entry in entries: - soup = BeautifulSoup(entry.description) - entry.image = soup.img['src'] if soup.img else None - entry.summary = soup.getText() - - return entries diff --git a/conf/locale/babel.cfg b/conf/locale/babel.cfg index 5b8333cf1e33..6631586ad40e 100644 --- a/conf/locale/babel.cfg +++ b/conf/locale/babel.cfg @@ -17,3 +17,5 @@ input_encoding = utf-8 input_encoding = utf-8 [mako: common/templates/**.html] input_encoding = utf-8 +[mako: cms/templates/emails/**.txt] +input_encoding = utf-8 diff --git a/conf/locale/config b/conf/locale/config index 58f8da0513aa..3a0b04adbbd0 100644 --- a/conf/locale/config +++ b/conf/locale/config @@ -1,4 +1,4 @@ { - "locales" : ["en", "es"], + "locales" : ["en", "zh_CN"], "dummy-locale" : "fr" } diff --git a/lms/djangoapps/branding/views.py b/lms/djangoapps/branding/views.py index dd57e8d4d4f1..985dfa52d0aa 100644 --- a/lms/djangoapps/branding/views.py +++ b/lms/djangoapps/branding/views.py @@ -24,13 +24,13 @@ def index(request): from external_auth.views import ssl_login return ssl_login(request) if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'): - return redirect(settings.MKTG_URLS.get('ROOT')) + return redirect(settings.MKTG_URLS.get('ROOT')) university = branding.get_university(request.META.get('HTTP_HOST')) if university is None: return student.views.index(request, user=request.user) - return courseware.views.university_profile(request, university) + return redirect('/') @ensure_csrf_cookie @@ -48,4 +48,4 @@ def courses(request): if university is None: return courseware.views.courses(request) - return courseware.views.university_profile(request, university) + return redirect('/') diff --git a/lms/djangoapps/course_wiki/tests/tests.py b/lms/djangoapps/course_wiki/tests/tests.py index 663d6b53b2ac..6bbd8011d699 100644 --- a/lms/djangoapps/course_wiki/tests/tests.py +++ b/lms/djangoapps/course_wiki/tests/tests.py @@ -90,8 +90,8 @@ def has_course_navigator(self, resp): """ Ensure that the response has the course navigator. """ - self.assertTrue("course info" in resp.content.lower()) - self.assertTrue("courseware" in resp.content.lower()) + self.assertContains(resp, "Course Info") + self.assertContains(resp, "courseware") def test_course_navigator(self): """" diff --git a/lms/djangoapps/courseware/tests/tests.py b/lms/djangoapps/courseware/tests/tests.py index fbe2c05adaa1..cd245d2610b5 100644 --- a/lms/djangoapps/courseware/tests/tests.py +++ b/lms/djangoapps/courseware/tests/tests.py @@ -120,9 +120,8 @@ def _assert_loads(self, django_url, kwargs, descriptor, self.assertEqual(response.redirect_chain[0][1], 302) if check_content: - unavailable_msg = "this module is temporarily unavailable" - self.assertEqual(response.content.find(unavailable_msg), -1) - self.assertFalse(isinstance(descriptor, ErrorDescriptor)) + self.assertNotContains(response, "this module is temporarily unavailable") + self.assertNotIsInstance(descriptor, ErrorDescriptor) @override_settings(MODULESTORE=TEST_DATA_XML_MODULESTORE) diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index f152c0833b12..78151882278f 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -632,57 +632,6 @@ def mktg_course_about(request, course_id): 'show_courseware_link': show_courseware_link}) - -@ensure_csrf_cookie -@cache_if_anonymous -def static_university_profile(request, org_id): - """ - Return the profile for the particular org_id that does not have any courses. - """ - # Redirect to the properly capitalized org_id - last_path = request.path.split('/')[-1] - if last_path != org_id: - return redirect('static_university_profile', org_id=org_id) - - # Render template - template_file = "university_profile/{0}.html".format(org_id).lower() - context = dict(courses=[], org_id=org_id) - return render_to_response(template_file, context) - - -@ensure_csrf_cookie -@cache_if_anonymous -def university_profile(request, org_id): - """ - Return the profile for the particular org_id. 404 if it's not valid. - """ - virtual_orgs_ids = settings.VIRTUAL_UNIVERSITIES - meta_orgs = getattr(settings, 'META_UNIVERSITIES', {}) - - # Get all the ids associated with this organization - all_courses = modulestore().get_courses() - valid_orgs_ids = set(c.org for c in all_courses) - valid_orgs_ids.update(virtual_orgs_ids + meta_orgs.keys()) - - if org_id not in valid_orgs_ids: - raise Http404("University Profile not found for {0}".format(org_id)) - - # Grab all courses for this organization(s) - org_ids = set([org_id] + meta_orgs.get(org_id, [])) - org_courses = [] - domain = request.META.get('HTTP_HOST') - for key in org_ids: - cs = get_courses_by_university(request.user, domain=domain)[key] - org_courses.extend(cs) - - org_courses = sort_by_announcement(org_courses) - - context = dict(courses=org_courses, org_id=org_id) - template_file = "university_profile/{0}.html".format(org_id).lower() - - return render_to_response(template_file, context) - - def render_notifications(request, course, notifications): context = { 'notifications': notifications, @@ -779,12 +728,16 @@ def submission_history(request, course_id, student_username, location): except StudentModule.DoesNotExist: return HttpResponse(escape("{0} has never accessed problem {1}".format(student_username, location))) - history_entries = StudentModuleHistory.objects.filter(student_module=student_module).order_by('-id') + history_entries = StudentModuleHistory.objects.filter( + student_module=student_module + ).order_by('-id') # If no history records exist, let's force a save to get history started. if not history_entries: student_module.save() - history_entries = StudentModuleHistory.objects.filter(student_module=student_module).order_by('-id') + history_entries = StudentModuleHistory.objects.filter( + student_module=student_module + ).order_by('-id') context = { 'history_entries': history_entries, diff --git a/lms/envs/common.py b/lms/envs/common.py index 95b2af422e37..29e0de7d91de 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -166,7 +166,7 @@ ############################# SET PATH INFORMATION ############################# -PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /mitx/lms +PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/lms REPO_ROOT = PROJECT_ROOT.dirname() COMMON_ROOT = REPO_ROOT / "common" ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /mitx is in @@ -381,6 +381,8 @@ USE_I18N = True USE_L10N = True +# Localization strings (e.g. django.po) are under this directory +LOCALE_PATHS = (REPO_ROOT + '/conf/locale',) # edx-platform/conf/locale/ # Messages MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' @@ -486,6 +488,9 @@ 'course_wiki.course_nav.Middleware', + # Detects user-requested locale from 'accept-language' header in http request + 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.transaction.TransactionMiddleware', # 'debug_toolbar.middleware.DebugToolbarMiddleware', diff --git a/lms/templates/admin_dashboard.html b/lms/templates/admin_dashboard.html index 6a903a3f94bf..5314881233d6 100644 --- a/lms/templates/admin_dashboard.html +++ b/lms/templates/admin_dashboard.html @@ -1,4 +1,5 @@ <%namespace name='static' file='static_content.html'/> +<%! from django.utils.translation import ugettext as _ %> <%inherit file="main.html" /> @@ -7,7 +8,7 @@
-

edX-wide Summary

+

${_("{platform_name}-wide Summary").format(platform_name=settings.PLATFORM_NAME)}

% for key in results["scalars"]: diff --git a/lms/templates/annotatable.html b/lms/templates/annotatable.html index f01030574442..20a85d0ca248 100644 --- a/lms/templates/annotatable.html +++ b/lms/templates/annotatable.html @@ -1,3 +1,5 @@ +<%! from django.utils.translation import ugettext as _ %> +
% if display_name is not UNDEFINED and display_name is not None: @@ -8,8 +10,8 @@ % if instructions_html is not UNDEFINED and instructions_html is not None:
- Instructions - Collapse Instructions + ${_("Instructions")} + ${_("Collapse Instructions")}
${instructions_html} @@ -19,8 +21,8 @@
- Guided Discussion - Hide Annotations + ${_("Guided Discussion")} + ${_("Hide Annotations")}
${content_html} diff --git a/lms/templates/combinedopenended/combined_open_ended.html b/lms/templates/combinedopenended/combined_open_ended.html index 5d8ef859aa82..50f962d6914a 100644 --- a/lms/templates/combinedopenended/combined_open_ended.html +++ b/lms/templates/combinedopenended/combined_open_ended.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %>
${status|n} @@ -12,8 +13,8 @@

Prompt (Hide)

% endfor
- - + +
diff --git a/lms/templates/combinedopenended/combined_open_ended_legend.html b/lms/templates/combinedopenended/combined_open_ended_legend.html index e3e249467004..d5d482e1906f 100644 --- a/lms/templates/combinedopenended/combined_open_ended_legend.html +++ b/lms/templates/combinedopenended/combined_open_ended_legend.html @@ -1,6 +1,7 @@ +<%! from django.utils.translation import ugettext as _ %>
- Legend + ${_("Legend")}
% for i in xrange(0,len(legend_list)): <%legend_title=legend_list[i]['name'] %> diff --git a/lms/templates/combinedopenended/combined_open_ended_status.html b/lms/templates/combinedopenended/combined_open_ended_status.html index d13077737faa..0369d6d9ff0c 100644 --- a/lms/templates/combinedopenended/combined_open_ended_status.html +++ b/lms/templates/combinedopenended/combined_open_ended_status.html @@ -1,7 +1,8 @@ +<%! from django.utils.translation import ugettext as _ %>
- Status + ${_("Status")}
%for i in xrange(0,len(status_list)): <%status=status_list[i]%> diff --git a/lms/templates/combinedopenended/open_ended_result_table.html b/lms/templates/combinedopenended/open_ended_result_table.html index 24bf7a76fe30..bac684b91ccf 100644 --- a/lms/templates/combinedopenended/open_ended_result_table.html +++ b/lms/templates/combinedopenended/open_ended_result_table.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> % for co in context_list: % if co['grader_type'] in grader_type_image_dict: <%grader_type=co['grader_type']%> @@ -18,7 +19,7 @@ %if len(co['feedback'])>2:
- See full feedback + ${_("See full feedback")}
@@ -55,4 +56,4 @@

%endif -%endfor \ No newline at end of file +%endfor diff --git a/lms/templates/combinedopenended/openended/open_ended.html b/lms/templates/combinedopenended/openended/open_ended.html index 909ef1583803..15b3be1303b7 100644 --- a/lms/templates/combinedopenended/openended/open_ended.html +++ b/lms/templates/combinedopenended/openended/open_ended.html @@ -1,17 +1,18 @@ +<%! from django.utils.translation import ugettext as _ %>
${prompt|n}
-

Response

+

${_("Response")}

% if state == 'initial': - Unanswered + ${_("Unanswered")} % elif state == 'assessing': - Submitted for grading. + ${_("Submitted for grading.")} % if eta_message is not None: ${eta_message} % endif @@ -26,8 +27,8 @@

Response

- - + +
diff --git a/lms/templates/combinedopenended/openended/open_ended_error.html b/lms/templates/combinedopenended/openended/open_ended_error.html index 58a90f86ef6b..65b7381d60c9 100644 --- a/lms/templates/combinedopenended/openended/open_ended_error.html +++ b/lms/templates/combinedopenended/openended/open_ended_error.html @@ -1,7 +1,8 @@ +<%! from django.utils.translation import ugettext as _ %>
- There was an error with your submission. Please contact course staff. + ${_("There was an error with your submission. Please contact course staff.")}
@@ -9,4 +10,4 @@ ${errors}
-
\ No newline at end of file +
diff --git a/lms/templates/combinedopenended/openended/open_ended_evaluation.html b/lms/templates/combinedopenended/openended/open_ended_evaluation.html index da3f38b6a96c..ee55120d51b3 100644 --- a/lms/templates/combinedopenended/openended/open_ended_evaluation.html +++ b/lms/templates/combinedopenended/openended/open_ended_evaluation.html @@ -1,23 +1,24 @@ +<%! from django.utils.translation import ugettext as _ %>
${msg|n}
- Respond to Feedback + ${_("Respond to Feedback")}
-

How accurate do you find this feedback?

+

${_("How accurate do you find this feedback?")}

    -
  • -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
  • +
-

Additional comments:

+

${_("Additional comments:")}

- +
-
\ No newline at end of file +
diff --git a/lms/templates/combinedopenended/openended/open_ended_rubric.html b/lms/templates/combinedopenended/openended/open_ended_rubric.html index 144cd829d91a..f1d6abb8fa45 100644 --- a/lms/templates/combinedopenended/openended/open_ended_rubric.html +++ b/lms/templates/combinedopenended/openended/open_ended_rubric.html @@ -1,6 +1,7 @@ +<%! from django.utils.translation import ugettext as _ %>
-

Rubric

-

Select the criteria you feel best represents this submission in each category.

+

${_("Rubric")}

+

${_("Select the criteria you feel best represents this submission in each category.")}

% for i in range(len(categories)): <% category = categories[i] %> diff --git a/lms/templates/combinedopenended/selfassessment/self_assessment_hint.html b/lms/templates/combinedopenended/selfassessment/self_assessment_hint.html index 8c6eacba1122..abdc25b77b12 100644 --- a/lms/templates/combinedopenended/selfassessment/self_assessment_hint.html +++ b/lms/templates/combinedopenended/selfassessment/self_assessment_hint.html @@ -1,6 +1,7 @@ +<%! from django.utils.translation import ugettext as _ %>
- Please enter a hint below: + ${_("Please enter a hint below:")}
diff --git a/lms/templates/combinedopenended/selfassessment/self_assessment_prompt.html b/lms/templates/combinedopenended/selfassessment/self_assessment_prompt.html index 5347e2384422..3cc73fc65715 100644 --- a/lms/templates/combinedopenended/selfassessment/self_assessment_prompt.html +++ b/lms/templates/combinedopenended/selfassessment/self_assessment_prompt.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %>
@@ -5,7 +6,7 @@ ${prompt}
-

Response

+

${_("Response")}

@@ -19,5 +20,5 @@

Response

- + diff --git a/lms/templates/contact.html b/lms/templates/contact.html index a8f5e6b732ed..cb35aca35973 100644 --- a/lms/templates/contact.html +++ b/lms/templates/contact.html @@ -1,13 +1,15 @@ +<%! from django.utils.translation import ugettext as _ %> + <%namespace name='static' file='static_content.html'/> <%inherit file="main.html" />
@@ -15,21 +17,35 @@
-

Class Feedback

-

We are always seeking feedback to improve our courses. If you are an enrolled student and have any questions, feedback, suggestions, or any other issues specific to a particular class, please post on the discussion forums of that class.

- -

General Inquiries and Feedback

-

"If you have a general question about edX please email info@edx.org. To see if your question has already been answered, visit our FAQ page. You can also join the discussion on our facebook page. Though we may not have a chance to respond to every email, we take all feedback into consideration.

- -

Technical Inquiries and Feedback

-

If you have suggestions/feedback about the overall edX platform, or are facing general technical issues with the platform (e.g., issues with email addresses and passwords), you can reach us at technical@edx.org. For technical questions, please make sure you are using a current version of Firefox or Chrome, and include browser and version in your e-mail, as well as screenshots or other pertinent details. If you find a bug or other issues, you can reach us at the following: bugs@edx.org.

- -

Media

-

Please visit our media/press page for more information. 
For any media or press inquiries, please email press@edx.org.

- -

Universities

-

If you are a university wishing to Collaborate or with questions about edX, please email university@edx.org.

- +

${_("Class Feedback")}

+

${_("We are always seeking feedback to improve our courses. If you are an enrolled student and have any questions, feedback, suggestions, or any other issues specific to a particular class, please post on the discussion forums of that class.")}

+ +

${_("General Inquiries and Feedback")}

+

${_('If you have a general question about {platform_name} please email {contact_email}. To see if your question has already been answered, visit our {faq_link_start}FAQ page{faq_link_end}. You can also join the discussion on our {fb_link_start}facebook page{fb_link_end}. Though we may not have a chance to respond to every email, we take all feedback into consideration.').format( + platform_name=settings.PLATFORM_NAME, + contact_email=settings.CONTACT_EMAIL, + faq_link_start=''.format(url=reverse('faq_edx')), + faq_link_end='', + fb_link_start=''. + fb_link_end='' + )}

+ +

${_("Technical Inquiries and Feedback")}

+

${_('If you have suggestions/feedback about the overall {platform_name} platform, or are facing general technical issues with the platform (e.g., issues with email addresses and passwords), you can reach us at {tech_email}. For technical questions, please make sure you are using a current version of Firefox or Chrome, and include browser and version in your e-mail, as well as screenshots or other pertinent details. If you find a bug or other issues, you can reach us at the following: {bugs_email}.').format( + tech_email=settings.TECH_SUPPORT_EMAIL, + bug_email=settings.BUGS_EMAIL, + platform_name=settings.PLATFORM_NAME + )}

+ +

${_("Media")}

+

${_('Please visit our {link_start}media/press page{link_end} for more information. For any media or press inquiries, please email {email}.').format( + link_start=''.format(url=reverse('faq_edx')), + link_end='', + email='press@edx.org', + )}

+ +

${_("Universities")}

+

${_('If you are a university wishing to collaborate with or if you have questions about {platform_name}, please email {email}.'.format(email='university@edx.org', platform_name="edX")}

diff --git a/lms/templates/course.html b/lms/templates/course.html index e3dd9baf4383..ddbae2c715f6 100644 --- a/lms/templates/course.html +++ b/lms/templates/course.html @@ -1,13 +1,14 @@ <%namespace name='static' file='static_content.html'/> <%namespace file='main.html' import="stanford_theme_enabled"/> <%! - from django.core.urlresolvers import reverse - from courseware.courses import course_image_url, get_course_about_section +from django.utils.translation import ugettext as _ +from django.core.urlresolvers import reverse +from courseware.courses import course_image_url, get_course_about_section %> <%page args="course" />
%if course.is_newish: - New + ${_("New")} %endif diff --git a/lms/templates/course_filter.html b/lms/templates/course_filter.html deleted file mode 100644 index 9e7c0a16f430..000000000000 --- a/lms/templates/course_filter.html +++ /dev/null @@ -1,50 +0,0 @@ -
- -
diff --git a/lms/templates/course_groups/cohort_management.html b/lms/templates/course_groups/cohort_management.html index 239863beeb41..4c9ca9e5a2c7 100644 --- a/lms/templates/course_groups/cohort_management.html +++ b/lms/templates/course_groups/cohort_management.html @@ -1,21 +1,22 @@ +<%! from django.utils.translation import ugettext as _ %>
-

Cohort groups

+

${_("Cohort groups")}

@@ -27,10 +28,10 @@

- Add users by username or email. One per line or comma-separated. + ${_("Add users by username or email. One per line or comma-separated.")}

- Add cohort members + ${_("Add cohort members")}
diff --git a/lms/templates/course_groups/debug.html b/lms/templates/course_groups/debug.html index d8bbc324de64..7554557f81d3 100644 --- a/lms/templates/course_groups/debug.html +++ b/lms/templates/course_groups/debug.html @@ -1,6 +1,8 @@ +<%! from django.utils.translation import ugettext as _ %> + ## "edX" should not be translated <%block name="title">edX diff --git a/lms/templates/courseware/accordion.html b/lms/templates/courseware/accordion.html index 5b9c6f74505e..4761408232af 100644 --- a/lms/templates/courseware/accordion.html +++ b/lms/templates/courseware/accordion.html @@ -1,9 +1,20 @@ -<%! from django.core.urlresolvers import reverse %> -<%! from xmodule.util.date_utils import get_default_time_display %> +<%! + from django.core.urlresolvers import reverse + from xmodule.util.date_utils import get_default_time_display + from django.utils.translation import ugettext as _ +%> <%def name="make_chapter(chapter)">
-

+ <% + if chapter.get('active'): + aria_label = _('{chapter}, current chapter').format(chapter=chapter['display_name']) + active_class = ' class="active"' + else: + aria_label = chapter['display_name'] + active_class = '' + %> +

${chapter['display_name']} diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html index 15317de2075e..b1bc715e9adc 100644 --- a/lms/templates/courseware/course_about.html +++ b/lms/templates/courseware/course_about.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> <%! from django.core.urlresolvers import reverse from courseware.courses import course_image_url, get_course_about_section @@ -65,7 +66,7 @@ -<%block name="title">About ${course.number} +<%block name="title">${_("About {course.number}").format(course=course)}
@@ -76,7 +77,7 @@

${course.number}: ${get_course_about_section(course, "title")} % if not self.theme_enabled(): - ${get_course_about_section(course, "university")} + ${get_course_about_section(course, "university")} % endif

@@ -86,13 +87,13 @@

%if show_courseware_link: %endif - You are registered for this course (${course.number}) + ${_("You are registered for this course {course.number}").format(course=course)} %if show_courseware_link: - View Courseware + ${_("View Courseware")} %endif %else: - Register for ${course.number} + ${_("Register for {course.number}").format(course=course)}
%endif

@@ -115,16 +116,16 @@

- +
@@ -136,7 +137,7 @@

    -
  1. Course Number

    ${course.number}
  2. -
  3. Classes Start

    ${course.start_date_text}
  4. +
  5. ${_("Course Number")}

    ${course.number}
  6. +
  7. ${_("Classes Start")}

    ${course.start_date_text}
  8. ## We plan to ditch end_date (which is not stored in course metadata), ## but for backwards compatibility, show about/end_date blob if it exists. % if get_course_about_section(course, "end_date") or course.end:
  9. -

    Classes End

    +

    ${_("Classes End")}

    % if get_course_about_section(course, "end_date"): ${get_course_about_section(course, "end_date")} % else: @@ -180,13 +181,13 @@

    % endif % if get_course_about_section(course, "effort"): -
  10. Estimated Effort

    ${get_course_about_section(course, "effort")}
  11. +
  12. ${_("Estimated Effort")}

    ${get_course_about_section(course, "effort")}
  13. % endif - ##
  14. Course Length

    15 weeks
  15. + ##
  16. ${_('Course Length')}

    ${_('{number} weeks').format(number=15)}
  17. % if get_course_about_section(course, "prerequisites"): -
  18. Prerequisites

    ${get_course_about_section(course, "prerequisites")}
  19. +
  20. ${_("Prerequisites")}

    ${get_course_about_section(course, "prerequisites")}
  21. % endif

@@ -196,10 +197,11 @@

% if get_course_about_section(course, "ocw_links"):
-

Additional Resources

+

${_("Additional Resources")}

+ ## "MITOpenCourseware" should *not* be translated

MITOpenCourseware

${get_course_about_section(course, "ocw_links")}
@@ -215,10 +217,10 @@

MITOpenCourseware

- +
- +

diff --git a/lms/templates/courseware/course_navigation.html b/lms/templates/courseware/course_navigation.html index 98329b9836d4..799b10b36b17 100644 --- a/lms/templates/courseware/course_navigation.html +++ b/lms/templates/courseware/course_navigation.html @@ -12,6 +12,7 @@ return "" %> <%! from courseware.tabs import get_course_tabs %> +<%! from django.utils.translation import ugettext as _ %>
- ## I'm removing this for now since we aren't using it for the fall. - ## <%include file="course_filter.html" />
    %for course in courses: diff --git a/lms/templates/courseware/courseware-error.html b/lms/templates/courseware/courseware-error.html index e289e1c99d47..f0f7969026de 100644 --- a/lms/templates/courseware/courseware-error.html +++ b/lms/templates/courseware/courseware-error.html @@ -1,7 +1,9 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="/main.html" /> <%namespace name='static' file='../static_content.html'/> <%block name="bodyclass">courseware -<%block name="title">Courseware – edX +## Translators: "edX" should *not* be translated +<%block name="title">${_("Courseware")} - ${settings.PLATFORM_NAME} <%block name="headextra"> <%static:css group='course'/> @@ -11,7 +13,7 @@
    -

    There has been an error on the edX servers

    -

    We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible. Please email us at technical@edx.org to report any problems or downtime.

    +

    ${_('There has been an error on the {span_start}{platform_name}{span_end} servers').format(platform_name=settings.PLATFORM_NAME, span_start='', span_end='')}

    +

    ${_("We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible. Please email us at '{tech_support_email}' to report any problems or downtime.").format(tech_support_email=settings.TECH_SUPPORT_EMAIL)}

    diff --git a/lms/templates/courseware/courseware.html b/lms/templates/courseware/courseware.html index e009e535e3a8..8d033434f096 100644 --- a/lms/templates/courseware/courseware.html +++ b/lms/templates/courseware/courseware.html @@ -1,7 +1,8 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="/main.html" /> <%namespace name='static' file='/static_content.html'/> <%block name="bodyclass">courseware ${course.css_class} -<%block name="title">${course.number} Courseware +<%block name="title">${_("{course_number} Courseware").format(course_number=course.number)} <%block name="headextra"> <%static:css group='course'/> @@ -155,7 +156,7 @@
    % if timer_navigation_return_url: - Return to Exam + ${_("Return to Exam")} % endif
    Time Remaining:
     
    @@ -170,9 +171,9 @@
    % if accordion: -
    +
    - close + ${_("close")}
- ## `news` should be `None` whenever a non-edX theme is enabled: - ## see common/djangoapps/student/views.py#_get_news - %if news: - - %endif
-

Current Courses

+

${_("Current Courses")}

% if len(courses) > 0: @@ -211,11 +140,11 @@

Current Courses

% if course.id in show_courseware_links_for: - ${course.number} ${course.display_name_with_default} Cover Image + ${_('{course_number} {course_name} Cover Image').format(course_number='${course.number}', course_name='${course.display_name_with_default}')} % else:
- ${course.number} ${course.display_name_with_default} Cover Image + ${_('{course_number} {course_name} Cover Image').format(course_number='${course.number}', course_name='${course.display_name_with_default}')}
% endif @@ -223,11 +152,11 @@

Current Courses

% if course.has_ended(): - Course Completed - ${course.end_date_text} + ${_("Course Completed - {end_date}").format(end_date=course.end_date_text)} % elif course.has_started(): - Course Started - ${course.start_date_text} + ${_("Course Started - {start_date}").format(start_date=course.start_date_text)} % else: # hasn't started yet - Course Starts - ${course.start_date_text} + ${_("Course Starts - {start_date}").format(start_date=course.start_date_text)} % endif

${get_course_about_section(course, 'university')}

@@ -249,27 +178,41 @@

% if registration is None and testcenter_exam_info.is_registering():
- Register for Pearson exam -

Registration for the Pearson exam is now open and will close on ${testcenter_exam_info.registration_end_date_text}

+ ${_("Register for Pearson exam")} +

${_("Registration for the Pearson exam is now open and will close on {end_date}").format(end_date="{}".format(testcenter_exam_info.registration_end_date_text))}

% endif % if registration is not None: % if registration.is_accepted:
- Schedule Pearson exam -

Registration number: ${registration.client_candidate_id}

-

Write this down! You’ll need it to schedule your exam.

+ ${_("Schedule Pearson exam")} +

${_("{link_start}Registration{link_end} number: {number}").format( + link_start=''.format(url=testcenter_register_target), + link_end='', + number=registration.client_candidate_id, + )}

+

${_("Write this down! You'll need it to schedule your exam.")}

% endif % if registration.is_rejected:
-

Your registration for the Pearson exam has been rejected. Please see your registration status details. Otherwise contact edX at exam-help@edx.org for further help.

+

+ ${_("Your registration for the Pearson exam has been rejected. Please {link_start}see your registration status details{link_end}.").format( + link_start=''.format(url=testcenter_register_target), + link_end='')} + ${_("Otherwise {link_start}contact edX at {email}{link_end} for further help.").format( + link_start=''.format(email="exam-help@edx.org", about=get_course_about_section(course, 'university'), number=course.number), + link_end='', + email="exam-help@edx.org", + )}

% endif % if not registration.is_accepted and not registration.is_rejected:
-

Your registration for the Pearson exam is pending. Within a few days, you should see a confirmation number here, which can be used to schedule your exam.

+

${_("Your {link_start}registration for the Pearson exam{link_end} is pending.").format(link_start=''.format(url=testcenter_register_target), link_end='')} + ${_("Within a few days, you should see a confirmation number here, which can be used to schedule your exam.")} +

% endif % endif @@ -292,17 +235,16 @@

% if cert_status['status'] == 'processing': -

Final course details are being wrapped up at - this time. Your final standing will be available shortly.

+

${_("Final course details are being wrapped up at this time. Your final standing will be available shortly.")}

% elif cert_status['status'] in ('generating', 'ready', 'notpassing', 'restricted'): -

Your final grade: +

${_("Your final grade:")} ${"{0:.0f}%".format(float(cert_status['grade'])*100)}. % if cert_status['status'] == 'notpassing': - Grade required for a certificate: + ${_("Grade required for a certificate:")} ${"{0:.0f}%".format(float(course.lowest_passing_grade)*100)}. % elif cert_status['status'] == 'restricted':

- Your certificate is being held pending confirmation that the issuance of your certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know by contacting ${settings.CONTACT_EMAIL}. + ${_("Your certificate is being held pending confirmation that the issuance of your certificate is in compliance with strict U.S. embargoes on Iran, Cuba, Syria and Sudan. If you think our system has mistakenly identified you as being connected with one of those countries, please let us know by contacting {email}.").format(email='{email}.'.format(email=settings.CONTACT_EMAIL))}

% endif

@@ -312,17 +254,17 @@

% endif @@ -332,12 +274,12 @@

% if course.id in show_courseware_links_for: % if course.has_ended(): - View Archived Course + ${_('View Archived Course')} % else: - View Course + ${_('View Course')} % endif % endif - Unregister + ${_('Unregister')}

@@ -346,16 +288,16 @@

% endfor % else:
-

Looks like you haven't registered for any courses yet.

+

${_("Looks like you haven't registered for any courses yet.")}

- Find courses now! + ${_("Find courses now!")}
% endif % if staff_access and len(errored_courses) > 0:
-

Course-loading errors

+

${_("Course-loading errors")}

% for course_dir, errors in errored_courses.items():

${course_dir | h}

@@ -374,7 +316,7 @@

${course_dir | h}

- - + + % for puzzle in completed: diff --git a/lms/templates/folditchallenge.html b/lms/templates/folditchallenge.html index 677bc286c879..36e8f0caee1c 100644 --- a/lms/templates/folditchallenge.html +++ b/lms/templates/folditchallenge.html @@ -1,10 +1,12 @@ +<%! from django.utils.translation import ugettext as _ %> +
-

Puzzle Leaderboard

+

${_("Puzzle Leaderboard")}

LevelSubmitted${_("Level")}${_("Submitted")}
- - + + % for pair in top_scores: diff --git a/lms/templates/footer.html b/lms/templates/footer.html index daad0a245770..9c94e5751e68 100644 --- a/lms/templates/footer.html +++ b/lms/templates/footer.html @@ -1,5 +1,6 @@ ## mako <%! from django.core.urlresolvers import reverse %> +<%! from django.utils.translation import ugettext as _ %> <%namespace name='static' file='static_content.html'/> @@ -73,15 +74,15 @@ - + diff --git a/lms/templates/forgot_password_modal.html b/lms/templates/forgot_password_modal.html index 0f88b88f9747..e4c0c02e337a 100644 --- a/lms/templates/forgot_password_modal.html +++ b/lms/templates/forgot_password_modal.html @@ -1,30 +1,32 @@ +<%! from django.utils.translation import ugettext as _ %> + <%! from django.core.urlresolvers import reverse %> - <%block name="js_extra"> - @@ -90,46 +92,46 @@

${_("PLEASE LOG IN to access your account and courses")}

- Please provide the following information to log into your ${settings.PLATFORM_NAME} account. Required fields are noted by bold text and an asterisk (*). + ${_('Please provide the following information to log into your {platform_name} account. Required fields are noted by bold text and an asterisk (*).').format(platform_name=settings.PLATFORM_NAME)}

- Required Information + ${_('Required Information')}
  1. - +
  2. - + - Forgot password? + ${_('Forgot password?')}
- Account Preferences + ${_('Account Preferences')}
  1. - +
@@ -147,27 +149,27 @@

The following errors occurred while logging you in:
-

Helpful Information

+

${_("Helpful Information")}

% if settings.MITX_FEATURES.get('AUTH_USE_OPENID'): % endif
-

Not Enrolled?

-

Sign up for ${settings.PLATFORM_NAME} today!

+

${_("Not Enrolled?")}

+

${_("Sign up for {platform_name} today!").format(platform_name=settings.PLATFORM_NAME)}

## Disable help unless the FAQ marketing link is enabled % if settings.MKTG_URL_LINK_MAP.get('FAQ'): -

Need Help?

-

Looking for help in logging in or with your ${settings.PLATFORM_NAME} account? +

${_("Need Help?")}

+

${_("Looking for help in logging in or with your {platform_name} account?").format(platform_name=settings.PLATFORM_NAME)} - View our help section for answers to commonly asked questions. + ${_("View our help section for answers to commonly asked questions.")}

% endif
diff --git a/lms/templates/login_modal.html b/lms/templates/login_modal.html index de1c437caf76..03aebfe1b41f 100644 --- a/lms/templates/login_modal.html +++ b/lms/templates/login_modal.html @@ -1,38 +1,40 @@ +<%! from django.utils.translation import ugettext as _ %> + <%! from django.core.urlresolvers import reverse %> <%namespace name='static' file='static_content.html'/> - + {% include "footer.html" %} - + {% compressed_js 'application' %} {% compressed_js 'module-js' %} - + {% render_block "js" %} @@ -45,8 +46,8 @@ other pages inherit. This file should be rewritten to reflect any changes in main.html! Files used by {% include %} can be written as mako templates. - + Inheriting from this file allows us to include apps that use the django templating system without rewriting all of their views in - mako. + mako. {% endcomment %} diff --git a/lms/templates/module-error.html b/lms/templates/module-error.html index 659dbc1c8640..b0641ea5c4f9 100644 --- a/lms/templates/module-error.html +++ b/lms/templates/module-error.html @@ -1,17 +1,19 @@ +<%! from django.utils.translation import ugettext as _ %> +
-

There has been an error on the edX servers

-

We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible. Please email us at technical@edx.org to report any problems or downtime.

+

${_("There has been an error on the {platform_name} servers")}

+

${_("We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible. Please email us at {tech_support_email} to report any problems or downtime.").format(platform_name=settings.PLATFORM_NAME, tech_support_email=settings.TECH_SUPPORT_EMAIL)}

% if staff_access: -

Details

+

${_("Details")}

-

Error: +

${_("Error:")}

 ${error | h}
 

-

Raw data: +

${_("Raw data:")}

${data | h}

diff --git a/lms/templates/name_changes.html b/lms/templates/name_changes.html index da5d3b241b95..d6f109a69ef3 100644 --- a/lms/templates/name_changes.html +++ b/lms/templates/name_changes.html @@ -1,13 +1,15 @@ +<%! from django.utils.translation import ugettext as _ %> + <%inherit file="main.html" /> @@ -26,7 +28,7 @@
-

Pending name changes

+

${_("Pending name changes")}

UserScore${_("User")}${_("Score")}
% for s in students: @@ -34,8 +36,8 @@

Pending name changes

- + % endfor
${s['new_name']|h} ${s['email']|h} ${s['rationale']|h}[Confirm] - [Reject]
[${_("Confirm")}] + ${_("[Reject]")}
diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html index a26e1ca36785..589d12666d8f 100644 --- a/lms/templates/navigation.html +++ b/lms/templates/navigation.html @@ -3,6 +3,7 @@ <%namespace file='main.html' import="login_query, stanford_theme_enabled"/> <%! from django.core.urlresolvers import reverse +from django.utils.translation import ugettext as _ # App that handles subdomain specific branding import branding @@ -34,16 +35,16 @@ % if course: -
+
% else: -
+
% endif
% if course: -
Warning: Your browser is not fully supported. We strongly recommend using Chrome or Firefox.
+
${_('Warning: Your browser is not fully supported. We strongly recommend using {chrome_link_start}Chrome{chrome_link_end} or {ff_link_start}Firefox{ff_link_end}.').format(chrome_link_start='', chrome_link_end='', ff_link_start='', ff_link_end='')}
% endif %if not user.is_authenticated(): diff --git a/lms/templates/notes.html b/lms/templates/notes.html index 3fea6faa3e6e..16fdc2ebc910 100644 --- a/lms/templates/notes.html +++ b/lms/templates/notes.html @@ -1,3 +1,5 @@ +<%! from django.utils.translation import ugettext as _ %> + <%namespace name='static' file='static_content.html'/> <%inherit file="main.html" /> <%! @@ -55,27 +57,24 @@
-

My Notes

+

${_("My Notes")}

% for note in notes:
${note.quote|h}
${note.text.replace("\n", "
") | n,h}
    % if note.tags: -
  • Tags: ${note.tags|h}
  • +
  • ${_("Tags: {tags}").format(tags=note.tags) | h}
  • % endif -
  • Author: ${note.user.username}
  • -
  • Created: ${note.created.strftime('%m/%d/%Y %H:%m')}
  • -
  • Source: ${note.uri|h}
  • +
  • ${_('Author: {username}').format(username=note.user.username)}
  • +
  • ${_('Created: {datetime}').format(datetime=note.created.strftime('%m/%d/%Y %H:%m'))}
  • +
  • ${_('Source: {link}').format(link='{url}'.format(url=note.uri))}
% endfor % if notes is UNDEFINED or len(notes) == 0: -

You do not have any notes.

+

${_('You do not have any notes.')}

% endif
- - - diff --git a/lms/templates/open_ended_problems/combined_notifications.html b/lms/templates/open_ended_problems/combined_notifications.html index deb66b606468..86eb4083ddbb 100644 --- a/lms/templates/open_ended_problems/combined_notifications.html +++ b/lms/templates/open_ended_problems/combined_notifications.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="/main.html" /> <%block name="bodyclass">${course.css_class} <%namespace name='static' file='/static_content.html'/> @@ -6,7 +7,7 @@ <%static:css group='course'/> -<%block name="title">${course.number} Combined Notifications +<%block name="title">${_("{course_number} Combined Notifications").format(course_number=course.number)} <%include file="/courseware/course_navigation.html" args="active_page='open_ended'" /> @@ -14,13 +15,13 @@
${error_text}
-

Open Ended Console

-

Instructions

-

Here are items that could potentially need your attention.

+

${_("Open Ended Console")}

+

${_("Instructions")}

+

${_("Here are items that could potentially need your attention.")}

% if success: % if len(notification_list) == 0:
- No items require attention at the moment. + ${_("No items require attention at the moment.")}
%else:
diff --git a/lms/templates/open_ended_problems/open_ended_flagged_problems.html b/lms/templates/open_ended_problems/open_ended_flagged_problems.html index b4c6f4368576..ab60e543004f 100644 --- a/lms/templates/open_ended_problems/open_ended_flagged_problems.html +++ b/lms/templates/open_ended_problems/open_ended_flagged_problems.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="/main.html" /> <%block name="bodyclass">${course.css_class} <%namespace name='static' file='/static_content.html'/> @@ -6,7 +7,7 @@ <%static:css group='course'/> -<%block name="title">${course.number} Flagged Open Ended Problems +<%block name="title">${_("{course_number} Flagged Open Ended Problems").format(course_number=course.number)} <%include file="/courseware/course_navigation.html" args="active_page='open_ended_flagged_problems'" /> @@ -17,19 +18,19 @@
${error_text}
-

Flagged Open Ended Problems

-

Instructions

-

Here are a list of open ended problems for this course that have been flagged by students as potentially inappropriate.

+

${_("Flagged Open Ended Problems")}

+

${_("Instructions")}

+

${_("Here are a list of open ended problems for this course that have been flagged by students as potentially inappropriate.")}

% if success: % if len(problem_list) == 0:
- No flagged problems exist. + ${_("No flagged problems exist.")}
%else: - - + + @@ -42,10 +43,10 @@

Instructions

${problem['student_response']}
NameResponse${_("Name")}${_("Response")}
- Unflag + ${_("Unflag")} - Ban + ${_("Ban")}
diff --git a/lms/templates/open_ended_problems/open_ended_problems.html b/lms/templates/open_ended_problems/open_ended_problems.html index 3709fb2de6c4..56b269d8b739 100644 --- a/lms/templates/open_ended_problems/open_ended_problems.html +++ b/lms/templates/open_ended_problems/open_ended_problems.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="/main.html" /> <%block name="bodyclass">${course.css_class} <%namespace name='static' file='/static_content.html'/> @@ -6,7 +7,7 @@ <%static:css group='course'/> -<%block name="title">${course.number} Open Ended Problems +<%block name="title">${_("{course_number} Open Ended Problems").format(course_number=course.number)} <%include file="/courseware/course_navigation.html" args="active_page='open_ended_problems'" /> @@ -14,31 +15,31 @@
${error_text}
-

Open Ended Problems

-

Instructions

-

Here are a list of open ended problems for this course.

+

${_("Open Ended Problems")}

+

${_("Instructions")}

+

${_("Here are a list of open ended problems for this course.")}

% if success: % if len(problem_list) == 0:
- You have not attempted any open ended problems yet. + ${_("You have not attempted any open ended problems yet.")}
%else: - - - - + + + + %for problem in problem_list: -
Problem NameStatusGrader TypeETA${_("Problem Name")}${_("Status")}${_("Grader Type")}${_("ETA")}
- ${problem['problem_name']} + ${problem['problem_name']} - ${problem['state']} + ${problem['state']} + ${problem['grader_type']} diff --git a/lms/templates/peer_grading/peer_grading.html b/lms/templates/peer_grading/peer_grading.html index 0485b698b2d3..f423de1c6b4e 100644 --- a/lms/templates/peer_grading/peer_grading.html +++ b/lms/templates/peer_grading/peer_grading.html @@ -1,24 +1,25 @@ +<%! from django.utils.translation import ugettext as _ %>
${error_text}
-

Peer Grading

-

Instructions

-

Here are a list of problems that need to be peer graded for this course.

+

${_("Peer Grading")}

+

${_("Instructions")}

+

${_("Here are a list of problems that need to be peer graded for this course.")}

% if success: % if len(problem_list) == 0:
- Nothing to grade! + ${_("Nothing to grade!")}
%else:
- - - - - - + + + + + + %for problem in problem_list: @@ -33,7 +34,7 @@

Instructions

% if problem['due']: ${problem['due']} % else: - No due date + ${_("No due date")} % endif
Problem NameDue dateGradedAvailableRequiredProgress${_("Problem Name")}${_("Due date")}${_("Graded")}${_("Available")}${_("Required")}${_("Progress")}
diff --git a/lms/templates/peer_grading/peer_grading_closed.html b/lms/templates/peer_grading/peer_grading_closed.html index 712ad8b38047..af5b6066742d 100644 --- a/lms/templates/peer_grading/peer_grading_closed.html +++ b/lms/templates/peer_grading/peer_grading_closed.html @@ -1,10 +1,9 @@ +<%! from django.utils.translation import ugettext as _ %>
-

Peer Grading

-

The due date has passed, and +

${_("Peer Grading")}

% if use_for_single_location: - peer grading for this problem is closed at this time. +

${_("The due date has passed, and peer grading for this problem is closed at this time.")}

%else: - peer grading is closed at this time. +

${_("The due date has passed, and peer grading is closed at this time.")}

%endif -

diff --git a/lms/templates/peer_grading/peer_grading_problem.html b/lms/templates/peer_grading/peer_grading_problem.html index 5ad313681543..d99e14c706c4 100644 --- a/lms/templates/peer_grading/peer_grading_problem.html +++ b/lms/templates/peer_grading/peer_grading_problem.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %>
@@ -5,15 +6,15 @@
-

Learning to Grade

+

${_("Learning to Grade")}

-

Peer Grading

+

${_("Peer Grading")}

-

Prompt (Hide)

+

${_('Prompt')} ${_('(Hide)')}

@@ -25,7 +26,7 @@

Prompt (Hide)

-

Student Response

+

${_("Student Response")}

@@ -39,17 +40,17 @@

-

Written Feedback

-

Please include some written feedback as well.

+

${_("Written Feedback")}

+

${_("Please include some written feedback as well.")}

-
This submission has explicit or pornographic content :
-
I do not know how to grade this question :
+
${_("This submission has explicit or pornographic content : ")}
+
${_("I do not know how to grade this question : ")}
- +
- +
@@ -60,41 +61,41 @@

Written Feedback

-

How did I do?

+

${_("How did I do?")}

- +
-

Ready to grade!

-

You have finished learning to grade, which means that you are now ready to start grading.

- +

${_("Ready to grade!")}

+

${_("You have finished learning to grade, which means that you are now ready to start grading.")}

+
-

Learning to grade

-

You have not yet finished learning to grade this problem.

-

You will now be shown a series of instructor-scored essays, and will be asked to score them yourself.

-

Once you can score the essays similarly to an instructor, you will be ready to grade your peers.

- +

${_("Learning to grade")}

+

${_("You have not yet finished learning to grade this problem.")}

+

${_("You will now be shown a series of instructor-scored essays, and will be asked to score them yourself.")}

+

${_("Once you can score the essays similarly to an instructor, you will be ready to grade your peers.")}

+
-

Are you sure that you want to flag this submission?

+

${_("Are you sure that you want to flag this submission?")}

- You are about to flag a submission. You should only flag a submission that contains explicit or offensive content. If the submission is not addressed to the question or is incorrect, you should give it a score of zero and accompanying feedback instead of flagging it. + ${_("You are about to flag a submission. You should only flag a submission that contains explicit or offensive content. If the submission is not addressed to the question or is incorrect, you should give it a score of zero and accompanying feedback instead of flagging it.")}

- - + +
- +
diff --git a/lms/templates/problem.html b/lms/templates/problem.html index f4f8e78b66c9..efcb868cb9b6 100644 --- a/lms/templates/problem.html +++ b/lms/templates/problem.html @@ -1,3 +1,5 @@ +<%! from django.utils.translation import ugettext as _ %> + <%namespace name='static' file='static_content.html'/>

${ problem['name'] } @@ -16,17 +18,17 @@

% endif % if reset_button: - + % endif % if save_button: - + % endif % if answer_available: - + % endif % if attempts_allowed :
- You have used ${ attempts_used } of ${ attempts_allowed } submissions + ${_("You have used {num_used} of {num_total} submissions").format(num_used=attempts_used, num_total=attempts_allowed)}
% endif

diff --git a/lms/templates/provider_login.html b/lms/templates/provider_login.html index a98b2ab32bfa..3bcd22fafd7e 100644 --- a/lms/templates/provider_login.html +++ b/lms/templates/provider_login.html @@ -1,3 +1,5 @@ +<%! from django.utils.translation import ugettext as _ %> + <%inherit file="main.html" /> <%namespace name='static' file='static_content.html'/> @@ -32,19 +34,19 @@
@@ -262,23 +268,23 @@

Welcome ${extauth_id}

% endif
- +
diff --git a/lms/templates/registration/activate_account_notice.html b/lms/templates/registration/activate_account_notice.html index ca051902b1de..b65a36e2738f 100644 --- a/lms/templates/registration/activate_account_notice.html +++ b/lms/templates/registration/activate_account_notice.html @@ -1,3 +1,3 @@ -

Thanks For Registering!

-

Your account is not active yet. An activation link has been sent to ${ email }, along with -instructions for activating your account.

+<%! from django.utils.translation import ugettext as _ %> +

${_("Thanks For Registering!")}

+

${_("Your account is not active yet. An activation link has been sent to {email}, along with instructions for activating your account.").format(email="{}".format(email))}

diff --git a/lms/templates/registration/activation_complete.html b/lms/templates/registration/activation_complete.html index 7eb805e73098..95f508d13285 100644 --- a/lms/templates/registration/activation_complete.html +++ b/lms/templates/registration/activation_complete.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> <%! from django.core.urlresolvers import reverse %> <%inherit file="../main.html" /> @@ -7,23 +8,23 @@
%if not already_active: -

Activation Complete!

+

${_("Activation Complete!")}

%else: -

Account already active!

+

${_("Account already active!")}

%endif
- +

%if not already_active: - Thanks for activating your account. + ${_("Thanks for activating your account.")} %else: - This account has already been activated. + ${_("This account has already been activated.")} %endif - + %if user_logged_in: - Visit your dashboard to see your courses. + ${_("Visit your {link_start}dashboard{link_end} to see your courses.").format(link_start=''.format(url=reverse('dashboard')), link_end='')} %else: - You can now log in. + ${_("You can now {link_start}log in{link_end}.").format(link_start=''.format(url=reverse('signin_user')), link_end='')} %endif

diff --git a/lms/templates/registration/activation_invalid.html b/lms/templates/registration/activation_invalid.html index 0a6d6d30c9e2..edeede84e7a6 100644 --- a/lms/templates/registration/activation_invalid.html +++ b/lms/templates/registration/activation_invalid.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> <%! from django.core.urlresolvers import reverse %> <%inherit file="../main.html" /> @@ -6,14 +7,14 @@
-

Activation Invalid

+

${_("Activation Invalid")}


-

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 ${settings.BUGS_EMAIL}.

+

${_('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='{email}'.format(email=settings.BUGS_EMAIL))}

-

Or you can go back to the home page.

+

${_('Or you can go back to the {link_start}home page{link_end}.').format(link_start='', link_end='')}

diff --git a/lms/templates/registration/login.html b/lms/templates/registration/login.html index 70e58965a4c4..d8fb92855e93 100644 --- a/lms/templates/registration/login.html +++ b/lms/templates/registration/login.html @@ -1,28 +1,28 @@ +<%! from django.utils.translation import ugettext as _ %> {% extends "registration/base.html" %} -{% block title %}Log in{% endblock %} +{% block title %}${_("Log in")}{% endblock %} {% block content %} -

Log in

+

${_("Log in")}

{% if form.errors %} -

Please correct the errors below:

+

${_("Please correct the errors below:")}

{% endif %}
{% csrf_token %}
-
{% if form.username.errors %} {{ form.username.errors|join:", " }}{% endif %}
+
{% if form.username.errors %} {{ form.username.errors|join:", " }}{% endif %}
{{ form.username }}
-
{% if form.password.errors %} {{ form.password.errors|join:", " }}{% endif %}
+
{% if form.password.errors %} {{ form.password.errors|join:", " }}{% endif %}
{{ form.password }}
-
+
{% endblock %} {% block content-related %} -

If you don't have an account, you can sign -up for one. +

${_("If you don't have an account, you can {link_start}sign up{link_end} for one.").format(link_start='', link_end='')} {% endblock %} diff --git a/lms/templates/registration/logout.html b/lms/templates/registration/logout.html index 3275d2e1b469..a3ff64507a0f 100644 --- a/lms/templates/registration/logout.html +++ b/lms/templates/registration/logout.html @@ -1,8 +1,9 @@ +<%! from django.utils.translation import ugettext as _ %> {% extends "registration/base.html" %} -{% block title %}Logged out{% endblock %} +{% block title %}${_("Logged out")}{% endblock %/} {% block content %} -

You've been logged out.

-

Thanks for stopping by; when you come back, don't forget to log in again.

-{% endblock %} \ No newline at end of file +

${_("You've been logged out.")}

+

${_("Thanks for stopping by; when you come back, don't forget to {link_start}log in{link_end} again.").format(link_start='', link_end='')}

+{% endblock %} diff --git a/lms/templates/registration/password_reset_complete.html b/lms/templates/registration/password_reset_complete.html index 3847f615b9bf..3f301102b5c4 100644 --- a/lms/templates/registration/password_reset_complete.html +++ b/lms/templates/registration/password_reset_complete.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> {% load i18n %} {% load compressed %} {% load staticfiles %} @@ -5,7 +6,7 @@ - Your Password Reset is Complete + ${_("Your Password Reset is Complete")} {% compressed_css 'application' %} @@ -53,13 +54,13 @@

-

Your Password Reset is Complete

+

${_("Your Password Reset is Complete")}

{% block content %}
-

Your password has been set. You may go ahead and log in now..

+

${_('Your password has been set. You may go ahead and {link_start}log in{link_end} now.').format(link_start='', link_end='')}

{% endblock %}
diff --git a/lms/templates/registration/password_reset_confirm.html b/lms/templates/registration/password_reset_confirm.html index 5809408dad13..6a568545d19a 100644 --- a/lms/templates/registration/password_reset_confirm.html +++ b/lms/templates/registration/password_reset_confirm.html @@ -1,10 +1,11 @@ +<%! from django.utils.translation import ugettext as _ %> {% load compressed %} {% load staticfiles %} - Reset Your edX Password + ${_("Reset Your {platform_name} Password").format(platform_name=settings.PLATFORM_NAME)} {% compressed_css 'application' %} @@ -52,79 +53,78 @@

-

Reset Your edX Password

+

${_("Reset Your {platform_name} Password").format(platform_name=settings.PLATFORM_NAME)}

{% if validlink %}
-

Password Reset Form

+

${_("Password Reset Form")}

{% csrf_token %}

- Please enter your new password twice so we can verify you typed it in correctly.
- Required fields are noted by bold text and an asterisk (*). + ${_('Please enter your new password twice so we can verify you typed it in correctly.
' + 'Required fields are noted by bold text and an asterisk (*).')}

- Required Information + ${_("Required Information")}
  1. - +
  2. - +
- +
{% else %}
-

Your Password Reset Was Unsuccessful

+

${_("Your Password Reset Was Unsuccessful")}

-

The password reset link was invalid, possibly because the link has already been used. Please return to the login page and start the password reset process again.

+

${_('The password reset link was invalid, possibly because the link has already been used. Please return to the login page and start the password reset process again.')}

{% endif %}
diff --git a/lms/templates/registration/password_reset_done.html b/lms/templates/registration/password_reset_done.html index 0b029a854fe9..fa34ab6e19b5 100644 --- a/lms/templates/registration/password_reset_done.html +++ b/lms/templates/registration/password_reset_done.html @@ -1,8 +1,9 @@ +<%! from django.utils.translation import ugettext as _ %>
-

Password reset successful

+

${_("Password reset successful")}


-

We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly.

+

${_("We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly.")}

diff --git a/lms/templates/registration/registration_complete.html b/lms/templates/registration/registration_complete.html index 9f0cea41dbb4..d6f9a5659a8a 100644 --- a/lms/templates/registration/registration_complete.html +++ b/lms/templates/registration/registration_complete.html @@ -1,8 +1,9 @@ {% extends "registration/base.html" %} +{% load i18n %} -{% block title %}Registration complete{% endblock %} +{% block title %}{% trans "Registration complete" %}{% endblock %} {% block content %} -

Check your email

-

An activation link has been sent to the email address you supplied, along with instructions for activating your account.

+

{% trans Check your email %}

+

{% trans "An activation link has been sent to the email address you supplied, along with instructions for activating your account."%}

{% endblock %} \ No newline at end of file diff --git a/lms/templates/registration/registration_form.html b/lms/templates/registration/registration_form.html index 1e9d6306396a..f90392d73f1f 100644 --- a/lms/templates/registration/registration_form.html +++ b/lms/templates/registration/registration_form.html @@ -1,58 +1,59 @@ +<%! from django.utils.translation import ugettext as _ %> {% extends "registration/base.html" %} -{% block title %}Sign up{% endblock %} +{% block title %}${_("Sign up")}{% endblock %} {% block content %} {% if form.errors %} -

Please correct the errors below: {{ form.non_field_errors }}

+

${_("Please correct the errors below: {{ form.non_field_errors }}")}

{% endif %} -

Create an account

- +

${_("Create an account")}

+
{% csrf_token %}

- + {% if form.username.errors %}

{{ form.username.errors.as_text }}

{% endif %} {{ form.username }}

- + {% if form.email.errors %}

{{ form.email.errors.as_text }}

{% endif %} {{ form.email }}

- + {% if form.password1.errors %}

{{ form.password1.errors.as_text }}

{% endif %} {{ form.password1 }}

- + {% if form.password2.errors %}

{{ form.password2.errors.as_text }}

{% endif %} {{ form.password2 }}

-

+

- + {% endblock %} {% block content-related %} -

Fill out the form to the left (all fields are required), and your -account will be created; you'll be sent an email with instructions on how -to finish your registration.

+

${_("Fill out the form to the left (all fields are required), and your " +"account will be created; you'll be sent an email with instructions on how " +"to finish your registration.")}

-

We'll only use your email to send you signup instructions. We hate spam -as much as you do.

+

${_("We'll only use your email to send you signup instructions. We hate spam " +"as much as you do.")}

-

This account will let you log into the ticket tracker, claim tickets, -and be exempt from spam filtering.

+

${_("This account will let you log into the ticket tracker, claim tickets, " +"and be exempt from spam filtering")}.

{% endblock %} diff --git a/lms/templates/seq_module.html b/lms/templates/seq_module.html index fff1279cd640..bb04d1b31c33 100644 --- a/lms/templates/seq_module.html +++ b/lms/templates/seq_module.html @@ -1,7 +1,9 @@ +<%! from django.utils.translation import ugettext as _ %> +
-
diff --git a/lms/templates/signup_modal.html b/lms/templates/signup_modal.html index 9c1a868e2d83..a9d709ba60e0 100644 --- a/lms/templates/signup_modal.html +++ b/lms/templates/signup_modal.html @@ -1,3 +1,5 @@ +<%! from django.utils.translation import ugettext as _ %> + <%namespace name='static' file='static_content.html'/> <%! from django.core.urlresolvers import reverse %> <%! from django_countries.countries import COUNTRIES %> @@ -9,7 +11,7 @@
-

Sign Up for edX

+

${_('Sign Up for {span_start}{platform_name}{span_end}').format(span_start='', span_end='', platform_name=settings.PLATFORM_NAME)}


@@ -20,41 +22,41 @@

Sign Up for edX

% if has_extauth_info is UNDEFINED: - - - - + + + + - - - - - - + + + + + + % else: -

Welcome ${extauth_id}


-

Enter a public username:

- - - +

${_('Welcome {name}').format(name=extauth_id)}


+

${_('Enter a public username:')}

+ + + % if ask_for_email: - - + + % endif - + % if ask_for_fullname: - - + + % endif - + % endif
- +
@@ -78,7 +80,7 @@

Sign Up for edX

- +
- - + +
@@ -101,33 +103,35 @@

Sign Up for edX

- +
% if has_extauth_info is UNDEFINED: % endif
- +

@@ -146,7 +150,7 @@

Sign Up for edX

$("[data-field='"+json.field+"']").addClass('field-error') } }); - + // removing close link's default behavior $('#login-modal .close-modal').click(function(e) { e.preventDefault(); diff --git a/lms/templates/staff_problem_info.html b/lms/templates/staff_problem_info.html index d24d6528acda..6d1517c447ef 100644 --- a/lms/templates/staff_problem_info.html +++ b/lms/templates/staff_problem_info.html @@ -1,3 +1,5 @@ +<%! from django.utils.translation import ugettext as _ %> + ## The JS for this is defined in xqa_interface.html ${module_content} %if location.category in ['problem','video','html','combinedopenended','graphical_slider_tool']: @@ -14,27 +16,27 @@ % endif
% endif - + % if settings.MITX_FEATURES.get('ENABLE_STUDENT_HISTORY_VIEW') and \ location.category == 'problem': - + % endif