From 2249b9449cee3e654de5cd32ff898b37426bee21 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 3 May 2017 17:17:36 +0100 Subject: [PATCH] NLS Expression/JSON editor and fix their height calculation --- editor/js/ui/editor.js | 4 ++-- editor/sass/editor.scss | 3 ++- nodes/core/logic/15-change.html | 7 ++++--- red/api/locales/en-US/editor.json | 6 +++++- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/editor/js/ui/editor.js b/editor/js/ui/editor.js index b27f31f40..d742ab80f 100644 --- a/editor/js/ui/editor.js +++ b/editor/js/ui/editor.js @@ -493,9 +493,9 @@ RED.editor = (function() { var node = editStack[i]; var label = node.type; if (node.type === '_expression') { - label = "Expression editor"; // TODO: nls + label = RED._("expressionEditor.title"); } else if (node.type === '_json') { - label = "JSON editor"; // TODO: nls + label = RED._("jsonEditor.title"); } else if (node.type === 'subflow') { label = RED._("subflow.editSubflow",{name:node.name}) } else if (node.type.indexOf("subflow:")===0) { diff --git a/editor/sass/editor.scss b/editor/sass/editor.scss index 01ca54bca..837f355de 100644 --- a/editor/sass/editor.scss +++ b/editor/sass/editor.scss @@ -47,6 +47,7 @@ } .editor-tray-body { position: relative; + box-sizing: border-box; form { margin: 20px; } @@ -153,7 +154,7 @@ .dialog-form,#dialog-form, #dialog-config-form { - height: 100%; + height: calc(100% - 20px); } .input-error { diff --git a/nodes/core/logic/15-change.html b/nodes/core/logic/15-change.html index 1fedfde80..ac11d0d07 100644 --- a/nodes/core/logic/15-change.html +++ b/nodes/core/logic/15-change.html @@ -32,9 +32,10 @@
move or rename a property.

Details

-

The "expression" option uses the JSONata - query and expression language. You can paste your data into this site it - to experiment and then use the expression back here.

+

The "expression" type uses the JSONata + query and expression language. A tool is available to test expressions against + real data here. +