From a157580b228fbe7446a369b0089a8eb9ba6babce Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Thu, 8 Apr 2021 20:06:35 +0900 Subject: [PATCH 1/2] Add Japanese translations for Node-RED v1.3 --- .../@node-red/editor-client/locales/en-US/editor.json | 3 ++- .../@node-red/editor-client/locales/ja/editor.json | 3 ++- packages/node_modules/@node-red/editor-client/src/js/red.js | 2 +- .../node_modules/@node-red/nodes/core/function/10-function.js | 2 +- .../node_modules/@node-red/nodes/locales/en-US/messages.json | 1 + packages/node_modules/@node-red/nodes/locales/ja/messages.json | 1 + 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json index 45d04e233..466eda94d 100755 --- a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json @@ -44,7 +44,8 @@ "loadNodes": "Loading Nodes __count__", "loadFlows": "Loading Flows", "importFlows": "Adding Flows to workspace", - "importError": "

Error adding flows

__message__

" + "importError": "

Error adding flows

__message__

", + "loadingProject": "Loading project" }, "workspace": { "defaultName": "Flow __number__", diff --git a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json index dd3d8135c..6a7edb202 100644 --- a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json @@ -44,7 +44,8 @@ "loadNodes": "ノードを読み込み中 __count__", "loadFlows": "フローを読み込み中", "importFlows": "ワークスペースにフローを追加中", - "importError": "

フロー追加エラー

__message__

" + "importError": "

フロー追加エラー

__message__

", + "loadingProject": "プロジェクトを読み込み中" }, "workspace": { "defaultName": "フロー __number__", diff --git a/packages/node_modules/@node-red/editor-client/src/js/red.js b/packages/node_modules/@node-red/editor-client/src/js/red.js index 88c564afc..a9a1851ae 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/red.js +++ b/packages/node_modules/@node-red/editor-client/src/js/red.js @@ -281,7 +281,7 @@ var RED = (function() { return; } if (notificationId === "project-update") { - loader.start("Loading project",0) + loader.start(RED._("event.loadingProject"), 0); RED.nodes.clear(); RED.history.clear(); RED.view.redraw(true); diff --git a/packages/node_modules/@node-red/nodes/core/function/10-function.js b/packages/node_modules/@node-red/nodes/core/function/10-function.js index ee54cca50..1d51677ab 100644 --- a/packages/node_modules/@node-red/nodes/core/function/10-function.js +++ b/packages/node_modules/@node-red/nodes/core/function/10-function.js @@ -98,7 +98,7 @@ module.exports = function(RED) { node.libs = n.libs || []; if (RED.settings.functionExternalModules !== true && node.libs.length > 0) { - throw new Error("Function node not allowed to load external modules"); + throw new Error(RED._("function.error.externalModuleNotAllowed")); } var handleNodeDoneCall = true; diff --git a/packages/node_modules/@node-red/nodes/locales/en-US/messages.json b/packages/node_modules/@node-red/nodes/locales/en-US/messages.json index 2066c4a90..17b230c69 100755 --- a/packages/node_modules/@node-red/nodes/locales/en-US/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/en-US/messages.json @@ -225,6 +225,7 @@ "module": "module" }, "error": { + "externalModuleNotAllowed": "Function node not allowed to load external modules", "moduleNotAllowed": "Module __module__ not allowed", "moduleLoadError": "Failed to load module __module__: __error__", "moduleNameError": "Invalid module variable name: __name__", diff --git a/packages/node_modules/@node-red/nodes/locales/ja/messages.json b/packages/node_modules/@node-red/nodes/locales/ja/messages.json index c0ada3136..ef66f8445 100644 --- a/packages/node_modules/@node-red/nodes/locales/ja/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/ja/messages.json @@ -225,6 +225,7 @@ "module": "モジュール" }, "error": { + "externalModuleNotAllowed": "Functionのノードは、外部モジュールを読み込みできません", "moduleNotAllowed": "モジュール __module__ は利用できません", "moduleLoadError": "モジュール __module__ の読み込みに失敗しました: __error__", "moduleNameError": "モジュール変数名が不正です: __name__", From 9429ea7c641a8d7feb9c86783cda2064b9f2cd95 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Thu, 8 Apr 2021 20:32:01 +0900 Subject: [PATCH 2/2] Fix typo --- packages/node_modules/@node-red/nodes/locales/ja/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/nodes/locales/ja/messages.json b/packages/node_modules/@node-red/nodes/locales/ja/messages.json index ef66f8445..f8412efff 100644 --- a/packages/node_modules/@node-red/nodes/locales/ja/messages.json +++ b/packages/node_modules/@node-red/nodes/locales/ja/messages.json @@ -225,7 +225,7 @@ "module": "モジュール" }, "error": { - "externalModuleNotAllowed": "Functionのノードは、外部モジュールを読み込みできません", + "externalModuleNotAllowed": "Functionノードは、外部モジュールを読み込みできません", "moduleNotAllowed": "モジュール __module__ は利用できません", "moduleLoadError": "モジュール __module__ の読み込みに失敗しました: __error__", "moduleNameError": "モジュール変数名が不正です: __name__",