diff --git a/conf/locale/babel.cfg b/conf/locale/babel.cfg index 5b8333cf1e..6631586ad4 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 58f8da0513..3a0b04adbb 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/course_wiki/tests/tests.py b/lms/djangoapps/course_wiki/tests/tests.py index 663d6b53b2..6bbd8011d6 100644 --- a/lms/djangoapps/course_wiki/tests/tests.py +++ b/lms/djangoapps/course_wiki/tests/tests.py @@ -90,8 +90,8 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase): """ Ensure that the response has the course navigator. """ - self.assertTrue("course info" in resp.content.lower()) - self.assertTrue("courseware" in resp.content.lower()) + self.assertContains(resp, "Course Info") + self.assertContains(resp, "courseware") def test_course_navigator(self): """" diff --git a/lms/djangoapps/courseware/tests/tests.py b/lms/djangoapps/courseware/tests/tests.py index fbe2c05ada..cd245d2610 100644 --- a/lms/djangoapps/courseware/tests/tests.py +++ b/lms/djangoapps/courseware/tests/tests.py @@ -120,9 +120,8 @@ class PageLoaderTestCase(LoginEnrollmentTestCase): self.assertEqual(response.redirect_chain[0][1], 302) if check_content: - unavailable_msg = "this module is temporarily unavailable" - self.assertEqual(response.content.find(unavailable_msg), -1) - self.assertFalse(isinstance(descriptor, ErrorDescriptor)) + self.assertNotContains(response, "this module is temporarily unavailable") + self.assertNotIsInstance(descriptor, ErrorDescriptor) @override_settings(MODULESTORE=TEST_DATA_XML_MODULESTORE) diff --git a/lms/envs/common.py b/lms/envs/common.py index 95b2af422e..29e0de7d91 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -166,7 +166,7 @@ XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds ############################# SET PATH INFORMATION ############################# -PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /mitx/lms +PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/lms REPO_ROOT = PROJECT_ROOT.dirname() COMMON_ROOT = REPO_ROOT / "common" ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /mitx is in @@ -381,6 +381,8 @@ LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html USE_I18N = True USE_L10N = True +# Localization strings (e.g. django.po) are under this directory +LOCALE_PATHS = (REPO_ROOT + '/conf/locale',) # edx-platform/conf/locale/ # Messages MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' @@ -486,6 +488,9 @@ MIDDLEWARE_CLASSES = ( 'course_wiki.course_nav.Middleware', + # Detects user-requested locale from 'accept-language' header in http request + 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.transaction.TransactionMiddleware', # 'debug_toolbar.middleware.DebugToolbarMiddleware', diff --git a/lms/templates/admin_dashboard.html b/lms/templates/admin_dashboard.html index 6a903a3f94..b9676faa16 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

+

${_("edX-wide Summary")}

% for key in results["scalars"]: diff --git a/lms/templates/annotatable.html b/lms/templates/annotatable.html index f010305744..20a85d0ca2 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 5d8ef859aa..50f962d691 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 @@ % endfor
- - + +
diff --git a/lms/templates/combinedopenended/combined_open_ended_legend.html b/lms/templates/combinedopenended/combined_open_ended_legend.html index e3e2494670..d5d482e190 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 d13077737f..0369d6d9ff 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 24bf7a76fe..bac684b91c 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 909ef15838..d4e622d4bd 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 @@
- - + +
diff --git a/lms/templates/combinedopenended/openended/open_ended_error.html b/lms/templates/combinedopenended/openended/open_ended_error.html index 58a90f86ef..65b7381d60 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 da3f38b6a9..ee55120d51 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 144cd829d9..f1d6abb8fa 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 8c6eacba11..abdc25b77b 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 5347e23844..3cc73fc657 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 @@
- + diff --git a/lms/templates/contact.html b/lms/templates/contact.html index a8f5e6b732..ba6f8cc720 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,33 @@
-

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.

+

${_("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.

+

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

+

${_('If you have a general question about edX please email {email}. To see if your question has already been answered, visit our {faq_link_start}FAQ page{faq_link_end}. You can also join the discussion on our {fb_link_start}facebook page{fb_link_end}. Though we may not have a chance to respond to every email, we take all feedback into consideration.').format( + email='info@edx.org', + 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 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.

+

${_("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 {tech_email}. For technical questions, please make sure you are using a current version of Firefox or Chrome, and include browser and version in your e-mail, as well as screenshots or other pertinent details. If you find a bug or other issues, you can reach us at the following: {bug_email}.').format( + tech_email='technical@edx.org', + bug_email='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.

+

${_("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 or with questions about edX, please email {email}.'.format(email='university@edx.org')}

diff --git a/lms/templates/course.html b/lms/templates/course.html index e3dd9baf43..4b2133e1af 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 index 9e7c0a16f4..8e2268cad1 100644 --- a/lms/templates/course_filter.html +++ b/lms/templates/course_filter.html @@ -1,8 +1,10 @@ +<%! from django.utils.translation import ugettext as _ %> +
diff --git a/lms/templates/course_groups/cohort_management.html b/lms/templates/course_groups/cohort_management.html index 239863beeb..4c9ca9e5a2 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 d8bbc324de..7554557f81 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 5b9c6f7450..4761408232 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 15317de207..0f17af5fee 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 @@ -41,9 +42,9 @@ ).css("display", "block"); } }); - + %else: - + $('#class_enroll_form').on('ajax:complete', function(event, xhr) { if(xhr.status == 200) { location.href = "${reverse('dashboard')}"; @@ -51,21 +52,21 @@ location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll"; } else { $('#register_error').html( - (xhr.responseText ? xhr.responseText : 'An error occurred. Please try again later.') + (xhr.responseText ? xhr.responseText : ${_('An error occurred. Please try again later.')}) ).css("display", "block"); } }); %endif - - + + })(this) -<%block name="title">About ${course.number} +<%block name="title">${_("About {course_number}").format(course_number=course.number)}
@@ -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_number=course.number)} %if show_courseware_link: - View Courseware + ${_("View Courseware")} %endif %else: - Register for ${course.number} + ${_("Register for {course_number}").format(course_number=course.number)}
%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 @@
- +
- +
diff --git a/lms/templates/courseware/course_navigation.html b/lms/templates/courseware/course_navigation.html index 98329b9836..799b10b36b 100644 --- a/lms/templates/courseware/course_navigation.html +++ b/lms/templates/courseware/course_navigation.html @@ -12,6 +12,7 @@ def url_class(is_active): return "" %> <%! from courseware.tabs import get_course_tabs %> +<%! from django.utils.translation import ugettext as _ %>
diff --git a/lms/templates/courseware/courseware-error.html b/lms/templates/courseware/courseware-error.html index e289e1c99d..3c61afd5d9 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 +## "edX" should *not* be translated +<%block name="title">${_("Courseware")} - edX <%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}edX{span_end} servers').format(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 {email} to report any problems or downtime.").format(email='technical@edx.org')}

diff --git a/lms/templates/courseware/courseware.html b/lms/templates/courseware/courseware.html index e009e535e3..8d033434f0 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")}
%endfor @@ -196,7 +196,7 @@
-

Current Courses

+

${_("Current Courses")}

% if len(courses) > 0: @@ -211,11 +211,11 @@ % if course.id in show_courseware_links_for: - ${course.number} ${course.display_name_with_default} Cover Image + ${_( % else:
- ${course.number} ${course.display_name_with_default} Cover Image + ${_(
% endif @@ -223,11 +223,11 @@

% 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 +249,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 +306,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 +325,17 @@ % endif @@ -332,12 +345,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 +359,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 +387,7 @@
- - + + % for puzzle in completed: diff --git a/lms/templates/folditchallenge.html b/lms/templates/folditchallenge.html index 677bc286c8..36e8f0caee 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 daad0a2457..80772ed9f3 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 0f88b88f97..e4c0c02e33 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 %>
UserScore${_("User")}${_("Score")}
- + %for name, field in fields: %endfor
Module Fields
${_('Module Fields')}
${name}
${field | h}
- + %for name, field in lms_fields: %endfor
edX Fields
${_('edX Fields')}
${name}
${field | h}
- + %for name, field in xml_attributes.items(): %endfor @@ -80,14 +82,14 @@ category = ${category | h}
XML attributes
${_('XML attributes')}
${name}
${field | h}