mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Some more node i18n tidy up
This commit is contained in:
parent
cb1d18c7c8
commit
203bc41b06
@ -88,12 +88,12 @@ module.exports = function(RED) {
|
|||||||
node.child.on('close', function (code) {
|
node.child.on('close', function (code) {
|
||||||
node.child = null;
|
node.child = null;
|
||||||
node.running = false;
|
node.running = false;
|
||||||
if (RED.settings.verbose) { node.log(RED._("rpi-gpio.errors.closed")); }
|
if (RED.settings.verbose) { node.log(RED._("rpi-gpio.status.closed")); }
|
||||||
if (node.done) {
|
if (node.done) {
|
||||||
node.status({fill:"grey",shape:"ring",text:RED._("common.status.closed")});
|
node.status({fill:"grey",shape:"ring",text:RED._("rpi-gpio.status.closed")});
|
||||||
node.done();
|
node.done();
|
||||||
}
|
}
|
||||||
else { node.status({fill:"red",shape:"ring",text:RED._("common.status.stopped")}); }
|
else { node.status({fill:"red",shape:"ring",text:RED._("rpi-gpio.status.stopped")}); }
|
||||||
});
|
});
|
||||||
|
|
||||||
node.child.on('error', function (err) {
|
node.child.on('error', function (err) {
|
||||||
@ -108,7 +108,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
node.on("close", function(done) {
|
node.on("close", function(done) {
|
||||||
node.status({fill:"grey",shape:"ring",text:RED._("common.status.close")});
|
node.status({fill:"grey",shape:"ring",text:RED._("rpi-gpio.status.closed")});
|
||||||
delete pinsInUse[node.pin];
|
delete pinsInUse[node.pin];
|
||||||
if (node.child != null) {
|
if (node.child != null) {
|
||||||
node.done = done;
|
node.done = done;
|
||||||
@ -151,7 +151,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
node.error(RED._("rpi-gpio.errors.pythoncommandnotfound"),msg);
|
node.error(RED._("rpi-gpio.errors.pythoncommandnotfound"),msg);
|
||||||
node.status({fill:"red",shape:"ring",text:RED._("common.status.not-running")});
|
node.status({fill:"red",shape:"ring",text:RED._("rpi-gpio.status.not-running")});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { node.warn(RED._("rpi-gpio.errors.invalidinput")+": "+out); }
|
else { node.warn(RED._("rpi-gpio.errors.invalidinput")+": "+out); }
|
||||||
@ -179,12 +179,12 @@ module.exports = function(RED) {
|
|||||||
node.child.on('close', function (code) {
|
node.child.on('close', function (code) {
|
||||||
node.child = null;
|
node.child = null;
|
||||||
node.running = false;
|
node.running = false;
|
||||||
if (RED.settings.verbose) { node.log(RED._("rpi-gpio.errors.closed")); }
|
if (RED.settings.verbose) { node.log(RED._("rpi-gpio.status.closed")); }
|
||||||
if (node.done) {
|
if (node.done) {
|
||||||
node.status({fill:"grey",shape:"ring",text:RED._("common.status.closed")});
|
node.status({fill:"grey",shape:"ring",text:RED._("rpi-gpio.status.closed")});
|
||||||
node.done();
|
node.done();
|
||||||
}
|
}
|
||||||
else { node.status({fill:"red",shape:"ring",text:RED._("common.status.stopped")}); }
|
else { node.status({fill:"red",shape:"ring",text:RED._("rpi-gpio.status.stopped")}); }
|
||||||
});
|
});
|
||||||
|
|
||||||
node.child.on('error', function (err) {
|
node.child.on('error', function (err) {
|
||||||
@ -199,7 +199,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
node.on("close", function(done) {
|
node.on("close", function(done) {
|
||||||
node.status({fill:"grey",shape:"ring",text:RED._("common.status.close")});
|
node.status({fill:"grey",shape:"ring",text:RED._("rpi-gpio.status.closed")});
|
||||||
delete pinsInUse[node.pin];
|
delete pinsInUse[node.pin];
|
||||||
if (node.child != null) {
|
if (node.child != null) {
|
||||||
node.done = done;
|
node.done = done;
|
||||||
@ -247,12 +247,12 @@ module.exports = function(RED) {
|
|||||||
node.child.on('close', function (code) {
|
node.child.on('close', function (code) {
|
||||||
node.child = null;
|
node.child = null;
|
||||||
node.running = false;
|
node.running = false;
|
||||||
if (RED.settings.verbose) { node.log(RED._("rpi-gpio.errors.closed")); }
|
if (RED.settings.verbose) { node.log(RED._("rpi-gpio.status.closed")); }
|
||||||
if (node.done) {
|
if (node.done) {
|
||||||
node.status({fill:"grey",shape:"ring",text:RED._("common.status.closed")});
|
node.status({fill:"grey",shape:"ring",text:RED._("rpi-gpio.status.closed")});
|
||||||
node.done();
|
node.done();
|
||||||
}
|
}
|
||||||
else { node.status({fill:"red",shape:"ring",text:RED._("common.status.stopped")}); }
|
else { node.status({fill:"red",shape:"ring",text:RED._("rpi-gpio.status.stopped")}); }
|
||||||
});
|
});
|
||||||
|
|
||||||
node.child.on('error', function (err) {
|
node.child.on('error', function (err) {
|
||||||
@ -262,7 +262,7 @@ module.exports = function(RED) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
node.on("close", function(done) {
|
node.on("close", function(done) {
|
||||||
node.status({fill:"grey",shape:"ring",text:RED._("common.status.close")});
|
node.status({fill:"grey",shape:"ring",text:RED._("rpi-gpio.status.closed")});
|
||||||
if (node.child != null) {
|
if (node.child != null) {
|
||||||
node.done = done;
|
node.done = done;
|
||||||
node.child.kill('SIGINT');
|
node.child.kill('SIGINT');
|
||||||
|
@ -195,7 +195,7 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
this.on("input",function(msg) {
|
this.on("input",function(msg) {
|
||||||
var preRequestTimestamp = process.hrtime();
|
var preRequestTimestamp = process.hrtime();
|
||||||
node.status({fill:"blue",shape:"dot",text:RED._("common.status.requesting")});
|
node.status({fill:"blue",shape:"dot",text:RED._("httpin.status.requesting")});
|
||||||
var url = nodeUrl || msg.url;
|
var url = nodeUrl || msg.url;
|
||||||
if (msg.url && nodeUrl && (nodeUrl !== msg.url)) { // revert change below when warning is finally removed
|
if (msg.url && nodeUrl && (nodeUrl !== msg.url)) { // revert change below when warning is finally removed
|
||||||
node.warn(RED._("common.errors.nooverride"));
|
node.warn(RED._("common.errors.nooverride"));
|
||||||
|
@ -128,7 +128,7 @@ module.exports = function(RED) {
|
|||||||
if (socketTimeout !== null) { socket.setTimeout(socketTimeout); }
|
if (socketTimeout !== null) { socket.setTimeout(socketTimeout); }
|
||||||
var id = (1+Math.random()*4294967295).toString(16);
|
var id = (1+Math.random()*4294967295).toString(16);
|
||||||
connectionPool[id] = socket;
|
connectionPool[id] = socket;
|
||||||
node.status({text:++count+" "+RED._("common.status.connections")});
|
node.status({text:RED._("tcpin.status.connections",{count:++count})});
|
||||||
|
|
||||||
var buffer = (node.datatype == 'buffer')? new Buffer(0):"";
|
var buffer = (node.datatype == 'buffer')? new Buffer(0):"";
|
||||||
socket.on('data', function (data) {
|
socket.on('data', function (data) {
|
||||||
@ -175,7 +175,7 @@ module.exports = function(RED) {
|
|||||||
});
|
});
|
||||||
socket.on('close', function() {
|
socket.on('close', function() {
|
||||||
delete connectionPool[id];
|
delete connectionPool[id];
|
||||||
node.status({text:--count+" "+RED._("common.status.connections")});
|
node.status({text:RED._("tcpin.status.connections",{count:--count})});
|
||||||
});
|
});
|
||||||
socket.on('error',function(err) {
|
socket.on('error',function(err) {
|
||||||
node.log(err);
|
node.log(err);
|
||||||
@ -301,13 +301,13 @@ module.exports = function(RED) {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var connectedSockets = [];
|
var connectedSockets = [];
|
||||||
node.status({text:"0 "+RED._("common.status.connections")});
|
node.status({text:RED._("tcpin.status.connections",{count:0})});
|
||||||
var server = net.createServer(function (socket) {
|
var server = net.createServer(function (socket) {
|
||||||
if (socketTimeout !== null) { socket.setTimeout(socketTimeout); }
|
if (socketTimeout !== null) { socket.setTimeout(socketTimeout); }
|
||||||
var remoteDetails = socket.remoteAddress+":"+socket.remotePort;
|
var remoteDetails = socket.remoteAddress+":"+socket.remotePort;
|
||||||
node.log(RED._("tcpin.status.connection-from",{host:socket.remoteAddress, port:socket.remotePort}));
|
node.log(RED._("tcpin.status.connection-from",{host:socket.remoteAddress, port:socket.remotePort}));
|
||||||
connectedSockets.push(socket);
|
connectedSockets.push(socket);
|
||||||
node.status({text:connectedSockets.length+" "+RED._("common.status.connections")});
|
node.status({text:connectedSockets.length+" "+RED._("tcpin.status.connections")});
|
||||||
socket.on('timeout', function() {
|
socket.on('timeout', function() {
|
||||||
node.log(RED._("tcpin.errors.timeout",{port:node.port}));
|
node.log(RED._("tcpin.errors.timeout",{port:node.port}));
|
||||||
socket.end();
|
socket.end();
|
||||||
@ -315,12 +315,12 @@ module.exports = function(RED) {
|
|||||||
socket.on('close',function() {
|
socket.on('close',function() {
|
||||||
node.log(RED._("tcpin.status.connection-closed",{host:socket.remoteAddress, port:socket.remotePort}));
|
node.log(RED._("tcpin.status.connection-closed",{host:socket.remoteAddress, port:socket.remotePort}));
|
||||||
connectedSockets.splice(connectedSockets.indexOf(socket),1);
|
connectedSockets.splice(connectedSockets.indexOf(socket),1);
|
||||||
node.status({text:connectedSockets.length+" "+RED._("common.status.connections")});
|
node.status({text:RED._("common.status.connections",{count:connectedSockets.length})});
|
||||||
});
|
});
|
||||||
socket.on('error',function() {
|
socket.on('error',function() {
|
||||||
node.log(RED._("tcpin.errors.socket-error",{host:socket.remoteAddress, port:socket.remotePort}));
|
node.log(RED._("tcpin.errors.socket-error",{host:socket.remoteAddress, port:socket.remotePort}));
|
||||||
connectedSockets.splice(connectedSockets.indexOf(socket),1);
|
connectedSockets.splice(connectedSockets.indexOf(socket),1);
|
||||||
node.status({text:connectedSockets.length+" "+RED._("common.status.connections")});
|
node.status({text:RED._("common.status.connections",{count:connectedSockets.length})});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -29,11 +29,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-row node-input-iface">
|
<div class="form-row node-input-iface">
|
||||||
<label for="node-input-iface"><i class="fa fa-random"></i> <span data-i18n="udp.label.interface"></span></label>
|
<label for="node-input-iface"><i class="fa fa-random"></i> <span data-i18n="udp.label.interface"></span></label>
|
||||||
<input type="text" id="node-input-iface" data-i18n="[placeholder]udp.label.interfaceph">
|
<input type="text" id="node-input-iface" data-i18n="[placeholder]udp.label.interface">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-port"><i class="fa fa-sign-in"></i> <span data-i18n="udp.label.onport"></span></label>
|
<label for="node-input-port"><i class="fa fa-sign-in"></i> <span data-i18n="udp.label.onport"></span></label>
|
||||||
<input type="text" id="node-input-port" data-i18n="[placeholder]udp.label.onportph" style="width: 80px">
|
<input type="text" id="node-input-port" style="width: 80px">
|
||||||
<span data-i18n="udp.label.using"></span> <select id="node-input-ipv" style="width:80px">
|
<span data-i18n="udp.label.using"></span> <select id="node-input-ipv" style="width:80px">
|
||||||
<option value="udp4">ipv4</option>
|
<option value="udp4">ipv4</option>
|
||||||
<option value="udp6">ipv6</option>
|
<option value="udp6">ipv6</option>
|
||||||
@ -42,16 +42,16 @@
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-datatype"><i class="fa fa-sign-out"></i> <span data-i18n="udp.label.output"></span></label>
|
<label for="node-input-datatype"><i class="fa fa-sign-out"></i> <span data-i18n="udp.label.output"></span></label>
|
||||||
<select id="node-input-datatype" style="width: 70%;">
|
<select id="node-input-datatype" style="width: 70%;">
|
||||||
<option value="buffer" data-i18n="udp.buffer"></option>
|
<option value="buffer" data-i18n="udp.output.buffer"></option>
|
||||||
<option value="utf8" data-i18n="udp.string"></option>
|
<option value="utf8" data-i18n="udp.output.string"></option>
|
||||||
<option value="base64" data-i18n="udp.base64"></option>
|
<option value="base64" data-i18n="udp.output.base64"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
||||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-tips"><span data-i18n="udp.in-tip"></span></div>
|
<div class="form-tips"><span data-i18n="udp.tip.in"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="udp in">
|
<script type="text/x-red" data-help-name="udp in">
|
||||||
@ -112,11 +112,11 @@
|
|||||||
<option value="broad" data-i18n="udp.bcmsg"></option>
|
<option value="broad" data-i18n="udp.bcmsg"></option>
|
||||||
<option value="multi" data-i18n="udp.mcmsg"></option>
|
<option value="multi" data-i18n="udp.mcmsg"></option>
|
||||||
</select>
|
</select>
|
||||||
<span data-i18n="udp.label.toport"></span> <input type="text" id="node-input-port" data-i18n="[placeholder]udp.label.toportph" style="width: 70px">
|
<span data-i18n="udp.label.toport"></span> <input type="text" id="node-input-port" style="width: 70px">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row node-input-addr">
|
<div class="form-row node-input-addr">
|
||||||
<label for="node-input-addr" id="node-input-addr-label"><i class="fa fa-list"></i> <span data-i18n="udp.label.address"></span></label>
|
<label for="node-input-addr" id="node-input-addr-label"><i class="fa fa-list"></i> <span data-i18n="udp.label.address"></span></label>
|
||||||
<input type="text" id="node-input-addr" data-i18n="[placeholder]udp.label.addressph" style="width: 50%;">
|
<input type="text" id="node-input-addr" data-i18n="[placeholder]udp.placeholder.address" style="width: 50%;">
|
||||||
<select id="node-input-ipv" style="width:70px">
|
<select id="node-input-ipv" style="width:70px">
|
||||||
<option value="udp4">ipv4</option>
|
<option value="udp4">ipv4</option>
|
||||||
<option value="udp6">ipv6</option>
|
<option value="udp6">ipv6</option>
|
||||||
@ -124,15 +124,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-row node-input-iface">
|
<div class="form-row node-input-iface">
|
||||||
<label for="node-input-iface"><i class="fa fa-random"></i> <span data-i18n="udp.label.interface"></span></label>
|
<label for="node-input-iface"><i class="fa fa-random"></i> <span data-i18n="udp.label.interface"></span></label>
|
||||||
<input type="text" id="node-input-iface" data-i18n="[placeholder]udp.label.interfaceph">
|
<input type="text" id="node-input-iface" data-i18n="[placeholder]udp.placeholder.interface">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-outport-type"> </label>
|
<label for="node-input-outport-type"> </label>
|
||||||
<select id="node-input-outport-type">
|
<select id="node-input-outport-type">
|
||||||
<option id="node-input-outport-type-random" value="random" data-i18n="udp.bindrandom"></option>
|
<option id="node-input-outport-type-random" value="random" data-i18n="udp.bind.random"></option>
|
||||||
<option value="fixed" data-i18n="udp.bindlocal"></option>
|
<option value="fixed" data-i18n="udp.bind.local"></option>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" id="node-input-outport" style="width: 70px;" data-i18n="[placeholder]udp.label.outportph">
|
<input type="text" id="node-input-outport" style="width: 70px;">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label> </label>
|
<label> </label>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
|
||||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-tips"><span data-i18n="[html]udp.out-tip"></span></div>
|
<div class="form-tips"><span data-i18n="[html]udp.tip.out"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="udp out">
|
<script type="text/x-red" data-help-name="udp out">
|
||||||
@ -179,10 +179,10 @@
|
|||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
var addresslabel = this._("udp.label.address");
|
var addresslabel = this._("udp.label.address");
|
||||||
var addressph = this._("udp.label.addressph");
|
var addressph = this._("udp.placeholder.address");
|
||||||
var grouplabel = this._("udp.label.group");
|
var grouplabel = this._("udp.label.group");
|
||||||
var bindrandom = this._("udp.bindrandom");
|
var bindrandom = this._("udp.bind.random");
|
||||||
var bindtarget = this._("udp.bindtarget");
|
var bindtarget = this._("udp.bind.target");
|
||||||
|
|
||||||
var type = this.outport==""?"random":"fixed";
|
var type = this.outport==""?"random":"fixed";
|
||||||
$("#node-input-outport-type option").filter(function() {
|
$("#node-input-outport-type option").filter(function() {
|
||||||
|
@ -35,7 +35,7 @@ module.exports = function(RED) {
|
|||||||
if ((err.code == "EACCES") && (node.port < 1024)) {
|
if ((err.code == "EACCES") && (node.port < 1024)) {
|
||||||
node.error(RED._("udp.errors.access-error"));
|
node.error(RED._("udp.errors.access-error"));
|
||||||
} else {
|
} else {
|
||||||
node.error(RED._("udp.errors.udp-error")+" : "+err.code);
|
node.error(RED._("udp.errors.error",{error:err.code}));
|
||||||
}
|
}
|
||||||
server.close();
|
server.close();
|
||||||
});
|
});
|
||||||
@ -54,20 +54,20 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
server.on('listening', function () {
|
server.on('listening', function () {
|
||||||
var address = server.address();
|
var address = server.address();
|
||||||
node.log(RED._("udp.errors.listener-at") + ' ' + address.address + ":" + address.port);
|
node.log(RED._("udp.status.listener-at",{host:address.address,port:address.port}));
|
||||||
if (node.multicast == "true") {
|
if (node.multicast == "true") {
|
||||||
server.setBroadcast(true);
|
server.setBroadcast(true);
|
||||||
try {
|
try {
|
||||||
server.setMulticastTTL(128);
|
server.setMulticastTTL(128);
|
||||||
server.addMembership(node.group,node.iface);
|
server.addMembership(node.group,node.iface);
|
||||||
node.log(RED._("udp.errors.mc-group")+" "+node.group);
|
node.log(RED._("udp.status.mc-group",{group:node.group}));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.errno == "EINVAL") {
|
if (e.errno == "EINVAL") {
|
||||||
node.error(RED._("udp.errors.bad-mcaddress"));
|
node.error(RED._("udp.errors.bad-mcaddress"));
|
||||||
} else if (e.errno == "ENODEV") {
|
} else if (e.errno == "ENODEV") {
|
||||||
node.error(RED._("udp.errors.interface"));
|
node.error(RED._("udp.errors.interface"));
|
||||||
} else {
|
} else {
|
||||||
node.error(RED._("udp.errors.error")+" :"+e.errno);
|
node.error(RED._("udp.errors.error",{error:e.errno}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ module.exports = function(RED) {
|
|||||||
node.on("close", function() {
|
node.on("close", function() {
|
||||||
try {
|
try {
|
||||||
server.close();
|
server.close();
|
||||||
node.log(RED._("udp.errors.listener-stopped"));
|
node.log(RED._("udp.status.listener-stopped"));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
node.error(err);
|
node.error(err);
|
||||||
}
|
}
|
||||||
@ -118,25 +118,25 @@ module.exports = function(RED) {
|
|||||||
try {
|
try {
|
||||||
sock.setMulticastTTL(128);
|
sock.setMulticastTTL(128);
|
||||||
sock.addMembership(node.addr,node.iface); // Add to the multicast group
|
sock.addMembership(node.addr,node.iface); // Add to the multicast group
|
||||||
node.log(RED._("udp.errors.mc-ready")+' : '+node.outport+' -> '+node.addr+":"+node.port);
|
node.log(RED._("udp.status.mc-ready",{outport:node.outport,host:node.addr,port:node.port}));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.errno == "EINVAL") {
|
if (e.errno == "EINVAL") {
|
||||||
node.error(RED._("udp.errors.bad-mcaddress"));
|
node.error(RED._("udp.errors.bad-mcaddress"));
|
||||||
} else if (e.errno == "ENODEV") {
|
} else if (e.errno == "ENODEV") {
|
||||||
node.error(RED._("udp.errors.interface"));
|
node.error(RED._("udp.errors.interface"));
|
||||||
} else {
|
} else {
|
||||||
node.error(RED._("udp.errors.error")+" :"+e.errno);
|
node.error(RED._("udp.errors.error",{error:e.errno}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
node.log(RED._("udp.errors.bc-ready")+' : '+node.outport+' -> '+node.addr+":"+node.port);
|
node.log(RED._("udp.status.bc-ready",{outport:node.outport,host:node.addr,port:node.port}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (node.outport != "") {
|
} else if (node.outport != "") {
|
||||||
sock.bind(node.outport);
|
sock.bind(node.outport);
|
||||||
node.log(RED._("udp.errors.ready")+' : '+node.outport+' -> '+node.addr+":"+node.port);
|
node.log(RED._("udp.errors.ready",{outport:node.outport,host:node.addr,port:node.port}));
|
||||||
} else {
|
} else {
|
||||||
node.log(RED._("udp.errors.ready")+' : '+node.addr+":"+node.port);
|
node.log(RED._("udp.errors.ready-nolocal",{host:node.addr,port:node.port}));
|
||||||
}
|
}
|
||||||
|
|
||||||
node.on("input", function(msg) {
|
node.on("input", function(msg) {
|
||||||
@ -171,7 +171,7 @@ module.exports = function(RED) {
|
|||||||
node.on("close", function() {
|
node.on("close", function() {
|
||||||
try {
|
try {
|
||||||
sock.close();
|
sock.close();
|
||||||
node.log(RED._("udp.errors.output-stopped"));
|
node.log(RED._("udp.status.output-stopped"));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
node.error(err);
|
node.error(err);
|
||||||
}
|
}
|
||||||
|
@ -12,23 +12,8 @@
|
|||||||
"not-connected": "not connected",
|
"not-connected": "not connected",
|
||||||
"disconnected": "disconnected",
|
"disconnected": "disconnected",
|
||||||
"connecting": "connecting",
|
"connecting": "connecting",
|
||||||
"connections": "connections",
|
|
||||||
"requesting": "requesting",
|
|
||||||
"unknown": "unknown",
|
|
||||||
"error": "error",
|
"error": "error",
|
||||||
"ok": "OK",
|
"ok": "OK"
|
||||||
"closed": "closed",
|
|
||||||
"stopped": "stopped",
|
|
||||||
"close": "close",
|
|
||||||
"not-running": "not running",
|
|
||||||
"sending": "sending",
|
|
||||||
"sendfail": "send failed",
|
|
||||||
"connecterror": "connect error",
|
|
||||||
"neterror": "net error",
|
|
||||||
"joined": "joined",
|
|
||||||
"quit": "quit",
|
|
||||||
"noconnection": "no connection",
|
|
||||||
"failed": "failed"
|
|
||||||
},
|
},
|
||||||
"notification": {
|
"notification": {
|
||||||
"error": "<strong>Error</strong>: __message__",
|
"error": "<strong>Error</strong>: __message__",
|
||||||
@ -86,7 +71,6 @@
|
|||||||
"catch": "catch"
|
"catch": "catch"
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"debug": "debug",
|
|
||||||
"output": "Output",
|
"output": "Output",
|
||||||
"msgprop": "message property",
|
"msgprop": "message property",
|
||||||
"msgobj": "complete msg object",
|
"msgobj": "complete msg object",
|
||||||
@ -126,7 +110,6 @@
|
|||||||
"templatevalue": "This is the payload: {{payload}} !"
|
"templatevalue": "This is the payload: {{payload}} !"
|
||||||
},
|
},
|
||||||
"delay": {
|
"delay": {
|
||||||
"delay": "delay",
|
|
||||||
"action": "Action",
|
"action": "Action",
|
||||||
"for": "For",
|
"for": "For",
|
||||||
"delaymsg": "Delay message",
|
"delaymsg": "Delay message",
|
||||||
@ -190,7 +173,6 @@
|
|||||||
"tip": "<p>This node is a type unknown to your installation of Node-RED.</p><p><i>If you deploy with the node in this state, it's configuration will be preserved, but the flow will not start until the missing type is installed.</i></p><p>See the Info side bar for more help</p>"
|
"tip": "<p>This node is a type unknown to your installation of Node-RED.</p><p><i>If you deploy with the node in this state, it's configuration will be preserved, but the flow will not start until the missing type is installed.</i></p><p>See the Info side bar for more help</p>"
|
||||||
},
|
},
|
||||||
"mqtt": {
|
"mqtt": {
|
||||||
"mqtt": "mqtt",
|
|
||||||
"label": {
|
"label": {
|
||||||
"broker": "Broker",
|
"broker": "Broker",
|
||||||
"qos": "QoS",
|
"qos": "QoS",
|
||||||
@ -214,7 +196,7 @@
|
|||||||
"label": {
|
"label": {
|
||||||
"method": "Method",
|
"method": "Method",
|
||||||
"url": "URL",
|
"url": "URL",
|
||||||
"doc": "Documentation",
|
"doc": "Docs",
|
||||||
"return": "Return"
|
"return": "Return"
|
||||||
},
|
},
|
||||||
"setby": "- set by msg.method -",
|
"setby": "- set by msg.method -",
|
||||||
@ -233,6 +215,9 @@
|
|||||||
"no-response": "No response object",
|
"no-response": "No response object",
|
||||||
"json-error": "JSON parse error",
|
"json-error": "JSON parse error",
|
||||||
"no-url": "No url specified"
|
"no-url": "No url specified"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"requesting": "requesting"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"websocket": {
|
"websocket": {
|
||||||
@ -316,7 +301,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tcpin": {
|
"tcpin": {
|
||||||
"tcpin": "tcpin",
|
|
||||||
"label": {
|
"label": {
|
||||||
"type": "Type",
|
"type": "Type",
|
||||||
"output": "Output",
|
"output": "Output",
|
||||||
@ -353,7 +337,10 @@
|
|||||||
"listening-port": "listening on port __port__",
|
"listening-port": "listening on port __port__",
|
||||||
"stopped-listening": "stopped listening on port",
|
"stopped-listening": "stopped listening on port",
|
||||||
"connection-from": "connection from __host__:__port__",
|
"connection-from": "connection from __host__:__port__",
|
||||||
"connection-closed": "connection closed from __host__:__port__"
|
"connection-closed": "connection closed from __host__:__port__",
|
||||||
|
"connections": "__count__ connection",
|
||||||
|
"connections_plural": "__count__ connections"
|
||||||
|
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"connection-lost": "connection lost to __host__:__port__",
|
"connection-lost": "connection lost to __host__:__port__",
|
||||||
@ -373,47 +360,54 @@
|
|||||||
"onport": "on Port",
|
"onport": "on Port",
|
||||||
"using": "using",
|
"using": "using",
|
||||||
"output": "Output",
|
"output": "Output",
|
||||||
"onportph": "port",
|
|
||||||
"group": "Group",
|
"group": "Group",
|
||||||
"interface": "Interface",
|
"interface": "Interface",
|
||||||
"interfaceph": "(optional) ip address of eth0",
|
|
||||||
"send": "Send a",
|
"send": "Send a",
|
||||||
"toport": "to port",
|
"toport": "to port",
|
||||||
"toportph": "port",
|
|
||||||
"address": "Address",
|
"address": "Address",
|
||||||
"addressph": "destination ip",
|
"decode-base64": "Decode Base64 encoded payload?"
|
||||||
"decode-base64": "Decode Base64 encoded payload?",
|
},
|
||||||
"outportph": "port"
|
"placeholder": {
|
||||||
|
"interface": "(optional) ip address of eth0",
|
||||||
|
"address": "destination ip"
|
||||||
},
|
},
|
||||||
"udpmsgs": "udp messages",
|
"udpmsgs": "udp messages",
|
||||||
"mcmsgs": "multicast messages",
|
"mcmsgs": "multicast messages",
|
||||||
"udpmsg": "udp message",
|
"udpmsg": "udp message",
|
||||||
"bcmsg": "broadcast message",
|
"bcmsg": "broadcast message",
|
||||||
"mcmsg": "multicast message",
|
"mcmsg": "multicast message",
|
||||||
"buffer": "a Buffer",
|
"output": {
|
||||||
"string": "a String",
|
"buffer": "a Buffer",
|
||||||
"base64": "a Base64 encoded string",
|
"string": "a String",
|
||||||
"bindrandom": "bind to random local port",
|
"base64": "a Base64 encoded string"
|
||||||
"bindlocal": "bind to local port",
|
},
|
||||||
"bindtarget": "bind to target port",
|
"bind": {
|
||||||
"in-tip": "Tip: Make sure your firewall will allow the data in.",
|
"random": "bind to random local port",
|
||||||
"out-tip": "Tip: leave address and port blank if you want to set using <b>msg.ip</b> and <b>msg.port</b>.",
|
"local": "bind to local port",
|
||||||
"errors": {
|
"target": "bind to target port"
|
||||||
"listener-at": "udp listener at",
|
},
|
||||||
"mc-group": "udp multicast group",
|
"tip": {
|
||||||
|
"in": "Tip: Make sure your firewall will allow the data in.",
|
||||||
|
"out": "Tip: leave address and port blank if you want to set using <b>msg.ip</b> and <b>msg.port</b>."
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"listener-at": "udp listener at __host__:__port__",
|
||||||
|
"mc-group": "udp multicast group __group__",
|
||||||
"listener-stopped": "udp listener stopped",
|
"listener-stopped": "udp listener stopped",
|
||||||
"mc-ready": "udp multicast ready",
|
|
||||||
"bc-ready": "udp broadcast ready",
|
|
||||||
"ready": "udp ready",
|
|
||||||
"output-stopped": "udp output stopped",
|
"output-stopped": "udp output stopped",
|
||||||
"ip-notset": "udp: ip address not set",
|
"mc-ready": "udp multicast ready: __outport__ -> __host__:__port__",
|
||||||
"port-notset": "udp: port not set",
|
"bc-ready": "udp broadcast ready: __outport__ -> __host__:__port__",
|
||||||
"port-invalid": "udp: port number not valid",
|
"ready": "udp ready: __outport__ -> __host__:__port__",
|
||||||
|
"ready-nolocal": "udp ready: __host__:__port__"
|
||||||
|
},
|
||||||
|
"errors": {
|
||||||
"access-error": "UDP access error, you may need root access for ports below 1024",
|
"access-error": "UDP access error, you may need root access for ports below 1024",
|
||||||
"udp-error": "UDP error",
|
"error": "error: __error_",
|
||||||
"bad-mcaddress": "Bad Multicast Address",
|
"bad-mcaddress": "Bad Multicast Address",
|
||||||
"interface": "Must be ip address of the required interface",
|
"interface": "Must be ip address of the required interface",
|
||||||
"error": "Error"
|
"ip-notset": "udp: ip address not set",
|
||||||
|
"port-notset": "udp: port not set",
|
||||||
|
"port-invalid": "udp: port number not valid"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"switch": {
|
"switch": {
|
||||||
@ -435,22 +429,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"change": {
|
"change": {
|
||||||
"change": "change",
|
|
||||||
"label": {
|
"label": {
|
||||||
"rules": "Rules",
|
"rules": "Rules",
|
||||||
"rule": "rule",
|
"rule": "rule",
|
||||||
"set": "set __property__",
|
"set": "set __property__",
|
||||||
"change": "change __property__",
|
"change": "change __property__",
|
||||||
"delete": "delete __property__",
|
"delete": "delete __property__",
|
||||||
"changeCount": "change: __count__ rules"
|
"changeCount": "change: __count__ rules",
|
||||||
|
"regex": "Use regular expressions"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"set": "Set",
|
||||||
|
"change": "Change",
|
||||||
|
"delete": "Delete",
|
||||||
|
"to": "to",
|
||||||
|
"search": "Search for",
|
||||||
|
"replace": "Replace with"
|
||||||
},
|
},
|
||||||
"set": "Set",
|
|
||||||
"change": "Change",
|
|
||||||
"delete": "Delete",
|
|
||||||
"to": "to",
|
|
||||||
"search": "Search for",
|
|
||||||
"replace": "Replace with",
|
|
||||||
"regex": "Use regular expressions",
|
|
||||||
"errors": {
|
"errors": {
|
||||||
"invalid-from": "Invalid 'from' property: __error__"
|
"invalid-from": "Invalid 'from' property: __error__"
|
||||||
}
|
}
|
||||||
@ -480,7 +475,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"csv": {
|
"csv": {
|
||||||
"csv": "csv",
|
|
||||||
"label": {
|
"label": {
|
||||||
"columns": "Columns",
|
"columns": "Columns",
|
||||||
"separator": "Separator",
|
"separator": "Separator",
|
||||||
@ -628,9 +622,13 @@
|
|||||||
"pulldown": "input with pull down",
|
"pulldown": "input with pull down",
|
||||||
"pwmout": "PWM output"
|
"pwmout": "PWM output"
|
||||||
},
|
},
|
||||||
|
"status": {
|
||||||
|
"stopped": "stopped",
|
||||||
|
"closed": "closed",
|
||||||
|
"not-running": "not running"
|
||||||
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"ignorenode": "Ignoring Raspberry Pi specific node",
|
"ignorenode": "Ignoring Raspberry Pi specific node",
|
||||||
"closed": "closed",
|
|
||||||
"version": "Version command failed",
|
"version": "Version command failed",
|
||||||
"sawpitype": "Saw Pi Type",
|
"sawpitype": "Saw Pi Type",
|
||||||
"libnotfound": "Cannot find Pi RPi.GPIO python library",
|
"libnotfound": "Cannot find Pi RPi.GPIO python library",
|
||||||
@ -646,7 +644,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tail": {
|
"tail": {
|
||||||
"tail": "tail",
|
|
||||||
"label": {
|
"label": {
|
||||||
"filename": "Filename",
|
"filename": "Filename",
|
||||||
"splitlines": "Split lines on \\n?"
|
"splitlines": "Split lines on \\n?"
|
||||||
@ -656,7 +653,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"file": {
|
"file": {
|
||||||
"file": "file",
|
|
||||||
"label": {
|
"label": {
|
||||||
"filename": "Filename",
|
"filename": "Filename",
|
||||||
"action": "Action",
|
"action": "Action",
|
||||||
@ -688,7 +684,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"redisout": {
|
"redisout": {
|
||||||
"redis": "redis",
|
|
||||||
"label": {
|
"label": {
|
||||||
"host": "Host",
|
"host": "Host",
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
@ -708,7 +703,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mongodb": {
|
"mongodb": {
|
||||||
"mongodb": "mongodb",
|
|
||||||
"label": {
|
"label": {
|
||||||
"host": "Host",
|
"host": "Host",
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
@ -738,7 +732,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"feedparse": {
|
"feedparse": {
|
||||||
"feedparse": "feedparse",
|
|
||||||
"label": {
|
"label": {
|
||||||
"feedurl": "Feed url",
|
"feedurl": "Feed url",
|
||||||
"refresh": "Refresh",
|
"refresh": "Refresh",
|
||||||
@ -776,7 +769,10 @@
|
|||||||
"message": "message #__number__",
|
"message": "message #__number__",
|
||||||
"newemail": "received new email: __topic__",
|
"newemail": "received new email: __topic__",
|
||||||
"duplicate": "duplicate not sent: __topic__",
|
"duplicate": "duplicate not sent: __topic__",
|
||||||
"inboxzero": "you have achieved Inbox Zero"
|
"inboxzero": "you have achieved Inbox Zero",
|
||||||
|
"sending": "sending",
|
||||||
|
"sendfail": "send failed",
|
||||||
|
"connecterror": "connect error"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"nouserid": "No e-mail userid set",
|
"nouserid": "No e-mail userid set",
|
||||||
@ -825,7 +821,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"twitter": {
|
"twitter": {
|
||||||
"twitter": "twitter",
|
|
||||||
"label": {
|
"label": {
|
||||||
"twitter-id":"Twitter ID",
|
"twitter-id":"Twitter ID",
|
||||||
"search": "Search",
|
"search": "Search",
|
||||||
|
@ -92,13 +92,13 @@
|
|||||||
return this.name ? "node_label_italic" : "";
|
return this.name ? "node_label_italic" : "";
|
||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
var set = this._("change.set");
|
var set = this._("change.action.set");
|
||||||
var change = this._("change.change");
|
var change = this._("change.action.change");
|
||||||
var del = this._("change.delete");
|
var del = this._("change.action.delete");
|
||||||
var to = this._("change.to");
|
var to = this._("change.action.to");
|
||||||
var search = this._("change.search");
|
var search = this._("change.action.search");
|
||||||
var replace = this._("change.replace");
|
var replace = this._("change.action.replace");
|
||||||
var regex = this._("change.regex");
|
var regex = this._("change.label.regex");
|
||||||
if (this.reg === null) { $("#node-input-reg").prop('checked', true); }
|
if (this.reg === null) { $("#node-input-reg").prop('checked', true); }
|
||||||
$("#node-input-action").change();
|
$("#node-input-action").change();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user