From a5fd04a95d9d76be38bb1d9ad881f7d779410241 Mon Sep 17 00:00:00 2001 From: Felipe Montoya Date: Thu, 12 Sep 2013 13:43:15 -0500 Subject: [PATCH 1/8] i18n: submit buttons at dashboard --- lms/templates/dashboard.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index c76363bd59..7e6bc4a025 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -368,7 +368,7 @@
- +
@@ -393,7 +393,7 @@
- +
From c6f4c8b2b882ea41465f06f60870426ac334f376 Mon Sep 17 00:00:00 2001 From: Felipe Montoya Date: Thu, 12 Sep 2013 15:54:38 -0500 Subject: [PATCH 2/8] i18n: staff/student toggle link --- lms/templates/courseware/course_navigation.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/templates/courseware/course_navigation.html b/lms/templates/courseware/course_navigation.html index 799b10b36b..303a12f142 100644 --- a/lms/templates/courseware/course_navigation.html +++ b/lms/templates/courseware/course_navigation.html @@ -47,9 +47,9 @@ masq = (function(){ var el = $('#staffstatus'); var setstat = function(status){ if (status=='student'){ - el.html('Student view'); + el.html('${_("Student view")}'); }else{ - el.html('Staff view'); + el.html('${_("Staff view")}'); } } setstat('${masquerade}'); From 45a1e551f9a7aaa51fa80c203d5bbc3424cb013d Mon Sep 17 00:00:00 2001 From: Felipe Montoya Date: Thu, 12 Sep 2013 15:55:32 -0500 Subject: [PATCH 3/8] i18n: problem submit buttons. --- common/lib/xmodule/xmodule/capa_module.py | 3 ++- .../xmodule/xmodule/js/fixtures/problem_content.html | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 8de38022b7..88b911a745 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -21,6 +21,7 @@ from xmodule.exceptions import NotFoundError, ProcessingError from xblock.fields import Scope, String, Boolean, Dict, Integer, Float from .fields import Timedelta, Date from django.utils.timezone import UTC +from django.utils.translation import ugettext as _ log = logging.getLogger("mitx.courseware") @@ -348,7 +349,7 @@ class CapaModule(CapaFields, XModule): else: final_check = False - return "Final Check" if final_check else "Check" + return _("Final Check") if final_check else _("Check") def should_show_check_button(self): """ diff --git a/common/lib/xmodule/xmodule/js/fixtures/problem_content.html b/common/lib/xmodule/xmodule/js/fixtures/problem_content.html index 5ccce952e7..7c17cede61 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/problem_content.html +++ b/common/lib/xmodule/xmodule/js/fixtures/problem_content.html @@ -4,7 +4,7 @@
-

Problem Content

+

${_("Problem Content")}

@@ -13,11 +13,11 @@ - - - - - Explanation + + + + + ${_("Explanation")}
From 5f78645437413805260cbd3864a0f747e08379c4 Mon Sep 17 00:00:00 2001 From: Felipe Montoya Date: Thu, 12 Sep 2013 17:01:13 -0500 Subject: [PATCH 4/8] i18n: Strings for new instructor dashboard --- .../instructor/instructor_dashboard_2/course_info.html | 2 +- .../instructor_dashboard_2/instructor_dashboard_2.html | 2 +- .../instructor/instructor_dashboard_2/student_admin.html | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lms/templates/instructor/instructor_dashboard_2/course_info.html b/lms/templates/instructor/instructor_dashboard_2/course_info.html index d2651d689f..9b4114d95c 100644 --- a/lms/templates/instructor/instructor_dashboard_2/course_info.html +++ b/lms/templates/instructor/instructor_dashboard_2/course_info.html @@ -1,7 +1,7 @@ <%! from django.utils.translation import ugettext as _ %> <%page args="section_data"/> -

Course Information

+

${_("Course Information")}

${_("Course Name")}: diff --git a/lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html b/lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html index d3fc66d5c6..aeb8608543 100644 --- a/lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html +++ b/lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html @@ -29,7 +29,7 @@
- +
##

Instructor Dashboard

diff --git a/lms/templates/instructor/instructor_dashboard_2/student_admin.html b/lms/templates/instructor/instructor_dashboard_2/student_admin.html index 2ccef2164c..6b6da617f6 100644 --- a/lms/templates/instructor/instructor_dashboard_2/student_admin.html +++ b/lms/templates/instructor/instructor_dashboard_2/student_admin.html @@ -19,7 +19,7 @@ ## ## -

Specify a particular problem in the course here by its url:

+

${_('Specify a particular problem in the course here by its url:')}

${_('You may use just the "urlname" if a problem, or "modulename/urlname" if not. (For example, if the location is {location1}, then just provide the {urlname1}. If the location is {location2}, then provide {urlname2}.)').format( @@ -32,7 +32,7 @@ %if section_data['access']['instructor']: -

You may also delete the entire state of a student for the specified module:

+

${_('You may also delete the entire state of a student for the specified module:')}

%endif @@ -54,7 +54,7 @@ %if settings.MITX_FEATURES.get('ENABLE_INSTRUCTOR_BACKGROUND_TASKS') and section_data['access']['instructor']:
-

Course-specific grade adjustment

+

${_('Course-specific grade adjustment')}

From 893d22515d0cfbe6baa21768ae94f553956aa433 Mon Sep 17 00:00:00 2001 From: Felipe Montoya Date: Thu, 19 Sep 2013 10:47:13 -0500 Subject: [PATCH 5/8] Something for the user dashboard --- lms/djangoapps/instructor/views/legacy.py | 4 ++-- lms/templates/dashboard.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/instructor/views/legacy.py b/lms/djangoapps/instructor/views/legacy.py index 9e77f55a29..019c350cbf 100644 --- a/lms/djangoapps/instructor/views/legacy.py +++ b/lms/djangoapps/instructor/views/legacy.py @@ -56,7 +56,7 @@ import track.views from mitxmako.shortcuts import render_to_string from xblock.field_data import DictFieldData from xblock.fields import ScopeIds - +from django.utils.translation import ugettext as _u from bulk_email.models import CourseEmail from html_to_text import html_to_text @@ -108,7 +108,7 @@ def instructor_dashboard(request, course_id): # assemble some course statistics for output to instructor def get_course_stats_table(): datatable = {'header': ['Statistic', 'Value'], - 'title': 'Course Statistics At A Glance', + 'title': _u('Course Statistics At A Glance'), } data = [['# Enrolled', CourseEnrollment.objects.filter(course_id=course_id, is_active=1).count()]] data += [['Date', timezone.now().isoformat()]] diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index 7e6bc4a025..ed857272f8 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -368,7 +368,7 @@

- +
@@ -393,7 +393,7 @@
- +
From 92d1f232ed5bce0962c32bcefa6ba1d0d74eeedb Mon Sep 17 00:00:00 2001 From: Felipe Montoya Date: Thu, 19 Sep 2013 12:33:58 -0500 Subject: [PATCH 6/8] Adding to the problem template --- common/lib/xmodule/xmodule/js/fixtures/problem_content.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/fixtures/problem_content.html b/common/lib/xmodule/xmodule/js/fixtures/problem_content.html index 7c17cede61..2ca5d8d23f 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/problem_content.html +++ b/common/lib/xmodule/xmodule/js/fixtures/problem_content.html @@ -1,4 +1,4 @@ -

Problem Header

+

${_("Problem Header")}

@@ -15,7 +15,7 @@ - + ${_("Explanation")}
From 3c88fabd1be18180c25947a6e5f6c0b15535b08b Mon Sep 17 00:00:00 2001 From: Felipe Montoya Date: Thu, 19 Sep 2013 12:34:11 -0500 Subject: [PATCH 7/8] Adding myself to authors --- AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 20719b5af7..b58c1853c8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -87,4 +87,4 @@ Miles Steele Kevin Luo Akshay Jagadeesh Marko Seric - +Felipe Montoya From 0c44ec1996a058df39d3ee0eea4d7af8e92b717a Mon Sep 17 00:00:00 2001 From: Felipe Montoya Date: Thu, 19 Sep 2013 13:54:35 -0500 Subject: [PATCH 8/8] String extraction at input value attributes is done with single quotes --- lms/templates/dashboard.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index ed857272f8..b7ecfcc711 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -368,7 +368,7 @@
- +
@@ -393,7 +393,7 @@
- +