1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

i18n for buttons on user inject values

This commit is contained in:
Steve-Mcl 2021-05-20 22:53:10 +01:00
parent 9d7b8f1f2f
commit f570447000
2 changed files with 8 additions and 5 deletions

View File

@ -646,7 +646,6 @@
return !this.changed return !this.changed
}, },
onclick: function () { onclick: function () {
console.log("inject inject click")
var node = this; var node = this;
if (node.changed) { if (node.changed) {
return RED.notify(RED._("notification.warning", { message: RED._("notification.warnings.undeployedChanges") }), "warning"); return RED.notify(RED._("notification.warning", { message: RED._("notification.warnings.undeployedChanges") }), "warning");
@ -696,16 +695,15 @@
{ {
id: 'node-dialog-cancel', id: 'node-dialog-cancel',
class: 'primary', class: 'primary',
text: 'Close' || RED._('common.label.cancel'), text: node._('inject.userValueButtons.close'),
click: function () { click: function () {
RED.tray.close(); RED.tray.close();
} }
}, },
{ {
id: 'node-dialog-apply', id: 'node-dialog-apply',
text: 'Apply', //RED._('common.label.apply'), text: node._('inject.userValueButtons.apply'),
click: function () { click: function () {
debugger
delete node.payload; delete node.payload;
node.topic = ""; node.topic = "";
var items = $('#node-inject-custom-list').editableList('items'); var items = $('#node-inject-custom-list').editableList('items');
@ -745,7 +743,7 @@
}, },
{ {
id: 'node-dialog-ok', id: 'node-dialog-ok',
text: 'Inject', //RED._('inject.inject'), text: node._('inject.userValueButtons.inject'),
click: function () { click: function () {
var items = $('#node-inject-custom-list').editableList('items'); var items = $('#node-inject-custom-list').editableList('items');
var result = getProps(items); var result = getProps(items);

View File

@ -85,6 +85,11 @@
"failed": "inject failed, see log for details", "failed": "inject failed, see log for details",
"toolong": "Interval too large", "toolong": "Interval too large",
"invalid-expr": "Invalid JSONata expression: __error__" "invalid-expr": "Invalid JSONata expression: __error__"
},
"userValueButtons": {
"close": "Close",
"apply": "Apply",
"inject": "Inject"
} }
}, },
"catch": { "catch": {