From 9cb906cb51db0f9e8ed34cde96fb7d5ba5a82901 Mon Sep 17 00:00:00 2001 From: Andy Armstrong Date: Wed, 25 Oct 2017 08:52:44 -0400 Subject: [PATCH] Fix i18n for the page title in course tabs --- lms/templates/courseware/static_tab.html | 4 +++- lms/templates/courseware/tab-view-v2.html | 6 ++++-- lms/templates/courseware/tab-view.html | 11 ++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lms/templates/courseware/static_tab.html b/lms/templates/courseware/static_tab.html index 3b529aba66..1057516cd7 100644 --- a/lms/templates/courseware/static_tab.html +++ b/lms/templates/courseware/static_tab.html @@ -1,7 +1,9 @@ ## mako <%page expression_filter="h"/> + <%! +from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML %> @@ -20,7 +22,7 @@ ${HTML(fragment.head_html())} ${HTML(fragment.foot_html())} -<%block name="pagetitle">${tab['name']} | ${course.display_number_with_default} +<%block name="pagetitle">${_(tab['name'])} | ${course.display_number_with_default} <%include file="/courseware/course_navigation.html" args="active_page=active_page" /> diff --git a/lms/templates/courseware/tab-view-v2.html b/lms/templates/courseware/tab-view-v2.html index cbef28204f..2f12b0a165 100644 --- a/lms/templates/courseware/tab-view-v2.html +++ b/lms/templates/courseware/tab-view-v2.html @@ -1,9 +1,11 @@ ## mako +<%page expression_filter="h"/> + <%! main_css = "style-main-v2" %> -<%page expression_filter="h"/> <%! +from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML %> @@ -14,7 +16,7 @@ from openedx.core.djangolib.markup import HTML <%def name="online_help_token()"><% return "${tab['online_help_token']}" %> -<%block name="pagetitle">${tab['name']} | ${course.display_number_with_default} +<%block name="pagetitle">${_(tab['name'])} | ${course.display_number_with_default} <%include file="/courseware/course_navigation.html" args="active_page=active_page" /> diff --git a/lms/templates/courseware/tab-view.html b/lms/templates/courseware/tab-view.html index 65bf854daf..727e7b8b37 100644 --- a/lms/templates/courseware/tab-view.html +++ b/lms/templates/courseware/tab-view.html @@ -5,6 +5,11 @@ ## Override the default styles_version to use Bootstrap <%! main_css = "css/bootstrap/lms-main.css" %> +<%! +from django.utils.translation import ugettext as _ +from openedx.core.djangolib.markup import HTML +%> + <%inherit file="/main.html" /> <%namespace name='static' file='/static_content.html'/> @@ -12,14 +17,10 @@ <%def name="online_help_token()"><% return "${tab['online_help_token']}" %> -<%block name="pagetitle">${tab['name']} | ${course.display_number_with_default} +<%block name="pagetitle">${_(tab['name'])} | ${course.display_number_with_default} <%include file="/courseware/course_navigation.html" args="active_page=active_page" /> -<%! -from openedx.core.djangolib.markup import HTML -%> - <%block name="head_extra"> ${HTML(fragment.head_html())}