adapt_framework icon indicating copy to clipboard operation
adapt_framework copied to clipboard

Grunt Translate task improvement

Open RobertPeek opened this issue 8 years ago • 5 comments
trafficstars

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.

RobertPeek avatar May 02 '17 13:05 RobertPeek

+1 This would be really useful.

dancgray avatar Jul 11 '17 09:07 dancgray

@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
  }
}

oliverfoster avatar Jan 23 '18 11:01 oliverfoster

@oliverfoster

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

RobertPeek avatar Jan 23 '18 11:01 RobertPeek

Ahh, as I feared. Thanks dude.

oliverfoster avatar Jan 23 '18 13:01 oliverfoster

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. https://github.com/adaptlearning/adapt_authoring/issues/1481

lc-thomasberger avatar Feb 23 '18 07:02 lc-thomasberger