Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grunt Translate task improvement #1554

Open
RobertPeek opened this issue May 2, 2017 · 5 comments
Open

Grunt Translate task improvement #1554

RobertPeek opened this issue May 2, 2017 · 5 comments

Comments

@RobertPeek
Copy link

Would it be possible to add a check for the _'isEnabled' value on an element within the grunt translate task? At present all JSON is translated even when plugins are not enabled and if fields are pre-populated with text this can cause over translating of words.

I am of course referring to the exported files from the Authoring Tool as this exports all attributes on every element (article, Block, Component etc). When working in the Framework you can of course just remove the unnecessary JSON.

@dancgray
Copy link
Member

+1 This would be really useful.

@oliverfoster
Copy link
Member

oliverfoster commented Jan 23, 2018

@RobertPeek @dancgray
When you say

check for the '_isEnabled' value an element

By 'element' do you mean just the primary '_isEnabled' attribute on a component, block, article or contentObject content item?

{
  "_isEnabled": false
}

Or do you mean plugin specific '_isEnabled' values as well... such as:

{
  "_trickle": {
    "_isEnabled": false
  }
}

@RobertPeek
Copy link
Author

@oliverfoster

My thoughts were that "_isEnabled" should be checked within a plugin, like your example above with Trickle.

@oliverfoster
Copy link
Member

Ahh, as I feared. Thanks dude.

@lc-thomasberger
Copy link
Member

lc-thomasberger commented Feb 23, 2018

I really like the concept of checking for enabled plugins, but there is not really a bullet proof way to check that a plugin is actually enabled. Some developers, and most core plugins use _isEnabled but you can name and structure your json as you wish. Also, a plugin may be globally enabled in config.json or course.json and used in other elements.

I think we should give plugin-authors a way to communicate what setting will actually enable a plugin. This may default to _isEnabled.

This will also make things in the Authoringtool much easier. For instance we could show icons when a plugin is enabled in the page editor. adaptlearning/adapt_authoring#1481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants