Merge pull request #3602 from node-red-hitachi/i18n-switch-rule-selector

I18n switch rule selector
This commit is contained in:
Stephen McLaughlin 2022-05-08 14:28:36 +01:00 committed by GitHub
commit 9ed96de237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 18 deletions

View File

@ -248,13 +248,13 @@
var row3 = $('<div/>',{style:"display: flex; padding-top: 5px; align-items: center"}).appendTo(inputRows); var row3 = $('<div/>',{style:"display: flex; padding-top: 5px; align-items: center"}).appendTo(inputRows);
var selectField = $('<select/>',{style:"width:120px; text-align: center;"}).appendTo(row); var selectField = $('<select/>',{style:"width:120px; text-align: center;"}).appendTo(row);
var group0 = $('<optgroup/>', { label: "value rules" }).appendTo(selectField); var group0 = $('<optgroup/>', { label: RED._("node-red:switch.label.value-rules") }).appendTo(selectField);
for (var d in operators) { for (var d in operators) {
if(operators[d].kind === 'V') { if(operators[d].kind === 'V') {
group0.append($("<option></option>").val(operators[d].v).text(/^switch/.test(operators[d].t)?node._(operators[d].t):operators[d].t)); group0.append($("<option></option>").val(operators[d].v).text(/^switch/.test(operators[d].t)?node._(operators[d].t):operators[d].t));
} }
} }
var group1 = $('<optgroup/>', { label: "sequence rules" }).appendTo(selectField); var group1 = $('<optgroup/>', { label: RED._("node-red:switch.label.sequence-rules") }).appendTo(selectField);
for (var d in operators) { for (var d in operators) {
if(operators[d].kind === 'S') { if(operators[d].kind === 'S') {
group1.append($("<option></option>").val(operators[d].v).text(/^switch/.test(operators[d].t)?node._(operators[d].t):operators[d].t)); group1.append($("<option></option>").val(operators[d].v).text(/^switch/.test(operators[d].t)?node._(operators[d].t):operators[d].t));

View File

@ -729,7 +729,9 @@
"label": { "label": {
"property": "Property", "property": "Property",
"rule": "rule", "rule": "rule",
"repair": "recreate message sequences" "repair": "recreate message sequences",
"value-rules": "value rules",
"sequence-rules": "sequence rules"
}, },
"previous": "previous value", "previous": "previous value",
"and": "and", "and": "and",

View File

@ -727,7 +727,9 @@
"label": { "label": {
"property": "プロパティ", "property": "プロパティ",
"rule": "条件", "rule": "条件",
"repair": "メッセージ列の補正" "repair": "メッセージ列の補正",
"value-rules": "値ルール",
"sequence-rules": "列ルール"
}, },
"previous": "前回の値", "previous": "前回の値",
"and": "", "and": "",
@ -735,22 +737,22 @@
"stopfirst": "最初に合致した条件で終了", "stopfirst": "最初に合致した条件で終了",
"ignorecase": "大文字、小文字を区別しない", "ignorecase": "大文字、小文字を区別しない",
"rules": { "rules": {
"btwn": "is between", "btwn": "範囲内である",
"cont": "contains", "cont": "要素に含む",
"regex": "matches regex", "regex": "正規表現にマッチ",
"true": "is true", "true": "trueである",
"false": "is false", "false": "falseである",
"null": "is null", "null": "nullである",
"nnull": "is not null", "nnull": "nullでない",
"istype": "is of type", "istype": "指定型である",
"empty": "is empty", "empty": "空である",
"nempty": "is not empty", "nempty": "空でない",
"head": "head", "head": "先頭要素である",
"tail": "tail", "tail": "末尾要素である",
"index": "index between", "index": "指定添字範囲要素である",
"exp": "JSONata式", "exp": "JSONata式",
"else": "その他", "else": "その他",
"hask": "has key" "hask": "キーを含む"
}, },
"errors": { "errors": {
"invalid-expr": "不正な表現: __error__", "invalid-expr": "不正な表現: __error__",