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

Add i18n for json editor title when readonly

This commit is contained in:
Steve-Mcl 2022-04-27 12:52:41 +01:00
parent fcdf252f03
commit 3e16cc4912
3 changed files with 6 additions and 4 deletions

View File

@ -940,6 +940,8 @@
"format": "format JSON", "format": "format JSON",
"rawMode": "Edit JSON", "rawMode": "Edit JSON",
"uiMode": "Visual editor", "uiMode": "Visual editor",
"rawMode-readonly": "JSON",
"uiMode-readonly": "Visual",
"insertAbove": "Insert above", "insertAbove": "Insert above",
"insertBelow": "Insert below", "insertBelow": "Insert below",
"addItem": "Add item", "addItem": "Add item",

View File

@ -940,6 +940,8 @@
"format": "JSONフォーマット", "format": "JSONフォーマット",
"rawMode": "JSONを編集", "rawMode": "JSONを編集",
"uiMode": "ビジュアルエディタ", "uiMode": "ビジュアルエディタ",
"rawMode-readonly": "JSON",
"uiMode-readonly": "ビジュアル",
"insertAbove": "上に挿入", "insertAbove": "上に挿入",
"insertBelow": "下に挿入", "insertBelow": "下に挿入",
"addItem": "要素を追加", "addItem": "要素を追加",

View File

@ -618,17 +618,15 @@
tabs.addTab({ tabs.addTab({
id: 'json-raw', id: 'json-raw',
label: options.readOnly ? "JSON" : RED._('jsonEditor.rawMode'), label: options.readOnly ? RED._('jsonEditor.rawMode-readonly') : RED._('jsonEditor.rawMode'),
content: $("#red-ui-editor-type-json-tab-raw") content: $("#red-ui-editor-type-json-tab-raw")
}); });
tabs.addTab({ tabs.addTab({
id: 'json-ui', id: 'json-ui',
label: options.readOnly ? "Visual" : RED._('jsonEditor.uiMode'), label: options.readOnly ? RED._('jsonEditor.uiMode-readonly') : RED._('jsonEditor.uiMode'),
content: $("#red-ui-editor-type-json-tab-ui") content: $("#red-ui-editor-type-json-tab-ui")
}); });
finishedBuild = true; finishedBuild = true;
}, },
close: function() { close: function() {
if (options.onclose) { if (options.onclose) {