mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #2361 from kazuhitoyokoi/master-fixtypedInput
Support i18n for typedInput in join and switch nodes
This commit is contained in:
commit
2a2541df59
@ -15,6 +15,17 @@
|
|||||||
"next": "Next",
|
"next": "Next",
|
||||||
"clone": "Clone project",
|
"clone": "Clone project",
|
||||||
"cont": "Continue"
|
"cont": "Continue"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"string": "string",
|
||||||
|
"number": "number",
|
||||||
|
"boolean": "boolean",
|
||||||
|
"array": "array",
|
||||||
|
"buffer": "buffer",
|
||||||
|
"object": "object",
|
||||||
|
"jsonString": "JSON string",
|
||||||
|
"undefined": "undefined",
|
||||||
|
"null": "null"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"workspace": {
|
"workspace": {
|
||||||
|
@ -15,6 +15,17 @@
|
|||||||
"next": "進む",
|
"next": "進む",
|
||||||
"clone": "プロジェクトをクローン",
|
"clone": "プロジェクトをクローン",
|
||||||
"cont": "続ける"
|
"cont": "続ける"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"string": "文字列",
|
||||||
|
"number": "数値",
|
||||||
|
"boolean": "真偽値",
|
||||||
|
"array": "配列",
|
||||||
|
"buffer": "バッファ",
|
||||||
|
"object": "オブジェクト",
|
||||||
|
"jsonString": "JSON文字列",
|
||||||
|
"undefined": "undefined",
|
||||||
|
"null": "null"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"workspace": {
|
"workspace": {
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
var node = this;
|
var node = this;
|
||||||
var previousValueType = {value:"prev",label:this._("inject.previous"),hasValue:false};
|
var previousValueType = {value:"prev",label:this._("switch.previous"),hasValue:false};
|
||||||
|
|
||||||
$("#node-input-property").typedInput({default:this.propertyType||'msg',types:['msg','flow','global','jsonata','env']});
|
$("#node-input-property").typedInput({default:this.propertyType||'msg',types:['msg','flow','global','jsonata','env']});
|
||||||
var outputCount = $("#node-input-outputs").val("{}");
|
var outputCount = $("#node-input-outputs").val("{}");
|
||||||
@ -237,15 +237,15 @@
|
|||||||
|
|
||||||
function createTypeValueField(){
|
function createTypeValueField(){
|
||||||
return $('<input/>',{class:"node-input-rule-type-value",type:"text",style:"margin-left: 5px;"}).appendTo(row).typedInput({default:'string',types:[
|
return $('<input/>',{class:"node-input-rule-type-value",type:"text",style:"margin-left: 5px;"}).appendTo(row).typedInput({default:'string',types:[
|
||||||
{value:"string",label:"string",hasValue:false},
|
{value:"string",label:RED._("common.type.string"),hasValue:false,icon:"red/images/typedInput/az.png"},
|
||||||
{value:"number",label:"number",hasValue:false},
|
{value:"number",label:RED._("common.type.number"),hasValue:false,icon:"red/images/typedInput/09.png"},
|
||||||
{value:"boolean",label:"boolean",hasValue:false},
|
{value:"boolean",label:RED._("common.type.boolean"),hasValue:false,icon:"red/images/typedInput/bool.png"},
|
||||||
{value:"array",label:"array",hasValue:false},
|
{value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.png"},
|
||||||
{value:"buffer",label:"buffer",hasValue:false},
|
{value:"buffer",label:RED._("common.type.buffer"),hasValue:false,icon:"red/images/typedInput/bin.png"},
|
||||||
{value:"object",label:"object",hasValue:false},
|
{value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.png"},
|
||||||
{value:"json",label:"JSON string",hasValue:false},
|
{value:"json",label:RED._("common.type.jsonString"),hasValue:false,icon:"red/images/typedInput/json.png"},
|
||||||
{value:"undefined",label:"undefined",hasValue:false},
|
{value:"undefined",label:RED._("common.type.undefined"),hasValue:false},
|
||||||
{value:"null",label:"null",hasValue:false}
|
{value:"null",label:RED._("common.type.null"),hasValue:false}
|
||||||
]});
|
]});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +285,11 @@
|
|||||||
$("#node-input-property").typedInput('types',['msg']);
|
$("#node-input-property").typedInput('types',['msg']);
|
||||||
$("#node-input-joiner").typedInput("show");
|
$("#node-input-joiner").typedInput("show");
|
||||||
} else {
|
} else {
|
||||||
$("#node-input-property").typedInput('types',['msg', {value:"full",label:"complete message",hasValue:false}]);
|
$("#node-input-property").typedInput('types', ['msg', {
|
||||||
|
value: "full",
|
||||||
|
label: RED._("node-red:join.completeMessage"),
|
||||||
|
hasValue: false
|
||||||
|
}]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -297,7 +301,11 @@
|
|||||||
|
|
||||||
$("#node-input-property").typedInput({
|
$("#node-input-property").typedInput({
|
||||||
typeField: $("#node-input-propertyType"),
|
typeField: $("#node-input-propertyType"),
|
||||||
types:['msg', {value:"full", label:"complete message", hasValue:false}]
|
types: ['msg', {
|
||||||
|
value: "full",
|
||||||
|
label: RED._("node-red:join.completeMessage"),
|
||||||
|
hasValue: false
|
||||||
|
}]
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#node-input-key").typedInput({
|
$("#node-input-key").typedInput({
|
||||||
|
@ -606,6 +606,7 @@
|
|||||||
"rule": "rule",
|
"rule": "rule",
|
||||||
"repair": "recreate message sequences"
|
"repair": "recreate message sequences"
|
||||||
},
|
},
|
||||||
|
"previous": "previous value",
|
||||||
"and": "and",
|
"and": "and",
|
||||||
"checkall": "checking all rules",
|
"checkall": "checking all rules",
|
||||||
"stopfirst": "stopping after first match",
|
"stopfirst": "stopping after first match",
|
||||||
@ -858,6 +859,7 @@
|
|||||||
"custom": "manual"
|
"custom": "manual"
|
||||||
},
|
},
|
||||||
"combine": "Combine each",
|
"combine": "Combine each",
|
||||||
|
"completeMessage": "complete message",
|
||||||
"create": "to create",
|
"create": "to create",
|
||||||
"type": {
|
"type": {
|
||||||
"string": "a String",
|
"string": "a String",
|
||||||
|
@ -604,6 +604,7 @@
|
|||||||
"rule": "条件",
|
"rule": "条件",
|
||||||
"repair": "メッセージ列の補正"
|
"repair": "メッセージ列の補正"
|
||||||
},
|
},
|
||||||
|
"previous": "前回の値",
|
||||||
"and": "~",
|
"and": "~",
|
||||||
"checkall": "全ての条件を適用",
|
"checkall": "全ての条件を適用",
|
||||||
"stopfirst": "最初に合致した条件で終了",
|
"stopfirst": "最初に合致した条件で終了",
|
||||||
@ -856,6 +857,7 @@
|
|||||||
"custom": "手動"
|
"custom": "手動"
|
||||||
},
|
},
|
||||||
"combine": "結合",
|
"combine": "結合",
|
||||||
|
"completeMessage": "メッセージ全体",
|
||||||
"create": "出力",
|
"create": "出力",
|
||||||
"type": {
|
"type": {
|
||||||
"string": "文字列",
|
"string": "文字列",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user