From ff27882fe7ccfb4039dc9f6db75d43f98015e211 Mon Sep 17 00:00:00 2001 From: oliviermarquez Date: Wed, 21 Aug 2013 14:40:55 +0200 Subject: [PATCH 1/3] Update tabs.py fixes tab buttons of student's dahsboard for i18n --- cms/djangoapps/contentstore/views/tabs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cms/djangoapps/contentstore/views/tabs.py b/cms/djangoapps/contentstore/views/tabs.py index f38685edfcf2..b006aeca458d 100644 --- a/cms/djangoapps/contentstore/views/tabs.py +++ b/cms/djangoapps/contentstore/views/tabs.py @@ -30,11 +30,11 @@ def initialize_course_tabs(course): # This logic is repeated in xmodule/modulestore/tests/factories.py # so if you change anything here, you need to also change it there. - course.tabs = [{"type": "courseware"}, - {"type": "course_info", "name": "Course Info"}, - {"type": "discussion", "name": "Discussion"}, - {"type": "wiki", "name": "Wiki"}, - {"type": "progress", "name": "Progress"}] + course.tabs = [{"type": "courseware", "name": {_("Courseware")}}, + {"type": "course_info", "name": {_("Course Info")}}, + {"type": "discussion", "name": {_("Discussion")}}, + {"type": "wiki", "name": {_("Wiki")}}, + {"type": "progress", "name": {_("Progress"})}] modulestore('direct').update_metadata(course.location.url(), own_metadata(course)) From 8d5c9534ded37731d5c70aed7cf573eae994885d Mon Sep 17 00:00:00 2001 From: oliviermarquez Date: Wed, 21 Aug 2013 14:55:24 +0200 Subject: [PATCH 2/3] Update tabs.py --- cms/djangoapps/contentstore/views/tabs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/views/tabs.py b/cms/djangoapps/contentstore/views/tabs.py index b006aeca458d..7e393769539d 100644 --- a/cms/djangoapps/contentstore/views/tabs.py +++ b/cms/djangoapps/contentstore/views/tabs.py @@ -34,7 +34,7 @@ def initialize_course_tabs(course): {"type": "course_info", "name": {_("Course Info")}}, {"type": "discussion", "name": {_("Discussion")}}, {"type": "wiki", "name": {_("Wiki")}}, - {"type": "progress", "name": {_("Progress"})}] + {"type": "progress", "name": {_("Progress")}}] modulestore('direct').update_metadata(course.location.url(), own_metadata(course)) From 33b3838f3befffe49f1df93b6a9d623a4f5703ec Mon Sep 17 00:00:00 2001 From: oliviermarquez Date: Fri, 23 Aug 2013 08:05:19 +0200 Subject: [PATCH 3/3] Update tabs.py _{ } brackets removed for i18n (not needed as regular python file) --- cms/djangoapps/contentstore/views/tabs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cms/djangoapps/contentstore/views/tabs.py b/cms/djangoapps/contentstore/views/tabs.py index 7e393769539d..35676846892e 100644 --- a/cms/djangoapps/contentstore/views/tabs.py +++ b/cms/djangoapps/contentstore/views/tabs.py @@ -30,11 +30,11 @@ def initialize_course_tabs(course): # This logic is repeated in xmodule/modulestore/tests/factories.py # so if you change anything here, you need to also change it there. - course.tabs = [{"type": "courseware", "name": {_("Courseware")}}, - {"type": "course_info", "name": {_("Course Info")}}, - {"type": "discussion", "name": {_("Discussion")}}, - {"type": "wiki", "name": {_("Wiki")}}, - {"type": "progress", "name": {_("Progress")}}] + course.tabs = [{"type": "courseware", "name": _("Courseware")}, + {"type": "course_info", "name": _("Course Info")}, + {"type": "discussion", "name": _("Discussion")}, + {"type": "wiki", "name": _("Wiki")}, + {"type": "progress", "name": _("Progress")}] modulestore('direct').update_metadata(course.location.url(), own_metadata(course))