-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds "Go to Superset" link to Instructor Dashboard plugin
Because the plugin's template is a mako template, also had to configure i18n_tools to extract translations from mako templates.
- Loading branch information
1 parent
c1c4e11
commit 4e40f21
Showing
8 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Extraction from Mako templates. | ||
# Mako files can appear in a number of different places. Some we want to | ||
# extract strings from, some we don't. | ||
# | ||
# Extract from these directory trees: | ||
# | ||
# templates/instructor_dashboard/ | ||
# | ||
[mako: templates/**/*.html] | ||
input_encoding = utf-8 |
Binary file not shown.
23 changes: 23 additions & 0 deletions
23
platform_plugin_aspects/conf/locale/en/LC_MESSAGES/mako.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Translations template for PROJECT. | ||
# Copyright (C) 2024 ORGANIZATION | ||
# This file is distributed under the same license as the PROJECT project. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PROJECT VERSION\n" | ||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | ||
"POT-Creation-Date: 2024-03-13 11:48+1030\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Babel 2.14.0\n" | ||
|
||
#: templates/instructor_dashboard/aspects.html:17 | ||
msgid "Go to Superset" | ||
msgstr "" | ||
|
Binary file not shown.
23 changes: 23 additions & 0 deletions
23
platform_plugin_aspects/conf/locale/eo/LC_MESSAGES/mako.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Translations template for PROJECT. | ||
# Copyright (C) 2024 ORGANIZATION | ||
# This file is distributed under the same license as the PROJECT project. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PROJECT VERSION\n" | ||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | ||
"POT-Creation-Date: 2024-03-13 11:48+1030\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||
"Language: eo\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
"Generated-By: Babel 2.14.0\n" | ||
|
||
#: templates/instructor_dashboard/aspects.html | ||
msgid "Go to Superset" | ||
msgstr "Gö tö Süpérsét Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт#" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 14 additions & 1 deletion
15
platform_plugin_aspects/templates/instructor_dashboard/aspects.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
## mako | ||
|
||
<%page args="section_data" expression_filter="h"/> | ||
<%! from openedx.core.djangolib.markup import HTML %> | ||
<%! | ||
from django.utils.translation import gettext as _ | ||
from openedx.core.djangolib.markup import HTML | ||
%> | ||
|
||
<%include file="/courseware/xqa_interface.html/"/> | ||
<% | ||
superset_url = section_data.get("superset_url") | ||
%> | ||
|
||
<section class="superset"> | ||
% if superset_url: | ||
<div class="superset-link"> | ||
<a href="${superset_url}">${_("Go to Superset")}</a> | ||
</div> | ||
% endif | ||
${HTML(section_data['fragment'].body_html())} | ||
</section> |