@edx/unit-translation-selector-plugin
v0.1.1
Published
Translation selector plugin for unit title in frontend-app-learning
Downloads
203
Keywords
Readme
UnitTranslationSelectorPlugin
Translation selector plugin for unit title in frontend-app-learning
Hosted project
frontend-app-learning::env.config.jsx
import {
PLUGIN_OPERATIONS,
DIRECT_PLUGIN,
} from "@openedx/frontend-plugin-framework";
import Plugin from "@edx/unit-translation-selector-plugin";
// Load environment variables from .env file
const config = {
...process.env,
// this is necessary for feedback widget to
AI_TRANSLATIONS_URL: "http://localhost:18760",
pluginSlots: {
unit_title_slot: {
plugins: [
{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: "unit_title_widget",
type: DIRECT_PLUGIN,
priority: 1,
RenderWidget: Plugin,
},
},
],
},
sequence_container_slot: {
plugins: [
{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: "sequence_container_widget",
type: DIRECT_PLUGIN,
priority: 1,
// this is necessary for feedback widget to show up.
RenderWidget: () => (
<div id="whole-course-translation-feedback-widget" />
),
},
},
],
},
},
};
export default config;
frontend-app-learning::module.config.js
module.exports = {
localModules: [
{
moduleName: "@edx/unit-translation-selector-plugin",
dir: "../src/frontend-plugins/packages/unit-translation-selector-plugin",
},
],
};