From 3b9bfce6e3327b0360496c3cd929ac973110b3f2 Mon Sep 17 00:00:00 2001 From: Jianfei Wang Date: Thu, 27 Jun 2013 21:28:37 +0800 Subject: [PATCH 01/56] tsinghuax i18n changes Extract strings for i18n Fix Javascript i18n Fix Email i18n Fix JS&Widgets i18n --- cms/djangoapps/contentstore/utils.py | 5 +- cms/djangoapps/contentstore/views/user.py | 9 +- cms/static/client_templates/checklist.html | 4 +- .../course_info_handouts.html | 2 +- cms/static/coffee/files.json | 1 + cms/static/js/base.js | 24 +- .../js/models/settings/course_details.js | 12 +- .../models/settings/course_grading_policy.js | 10 +- cms/static/js/views/section.js | 5 +- cms/templates/404.html | 9 +- cms/templates/500.html | 13 +- cms/templates/activation_active.html | 7 +- cms/templates/activation_complete.html | 7 +- cms/templates/activation_invalid.html | 12 +- cms/templates/asset_index.html | 4 +- cms/templates/base.html | 5 +- cms/templates/checklists.html | 13 +- cms/templates/course_info.html | 13 +- cms/templates/edit-static-page.html | 21 +- cms/templates/edit-tabs.html | 21 +- cms/templates/edit_subsection.html | 53 +- cms/templates/editable_preview.html | 11 +- cms/templates/emails/activation_email.txt | 10 +- .../emails/activation_email_subject.txt | 3 +- cms/templates/error.html | 21 +- cms/templates/export.html | 31 +- cms/templates/howitworks.html | 93 +-- cms/templates/import.html | 27 +- cms/templates/index.html | 10 +- cms/templates/login.html | 25 +- cms/templates/manage_users.html | 13 +- cms/templates/overview.html | 79 +- .../registration/activation_complete.html | 9 +- cms/templates/registration/reg_complete.html | 4 +- cms/templates/settings.html | 2 +- cms/templates/settings_advanced.html | 31 +- .../settings_discussions_faculty.html | 197 ++--- cms/templates/settings_graders.html | 39 +- cms/templates/signup.html | 45 +- cms/templates/static-pages.html | 13 +- cms/templates/unit.html | 47 +- cms/templates/widgets/header.html | 15 +- cms/templates/widgets/sock.html | 27 +- common/djangoapps/mitxmako/middleware.py | 1 + common/djangoapps/student/views.py | 66 +- common/lib/xmodule/xmodule/course_module.py | 10 +- common/lib/xmodule/xmodule/util/date_utils.py | 11 +- conf/locale/babel.cfg | 2 + conf/locale/config | 2 +- lms/envs/common.py | 5 + lms/templates/admin_dashboard.html | 2 +- lms/templates/annotatable.html | 10 +- .../combined_open_ended.html | 5 +- .../combined_open_ended_legend.html | 3 +- .../combined_open_ended_status.html | 3 +- .../open_ended_result_table.html | 23 +- .../openended/open_ended.html | 15 +- .../openended/open_ended_error.html | 5 +- .../openended/open_ended_evaluation.html | 21 +- .../openended/open_ended_rubric.html | 5 +- .../selfassessment/self_assessment_hint.html | 3 +- .../self_assessment_prompt.html | 5 +- lms/templates/contact.html | 30 +- lms/templates/course.html | 9 +- lms/templates/course_filter.html | 22 +- .../course_groups/cohort_management.html | 13 +- lms/templates/course_groups/debug.html | 3 +- lms/templates/courseware/course_about.html | 43 +- .../courseware/course_navigation.html | 3 +- lms/templates/courseware/courses.html | 7 +- .../courseware/courseware-error.html | 7 +- lms/templates/courseware/courseware.html | 19 +- lms/templates/courseware/grade_summary.html | 5 +- lms/templates/courseware/gradebook.html | 3 +- lms/templates/courseware/info.html | 9 +- .../courseware/instructor_dashboard.html | 266 +++---- .../courseware/mktg_coming_soon.html | 5 +- .../courseware/mktg_course_about.html | 17 +- lms/templates/courseware/news.html | 5 +- lms/templates/courseware/notifications.html | 13 +- lms/templates/courseware/progress.html | 7 +- lms/templates/courseware/syllabus.html | 5 +- lms/templates/courseware/welcome-back.html | 3 +- lms/templates/dashboard.html | 103 ++- lms/templates/debug/run_python_form.html | 3 +- lms/templates/discussion/_blank_slate.html | 5 +- .../_discussion_course_navigation.html | 5 +- .../discussion/_discussion_module.html | 3 +- .../discussion/_filter_dropdown.html | 7 +- .../discussion/_inline_new_post.html | 17 +- lms/templates/discussion/_new_post.html | 19 +- .../discussion/_recent_active_posts.html | 3 +- lms/templates/discussion/_search_bar.html | 3 +- lms/templates/discussion/_similar_posts.html | 3 +- lms/templates/discussion/_single_thread.html | 3 +- .../discussion/_thread_list_template.html | 17 +- .../discussion/_underscore_templates.html | 41 +- lms/templates/discussion/_user_profile.html | 5 +- lms/templates/discussion/index.html | 3 +- lms/templates/discussion/maintenance.html | 5 +- lms/templates/discussion/single_thread.html | 3 +- lms/templates/discussion/user_profile.html | 5 +- lms/templates/email_change_failed.html | 8 +- lms/templates/email_change_successful.html | 6 +- lms/templates/email_exists.html | 8 +- lms/templates/emails_change_successful.html | 6 +- lms/templates/enroll_students.html | 22 +- lms/templates/extauth_failure.html | 6 +- lms/templates/folditbasic.html | 16 +- lms/templates/folditchallenge.html | 8 +- lms/templates/footer.html | 20 +- lms/templates/forgot_password_modal.html | 16 +- lms/templates/help_modal.html | 72 +- lms/templates/index.html | 33 +- lms/templates/instructor/staff_grading.html | 25 +- lms/templates/invalid_email_key.html | 14 +- lms/templates/licenses/serial_numbers.html | 3 +- lms/templates/login.html | 48 +- lms/templates/login_modal.html | 18 +- lms/templates/main.html | 22 +- lms/templates/main_django.html | 4 +- lms/templates/module-error.html | 12 +- lms/templates/name_changes.html | 16 +- lms/templates/navigation.html | 34 +- lms/templates/notes.html | 14 +- .../combined_notifications.html | 11 +- .../open_ended_flagged_problems.html | 19 +- .../open_ended_problems.html | 21 +- lms/templates/peer_grading/peer_grading.html | 23 +- .../peer_grading/peer_grading_closed.html | 9 +- .../peer_grading/peer_grading_problem.html | 49 +- lms/templates/problem.html | 12 +- lms/templates/provider_login.html | 16 +- lms/templates/register.html | 120 +-- .../registration/activate_account_notice.html | 7 +- .../registration/activation_complete.html | 13 +- .../registration/activation_invalid.html | 13 +- lms/templates/registration/login.html | 16 +- lms/templates/registration/logout.html | 9 +- .../registration/password_change_done.html | 2 +- .../registration/password_reset_complete.html | 7 +- .../registration/password_reset_confirm.html | 43 +- .../registration/password_reset_done.html | 5 +- .../registration/registration_complete.html | 2 +- .../registration/registration_form.html | 31 +- lms/templates/seq_module.html | 12 +- lms/templates/signup_modal.html | 56 +- lms/templates/staff_problem_info.html | 34 +- lms/templates/static_htmlbook.html | 4 +- lms/templates/static_pdfbook.html | 30 +- lms/templates/static_templates/404.html | 7 +- lms/templates/static_templates/about.html | 31 +- lms/templates/static_templates/contact.html | 35 +- lms/templates/static_templates/copyright.html | 19 +- lms/templates/static_templates/faq.html | 91 +-- lms/templates/static_templates/help.html | 229 +++--- lms/templates/static_templates/honor.html | 31 +- lms/templates/static_templates/jobs.html | 725 +++++++++--------- lms/templates/static_templates/media-kit.html | 45 +- lms/templates/static_templates/press.html | 13 +- lms/templates/static_templates/privacy.html | 95 +-- .../static_templates/server-down.html | 5 +- .../static_templates/server-error.html | 5 +- .../static_templates/server-overloaded.html | 5 +- lms/templates/static_templates/tos.html | 127 +-- lms/templates/staticbook.html | 10 +- lms/templates/stripped-main.html | 4 +- lms/templates/test_center_register.html | 192 ++--- lms/templates/tracking_log.html | 6 +- lms/templates/university_profile/anux.html | 7 +- .../university_profile/berkeleyx.html | 7 +- lms/templates/university_profile/delftx.html | 7 +- lms/templates/university_profile/edge.html | 23 +- lms/templates/university_profile/epflx.html | 11 +- .../university_profile/georgetownx.html | 7 +- .../university_profile/harvardx.html | 9 +- lms/templates/university_profile/mcgillx.html | 7 +- lms/templates/university_profile/mitx.html | 11 +- lms/templates/university_profile/ricex.html | 7 +- .../university_profile/template.html | 7 +- .../university_profile/torontox.html | 7 +- .../university_profile/utaustinx.html | 7 +- lms/templates/university_profile/utx.html | 9 +- .../university_profile/wellesleyx.html | 7 +- lms/templates/using.html | 10 +- lms/templates/video.html | 6 +- lms/templates/videoalpha.html | 6 +- lms/templates/wiki/article.html | 3 +- lms/templates/wiki/includes/article_menu.html | 3 +- lms/templates/wiki/includes/cheatsheet.html | 47 +- .../wiki/includes/editor_widget.html | 3 +- .../wiki/plugins/attachments/index.html | 7 +- lms/templates/wiki/preview_inline.html | 5 +- lms/templates/word_cloud.html | 4 +- lms/urls.py | 13 + 195 files changed, 2542 insertions(+), 2314 deletions(-) diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 452806fe648e..5fa0d949b085 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -9,12 +9,13 @@ import logging import re from xmodule.modulestore.draft import DIRECT_ONLY_CATEGORIES +from django.utils.translation import ugettext as _ log = logging.getLogger(__name__) # In order to instantiate an open ended tab automatically, need to have this data -OPEN_ENDED_PANEL = {"name": "Open Ended Panel", "type": "open_ended"} -NOTES_PANEL = {"name": "My Notes", "type": "notes"} +OPEN_ENDED_PANEL = {"name": _("Open Ended Panel"), "type": "open_ended"} +NOTES_PANEL = {"name": _("My Notes"), "type": "notes"} EXTRA_TAB_PANELS = dict([(p['type'], p) for p in [OPEN_ENDED_PANEL, NOTES_PANEL]]) diff --git a/cms/djangoapps/contentstore/views/user.py b/cms/djangoapps/contentstore/views/user.py index dae0d246a51b..e996ab7cea15 100644 --- a/cms/djangoapps/contentstore/views/user.py +++ b/cms/djangoapps/contentstore/views/user.py @@ -2,6 +2,7 @@ from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required +from django.utils.translation import ugettext as _ from django_future.csrf import ensure_csrf_cookie from mitxmako.shortcuts import render_to_response @@ -78,7 +79,7 @@ def add_user(request, location): if not email: msg = { 'Status': 'Failed', - 'ErrMsg': 'Please specify an email address.', + 'ErrMsg': _('Please specify an email address.'), } return JsonResponse(msg, 400) @@ -92,7 +93,7 @@ def add_user(request, location): if user is None: msg = { 'Status': 'Failed', - 'ErrMsg': "Could not find user by email address '{0}'.".format(email), + 'ErrMsg': _("Could not find user by email address '{0}'.").format(email), } return JsonResponse(msg, 404) @@ -100,7 +101,7 @@ def add_user(request, location): if not user.is_active: msg = { 'Status': 'Failed', - 'ErrMsg': 'User {0} has registered but has not yet activated his/her account.'.format(email), + 'ErrMsg': _('User {0} has registered but has not yet activated his/her account.').format(email), } return JsonResponse(msg, 400) @@ -129,7 +130,7 @@ def remove_user(request, location): if user is None: msg = { 'Status': 'Failed', - 'ErrMsg': "Could not find user by email address '{0}'.".format(email), + 'ErrMsg': _("Could not find user by email address '{0}'.").format(email), } return JsonResponse(msg, 404) diff --git a/cms/static/client_templates/checklist.html b/cms/static/client_templates/checklist.html index e985ab95093e..1f6278be5d9d 100644 --- a/cms/static/client_templates/checklist.html +++ b/cms/static/client_templates/checklist.html @@ -8,13 +8,13 @@ id="<%= 'course-checklist' + checklistIndex %>"> <% var widthPercentage = 'width:' + percentChecked + '%;'; %> - <%= percentChecked %>% of checklist completed + <%= percentChecked %>${_("% of checklist completed")}

<%= checklistShortDescription %>

- Tasks Completed: <%= itemsChecked %>/<%= items.length %> + ${_("Tasks Completed:")} <%= itemsChecked %>/<%= items.length %>
diff --git a/cms/static/client_templates/course_info_handouts.html b/cms/static/client_templates/course_info_handouts.html index 958a1c77d658..cf9fdb5c854d 100644 --- a/cms/static/client_templates/course_info_handouts.html +++ b/cms/static/client_templates/course_info_handouts.html @@ -6,7 +6,7 @@

Course Handouts

<%= model.get('data') %> <% } else {%> -

You have no handouts defined

+

${_("You have no handouts defined")}

<% } %>
diff --git a/cms/static/coffee/files.json b/cms/static/coffee/files.json index 3c27629f694b..3964bee45558 100644 --- a/cms/static/coffee/files.json +++ b/cms/static/coffee/files.json @@ -1,5 +1,6 @@ { "static_files": [ + "../jsi18n/", "js/vendor/RequireJS.js", "js/vendor/jquery.min.js", "js/vendor/jquery-ui.min.js", diff --git a/cms/static/js/base.js b/cms/static/js/base.js index c2f401c77e2c..983974580660 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -79,10 +79,10 @@ $(document).ready(function() { }); // 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 - $('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, closeButton: '.action-modal-close' }); @@ -199,8 +199,8 @@ function toggleSections(e) { $section = $('.courseware-section'); sectionCount = $section.length; $button = $(this); - $labelCollapsed = $(' Collapse All Sections'); - $labelExpanded = $(' Expand All Sections'); + $labelCollapsed = $(gettext(' Collapse All Sections')); + $labelExpanded = $(gettext(' Expand All Sections')); var buttonLabel = $button.hasClass('is-activated') ? $labelCollapsed : $labelExpanded; $button.toggleClass('is-activated').html(buttonLabel); @@ -326,7 +326,7 @@ function saveSubsection() { $changedInput = null; }, error: function() { - showToastMessage('There has been an error while saving your changes.'); + showToastMessage(gettext('There has been an error while saving your changes.')); } }); } @@ -372,11 +372,11 @@ function deleteSection(e) { } 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'); - analytics.track('Deleted an Item', { + analytics.track(gettext('Deleted an Item'), { 'course': course_location_analytics, 'id': id }); @@ -552,7 +552,7 @@ function saveNewSection(e) { var template = $saveButton.data('template'); var display_name = $(this).find('.new-section-name').val(); - analytics.track('Created a Section', { + analytics.track(gettext('Created a Section'), { 'course': course_location_analytics, 'display_name': display_name }); @@ -599,11 +599,11 @@ function saveNewCourse(e) { var display_name = $newCourse.find('.new-course-name').val(); 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; } - analytics.track('Created a Course', { + analytics.track(gettext('Created a Course'), { 'org': org, 'number': number, 'display_name': display_name @@ -660,7 +660,7 @@ function saveNewSubsection(e) { var template = $(this).find('.new-subsection-name-save').data('template'); var display_name = $(this).find('.new-subsection-name-input').val(); - analytics.track('Created a Subsection', { + analytics.track(gettext('Created a Subsection'), { 'course': course_location_analytics, 'display_name': display_name }); @@ -706,7 +706,7 @@ function saveSetSectionScheduleDate(e) { var id = $modal.attr('data-id'); - analytics.track('Edited Section Release Date', { + analytics.track(gettext('Edited Section Release Date'), { 'course': course_location_analytics, 'id': id, 'start': start diff --git a/cms/static/js/models/settings/course_details.js b/cms/static/js/models/settings/course_details.js index b71b4e2ab281..ff6b3cfefdb4 100644 --- a/cms/static/js/models/settings/course_details.js +++ b/cms/static/js/models/settings/course_details.js @@ -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. var errors = {}; 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) { - 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) { - 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) { - 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) { - 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 (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 } diff --git a/cms/static/js/models/settings/course_grading_policy.js b/cms/static/js/models/settings/course_grading_policy.js index 8162145003fc..2e63b5fd3592 100644 --- a/cms/static/js/models/settings/course_grading_policy.js +++ b/cms/static/js/models/settings/course_grading_policy.js @@ -79,13 +79,13 @@ CMS.Models.Settings.CourseGrader = Backbone.Model.extend({ // FIXME somehow this.collection is unbound sometimes. I can't track down when var existing = this.collection && this.collection.some(function(other) { return (other != this) && (other.get('type') == attrs['type']);}, this); 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 (attrs['weight']) { if (!isFinite(attrs.weight) || /\D+/.test(attrs.weight)) { - errors.weight = "Please enter an integer between 0 and 100."; + errors.weight = gettext("Please enter an integer between 0 and 100."); } else { attrs.weight = parseInt(attrs.weight); // see if this ensures value saved is int @@ -99,18 +99,18 @@ CMS.Models.Settings.CourseGrader = Backbone.Model.extend({ }} if (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); } if (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); } if (attrs['min_count'] && attrs['drop_count'] && attrs.drop_count > attrs.min_count) { - errors.drop_count = "Cannot drop more " + attrs.type + " than will assigned."; + errors.drop_count = gettext("Cannot drop more %s than will assigned.").split("%s").join(attrs.type); } if (!_.isEmpty(errors)) return errors; } diff --git a/cms/static/js/views/section.js b/cms/static/js/views/section.js index eccc547a0615..eb7405233e55 100644 --- a/cms/static/js/views/section.js +++ b/cms/static/js/views/section.js @@ -1,8 +1,9 @@ CMS.Views.SectionShow = Backbone.View.extend({ - template: _.template('" class="section-name-span"><%= name %>'), +template: _.template('<%= name %>'), render: function() { var attrs = { - name: this.model.escape('name') + name: gettext(this.model.escape('name')), + sometext: gettext("Edit this section\'s name") }; this.$el.html(this.template(attrs)); this.delegateEvents(); diff --git a/cms/templates/404.html b/cms/templates/404.html index a45a223badd9..3f89a80de8d0 100644 --- a/cms/templates/404.html +++ b/cms/templates/404.html @@ -1,14 +1,15 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> -<%block name="title">Page Not Found +<%block name="title">${_("Page Not Found")} <%block name="content">
-

Page not found

-

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 technical@edx.org.

+

${_("Page not found")}

+

${_('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 technical@edx.org.')}

- \ No newline at end of file + diff --git a/cms/templates/500.html b/cms/templates/500.html index 3d18d9dcc59e..101bc112adb1 100644 --- a/cms/templates/500.html +++ b/cms/templates/500.html @@ -1,18 +1,19 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> -<%block name="title">Studio Server Error +<%block name="title">${_("Studio Server Error")} <%block name="content">
-

The Studio servers encountered an error

+

${_("The Studio servers encountered an error")}

- 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. - If the problem persists, please email us at technical@edx.org. + ${_("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.")} + ${_('If the problem persists, please email us at technical@edx.org.')}

- \ No newline at end of file + diff --git a/cms/templates/activation_active.html b/cms/templates/activation_active.html index 712c73abf936..853e44ed01cb 100644 --- a/cms/templates/activation_active.html +++ b/cms/templates/activation_active.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> <%block name="content"> @@ -6,9 +7,9 @@
-

Account already active!

-

This account has already been activated. Log in here.

+

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

+

${_('This account has already been activated. Log in here.')}

- \ No newline at end of file + diff --git a/cms/templates/activation_complete.html b/cms/templates/activation_complete.html index 1e195a632ca7..e8eef263baac 100644 --- a/cms/templates/activation_complete.html +++ b/cms/templates/activation_complete.html @@ -1,12 +1,13 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> <%block name="content">
-

Activation Complete!

-

Thanks for activating your account. Log in here.

+

${_("Activation Complete!")}

+

${_('Thanks for activating your account. Log in here.')}

- \ No newline at end of file + diff --git a/cms/templates/activation_invalid.html b/cms/templates/activation_invalid.html index c4eb16875b53..4d22c296c903 100644 --- a/cms/templates/activation_invalid.html +++ b/cms/templates/activation_invalid.html @@ -1,16 +1,14 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> <%block name="content">
-

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 bugs@mitx.mit.edu.

+

${_('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 bugs@mitx.mit.edu.')}

-

Or you can go back to the home page.

+

${_('Or you can go back to the home page.')}

- \ No newline at end of file + diff --git a/cms/templates/asset_index.html b/cms/templates/asset_index.html index bdad7b7b886c..6c92994a6f01 100644 --- a/cms/templates/asset_index.html +++ b/cms/templates/asset_index.html @@ -2,7 +2,7 @@ <%! from django.core.urlresolvers import reverse %> <%! from django.utils.translation import ugettext as _ %> <%block name="bodyclass">is-signedin course uploads -<%block name="title">Files & Uploads +<%block name="title">${_("Files & Uploads")} <%namespace name='static' file='static_content.html'/> @@ -48,7 +48,7 @@

Page Actions

diff --git a/cms/templates/base.html b/cms/templates/base.html index e58dcdfc60fa..7e99e1389f46 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -1,3 +1,4 @@ +## -*- coding: utf-8 -*- <%namespace name='static' file='static_content.html'/> @@ -16,7 +17,8 @@ - + + <%static:css group='base-style'/> @@ -35,7 +37,6 @@ ## javascript - diff --git a/cms/templates/checklists.html b/cms/templates/checklists.html index 6f78e952c0af..ad4f29aeb618 100644 --- a/cms/templates/checklists.html +++ b/cms/templates/checklists.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> <%! from django.core.urlresolvers import reverse %> <%block name="title">Course Checklists @@ -30,8 +31,8 @@

- Tools - > Course Checklists + ${_("Tools")} + > ${_("Course Checklists")}

@@ -40,18 +41,18 @@

-

Current Checklists

+

${_("Current Checklists")}

- \ No newline at end of file + diff --git a/cms/templates/edit-tabs.html b/cms/templates/edit-tabs.html index 7fa15100658f..08c71259c4e6 100644 --- a/cms/templates/edit-tabs.html +++ b/cms/templates/edit-tabs.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%! from django.utils.translation import ugettext as _ %> <%! from django.core.urlresolvers import reverse %> <%block name="title">Static Pages <%block name="bodyclass">is-signedin course pages static-pages @@ -19,15 +20,15 @@

- Content - > Static Pages + ${_("Content")} + > ${_("Static Pages")}

@@ -37,11 +38,11 @@

Page Actions

-

How Static Pages are Used in Your Course

+

${_("How Static Pages are Used in Your Course")}

- Preview of how Static Pages are used in your course -
These pages will be presented in your course's main navigation alongside Courseware, Course Info, Discussion, etc.
+ ${_('Preview of how Static Pages are used in your course')} +
${_("These pages will be presented in your course's main navigation alongside Courseware, Course Info, Discussion, etc.")}
- close modal + ${_("close modal")}
diff --git a/cms/templates/edit_subsection.html b/cms/templates/edit_subsection.html index fcda977324e3..d08f31bd7e5f 100644 --- a/cms/templates/edit_subsection.html +++ b/cms/templates/edit_subsection.html @@ -1,3 +1,4 @@ +<%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> <%! import logging @@ -5,7 +6,7 @@ %> <%! from django.core.urlresolvers import reverse %> -<%block name="title">CMS Subsection +<%block name="title">${_("CMS Subsection")} <%block name="bodyclass">is-signedin course subsection @@ -18,11 +19,11 @@
- +
- + ${units.enum_units(subsection, subsection_units=subsection_units)}
@@ -30,63 +31,61 @@