From 0fec9c7c5562e75b4796d9d984f98c041dacccdb Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 26 Apr 2022 16:24:13 +0100 Subject: [PATCH] Apply i18n messages to diagnostics dialog --- .../@node-red/editor-client/src/js/ui/diagnostics.js | 6 +++--- .../@node-red/editor-client/src/js/ui/editors/json.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/diagnostics.js b/packages/node_modules/@node-red/editor-client/src/js/ui/diagnostics.js index 89bd093c4..a6cf16a96 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/diagnostics.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/diagnostics.js @@ -27,14 +27,14 @@ RED.diagnostics = (function () { readOnly: true, jsonButtons: [ { - text: 'Copy', + text: RED._('clipboard.export.copy'), icon: 'fa fa-copy', click: function () { - RED.clipboard.copyText(json, $(this), "Copied to clipboard") + RED.clipboard.copyText(json, $(this), RED._('clipboard.copyMessageValue')) } }, { - text: 'Download', + text: RED._('clipboard.download'), icon: 'fa fa-download', click: function () { var element = document.createElement('a'); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/json.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/json.js index 7687abee5..a2738f5eb 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/json.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/json.js @@ -515,7 +515,7 @@ .on("click", function (evt) { evt.preventDefault(); if (button.click !== undefined) { - button.click(evt); + button.click.call(element, evt); } }); if (button.id) { element.attr("id", button.id); }