mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
More node i18n tidy ups
This commit is contained in:
parent
68bb8252af
commit
5ea68dafc4
@ -42,9 +42,9 @@
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-intype"><i class="fa fa-level-up"></i> <span data-i18n="rpi-gpio.label.registor"></span></label>
|
<label for="node-input-intype"><i class="fa fa-level-up"></i> <span data-i18n="rpi-gpio.label.registor"></span></label>
|
||||||
<select type="text" id="node-input-intype" style="width: 150px;">
|
<select type="text" id="node-input-intype" style="width: 150px;">
|
||||||
<option value="tri" data-i18n="rpi-gpio.none"></option>
|
<option value="tri" data-i18n="rpi-gpio.registor.none"></option>
|
||||||
<option value="up" data-i18n="rpi-gpio.pullup"></option>
|
<option value="up" data-i18n="rpi-gpio.registor.pullup"></option>
|
||||||
<option value="down" data-i18n="rpi-gpio.pulldown"></option>
|
<option value="down" data-i18n="rpi-gpio.registor.pulldown"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -57,8 +57,8 @@
|
|||||||
<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" id="pin-tip"><span data-i18n="[html]rpi-gpio.pin-tip"></span></div>
|
<div class="form-tips" id="pin-tip"><span data-i18n="[html]rpi-gpio.tip.pin"></span></div>
|
||||||
<div class="form-tips"><span data-i18n="[html]rpi-gpio.in-tip"></span></div>
|
<div class="form-tips"><span data-i18n="[html]rpi-gpio.tip.in"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="rpi-gpio in">
|
<script type="text/x-red" data-help-name="rpi-gpio in">
|
||||||
@ -97,7 +97,7 @@
|
|||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
var pinnow = this.pin;
|
var pinnow = this.pin;
|
||||||
var pintip = this._("rpi-gpio.pin-tip");
|
var pintip = this._("rpi-gpio.tip.pin");
|
||||||
var pinname = this._("rpi-gpio.pinname");
|
var pinname = this._("rpi-gpio.pinname");
|
||||||
var alreadyuse = this._("rpi-gpio.alreadyuse");
|
var alreadyuse = this._("rpi-gpio.alreadyuse");
|
||||||
var alreadyset = this._("rpi-gpio.alreadyset");
|
var alreadyset = this._("rpi-gpio.alreadyset");
|
||||||
@ -193,9 +193,9 @@
|
|||||||
<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" id="pin-tip"><span data-i18n="[html]rpi-gpio.pin-tip"></span></div>
|
<div class="form-tips" id="pin-tip"><span data-i18n="[html]rpi-gpio.tip.pin"></span></div>
|
||||||
<div class="form-tips" id="dig-tip"><span data-i18n="[html]rpi-gpio.dig-tip"></span></div>
|
<div class="form-tips" id="dig-tip"><span data-i18n="[html]rpi-gpio.tip.dig"></span></div>
|
||||||
<div class="form-tips" id="pwm-tip"><span data-i18n="[html]rpi-gpio.pwm-tip"></span></div>
|
<div class="form-tips" id="pwm-tip"><span data-i18n="[html]rpi-gpio.tip.pwm"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="rpi-gpio out">
|
<script type="text/x-red" data-help-name="rpi-gpio out">
|
||||||
@ -238,7 +238,7 @@
|
|||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
var pinnow = this.pin;
|
var pinnow = this.pin;
|
||||||
var pintip = this._("rpi-gpio.pin-tip");
|
var pintip = this._("rpi-gpio.tip.pin");
|
||||||
var pinname = this._("rpi-gpio.pinname");
|
var pinname = this._("rpi-gpio.pinname");
|
||||||
var alreadyuse = this._("rpi-gpio.alreadyuse");
|
var alreadyuse = this._("rpi-gpio.alreadyuse");
|
||||||
var alreadyset = this._("rpi-gpio.alreadyset");
|
var alreadyset = this._("rpi-gpio.alreadyset");
|
||||||
|
@ -33,7 +33,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !(1 & parseInt ((fs.statSync(gpioCommand).mode & parseInt ("777", 8)).toString (8)[0]) )) {
|
if ( !(1 & parseInt ((fs.statSync(gpioCommand).mode & parseInt ("777", 8)).toString (8)[0]) )) {
|
||||||
RED.log.error(gpioCommand+" "+RED._("rpi-gpio.errors.needtobeexecutable"));
|
RED.log.error(RED._("rpi-gpio.errors.needtobeexecutable",{command:gpioCommand}));
|
||||||
throw "Error : "+RED._("rpi-gpio.errors.mustbeexecutable");
|
throw "Error : "+RED._("rpi-gpio.errors.mustbeexecutable");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ module.exports = function(RED) {
|
|||||||
process.env.PYTHONUNBUFFERED = 1;
|
process.env.PYTHONUNBUFFERED = 1;
|
||||||
|
|
||||||
var pinsInUse = {};
|
var pinsInUse = {};
|
||||||
var pinTypes = {"out":RED._("rpi-gpio.errors.digout"), "tri":RED._("rpi-gpio.errors.input"), "up":RED._("rpi-gpio.errors.pullup"), "down":RED._("rpi-gpio.errors.pulldown"), "pwm":RED._("rpi-gpio.errors.pwmout")};
|
var pinTypes = {"out":RED._("rpi-gpio.types.digout"), "tri":RED._("rpi-gpio.types.input"), "up":RED._("rpi-gpio.types.pullup"), "down":RED._("rpi-gpio.types.pulldown"), "pwm":RED._("rpi-gpio.types.pwmout")};
|
||||||
|
|
||||||
function GPIOInNode(n) {
|
function GPIOInNode(n) {
|
||||||
RED.nodes.createNode(this,n);
|
RED.nodes.createNode(this,n);
|
||||||
@ -56,7 +56,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((pinsInUse[this.pin] !== this.intype)||(pinsInUse[this.pin] === "pwm")) {
|
if ((pinsInUse[this.pin] !== this.intype)||(pinsInUse[this.pin] === "pwm")) {
|
||||||
node.warn(RED._("rpi-gpio.errors.gpiopin")+" "+this.pin+" "+RED._("rpi-gpio.errors.alreadyset")+" "+pinTypes[pinsInUse[this.pin]]);
|
node.warn(RED._("rpi-gpio.errors.alreadyset",{pin:this.pin,type:pinTypes[pinsInUse[this.pin]]}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ module.exports = function(RED) {
|
|||||||
node.child.on('error', function (err) {
|
node.child.on('error', function (err) {
|
||||||
if (err.errno === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")); }
|
if (err.errno === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")); }
|
||||||
else if (err.errno === "EACCES") { node.error(RED._("rpi-gpio.errors.commandnotexecutable")); }
|
else if (err.errno === "EACCES") { node.error(RED._("rpi-gpio.errors.commandnotexecutable")); }
|
||||||
else { node.error(RED._("rpi-gpio.errors.error")+': ' + err.errno); }
|
else { node.error(RED._("rpi-gpio.errors.error",{error:err.errnp})) }
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((pinsInUse[this.pin] !== this.out)||(pinsInUse[this.pin] === "pwm")) {
|
if ((pinsInUse[this.pin] !== this.out)||(pinsInUse[this.pin] === "pwm")) {
|
||||||
node.warn(RED._("rpi-gpio.errors.gpiopin")+" "+this.pin+" "+RED._("rpi-gpio.errors.alreadyset")+" "+pinTypes[pinsInUse[this.pin]]);
|
node.warn(RED._("rpi-gpio.errors.alreadyset",{pin:this.pin,type:pinTypes[pinsInUse[this.pin]]}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ module.exports = function(RED) {
|
|||||||
node.status({fill:"blue",shape:"dot",text:RED._("common.status.requesting")});
|
node.status({fill:"blue",shape:"dot",text:RED._("common.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._("httpin.errors.not-overridden"));
|
node.warn(RED._("common.errors.nooverride"));
|
||||||
}
|
}
|
||||||
if (isTemplatedUrl) {
|
if (isTemplatedUrl) {
|
||||||
url = mustache.render(nodeUrl,msg);
|
url = mustache.render(nodeUrl,msg);
|
||||||
|
@ -23,15 +23,11 @@
|
|||||||
"not-running": "not running",
|
"not-running": "not running",
|
||||||
"sending": "sending",
|
"sending": "sending",
|
||||||
"sendfail": "send failed",
|
"sendfail": "send failed",
|
||||||
"fetching": "fetching",
|
|
||||||
"foldererror": "fetch folder error",
|
|
||||||
"messageerror": "fetch message error",
|
|
||||||
"connecterror": "connect error",
|
"connecterror": "connect error",
|
||||||
"neterror": "net error",
|
"neterror": "net error",
|
||||||
"joined": "joined",
|
"joined": "joined",
|
||||||
"quit": "quit",
|
"quit": "quit",
|
||||||
"noconnection": "no connection",
|
"noconnection": "no connection",
|
||||||
"tweeting": "tweeting",
|
|
||||||
"failed": "failed"
|
"failed": "failed"
|
||||||
},
|
},
|
||||||
"notification": {
|
"notification": {
|
||||||
@ -41,6 +37,9 @@
|
|||||||
"no-response": "no response from server",
|
"no-response": "no response from server",
|
||||||
"unexpected": "unexpected error (__status__) __message__"
|
"unexpected": "unexpected error (__status__) __message__"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"errors": {
|
||||||
|
"nooverride": "Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"inject": {
|
"inject": {
|
||||||
@ -232,7 +231,6 @@
|
|||||||
"errors": {
|
"errors": {
|
||||||
"not-created": "Cannot create http-in node when httpNodeRoot set to false",
|
"not-created": "Cannot create http-in node when httpNodeRoot set to false",
|
||||||
"no-response": "No response object",
|
"no-response": "No response object",
|
||||||
"not-overridden": "Warning: msg properties can no longer override fixed node properties. Use explicit override option. See bit.ly/nr-override-msg-props",
|
|
||||||
"json-error": "JSON parse error",
|
"json-error": "JSON parse error",
|
||||||
"no-url": "No url specified"
|
"no-url": "No url specified"
|
||||||
}
|
}
|
||||||
@ -552,9 +550,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"arduino": {
|
"arduino": {
|
||||||
"arduino": "arduino",
|
|
||||||
"label": {
|
"label": {
|
||||||
"arduino": "Arduino",
|
|
||||||
"pin": "Pin",
|
"pin": "Pin",
|
||||||
"type": "Type",
|
"type": "Type",
|
||||||
"port": "Port"
|
"port": "Port"
|
||||||
@ -562,13 +558,6 @@
|
|||||||
"placeholder": {
|
"placeholder": {
|
||||||
"port": "e.g. /dev/ttyUSB0 COM1"
|
"port": "e.g. /dev/ttyUSB0 COM1"
|
||||||
},
|
},
|
||||||
"digitalpin": "Digital pin",
|
|
||||||
"analoguepin": "Analogue pin",
|
|
||||||
"digital": "Digital (0/1)",
|
|
||||||
"analogue": "Analogue (0-255)",
|
|
||||||
"servo": "Servo (0-180)",
|
|
||||||
"io-tip": "<b>Note:</b> You cannot use the same pin for both output and input.",
|
|
||||||
"conf-tip": "<b>Tip:</b> Use search to list serial ports, or leave blank to connect to first device found.",
|
|
||||||
"status": {
|
"status": {
|
||||||
"connectfirst": "connecting to first board found",
|
"connectfirst": "connecting to first board found",
|
||||||
"connect": "connecting to __device__",
|
"connect": "connecting to __device__",
|
||||||
@ -576,13 +565,27 @@
|
|||||||
"version": "version: __version__",
|
"version": "version: __version__",
|
||||||
"portclosed": "port closed"
|
"portclosed": "port closed"
|
||||||
},
|
},
|
||||||
|
"state": {
|
||||||
|
"in": {
|
||||||
|
"digital": "Digital pin",
|
||||||
|
"analogue": "Analogue pin"
|
||||||
|
},
|
||||||
|
"out": {
|
||||||
|
"digital": "Digital (0/1)",
|
||||||
|
"analogue": "Analogue (0-255)",
|
||||||
|
"servo": "Servo (0-180)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tip": {
|
||||||
|
"io": "<b>Note:</b> You cannot use the same pin for both output and input.",
|
||||||
|
"conf": "<b>Tip:</b> Use search to try to auto-detect serial port."
|
||||||
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"portnotconf": "port not configured",
|
"portnotconf": "port not configured",
|
||||||
"devnotfound": "device __dev__ not found. Trying to find board."
|
"devnotfound": "device __dev__ not found. Trying to find board."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rpi-gpio": {
|
"rpi-gpio": {
|
||||||
"rpi-gpio": "rpi-gpio",
|
|
||||||
"label": {
|
"label": {
|
||||||
"gpiopin": "GPIO Pin",
|
"gpiopin": "GPIO Pin",
|
||||||
"selectpin": "select pin",
|
"selectpin": "select pin",
|
||||||
@ -596,9 +599,11 @@
|
|||||||
"right": "Right",
|
"right": "Right",
|
||||||
"middle": "Middle"
|
"middle": "Middle"
|
||||||
},
|
},
|
||||||
|
"registor": {
|
||||||
"none": "none",
|
"none": "none",
|
||||||
"pullup": "pullup",
|
"pullup": "pullup",
|
||||||
"pulldown": "pulldown",
|
"pulldown": "pulldown"
|
||||||
|
},
|
||||||
"digout": "Digital output",
|
"digout": "Digital output",
|
||||||
"pwmout": "PWM output",
|
"pwmout": "PWM output",
|
||||||
"initpin0": "initial level of pin - low (0)",
|
"initpin0": "initial level of pin - low (0)",
|
||||||
@ -610,30 +615,33 @@
|
|||||||
"pinname": "Pin",
|
"pinname": "Pin",
|
||||||
"alreadyuse": "already in use",
|
"alreadyuse": "already in use",
|
||||||
"alreadyset": "already set as",
|
"alreadyset": "already set as",
|
||||||
"pin-tip": "<b>Pins in Use</b>: ",
|
"tip": {
|
||||||
"in-tip": "Tip: Only Digital Input is supported - input must be 0 or 1.",
|
"pin": "<b>Pins in Use</b>: ",
|
||||||
"dig-tip": "<b>Tip</b>: For digital output - input must be 0 or 1.",
|
"in": "Tip: Only Digital Input is supported - input must be 0 or 1.",
|
||||||
"pwm-tip": "<b>Tip</b>: For PWM output - input must be between 0 and 100.",
|
"dig": "<b>Tip</b>: For digital output - input must be 0 or 1.",
|
||||||
"errors": {
|
"pwm": "<b>Tip</b>: For PWM output - input must be between 0 to 100."
|
||||||
|
},
|
||||||
|
"types": {
|
||||||
"digout": "digital output",
|
"digout": "digital output",
|
||||||
"input": "input",
|
"input": "input",
|
||||||
"pullup": "input with pull up",
|
"pullup": "input with pull up",
|
||||||
"pulldown": "input with pull down",
|
"pulldown": "input with pull down",
|
||||||
"pwmout": "PWM output",
|
"pwmout": "PWM output"
|
||||||
"ignorenode": "Ignoring Raspberry Pi specific node.",
|
},
|
||||||
|
"errors": {
|
||||||
|
"ignorenode": "Ignoring Raspberry Pi specific node",
|
||||||
"closed": "closed",
|
"closed": "closed",
|
||||||
"version": "Version command failed for some reason.",
|
"version": "Version command failed",
|
||||||
"sawpitype": "Saw Pi Type",
|
"sawpitype": "Saw Pi Type",
|
||||||
"libnotfound": "Can't find Pi RPi.GPIO python library.",
|
"libnotfound": "Cannot find Pi RPi.GPIO python library",
|
||||||
"gpiopin": "GPIO pin",
|
"alreadyset": "GPIO pin __pin__ already set as type: __type__",
|
||||||
"alreadyset": "already set as",
|
|
||||||
"invalidpin": "Invalid GPIO pin",
|
"invalidpin": "Invalid GPIO pin",
|
||||||
"invalidinput": "Invalid input",
|
"invalidinput": "Invalid input",
|
||||||
"needtobeexecutable": "needs to be executable.",
|
"needtobeexecutable": "__command__ needs to be executable",
|
||||||
"mustbeexecutable": "nrgpio must to be executable.",
|
"mustbeexecutable": "nrgpio must to be executable",
|
||||||
"commandnotfound": "nrgpio command not found",
|
"commandnotfound": "nrgpio command not found",
|
||||||
"commandnotexecutable": "nrgpio command not executable",
|
"commandnotexecutable": "nrgpio command not executable",
|
||||||
"error": "error",
|
"error": "error: __error__",
|
||||||
"pythoncommandnotfound": "nrpgio python command not running"
|
"pythoncommandnotfound": "nrpgio python command not running"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -641,39 +649,42 @@
|
|||||||
"tail": "tail",
|
"tail": "tail",
|
||||||
"label": {
|
"label": {
|
||||||
"filename": "Filename",
|
"filename": "Filename",
|
||||||
"filenameph": "filename",
|
"splitlines": "Split lines on \\n?"
|
||||||
"splitlines": "Split lines if we see \\n?"
|
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"windowsnotsupport": "Info : Currently not supported on Windows."
|
"windowsnotsupport": "Not currently supported on Windows."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"file": {
|
"file": {
|
||||||
"file": "file",
|
"file": "file",
|
||||||
"label": {
|
"label": {
|
||||||
"filename": "Filename",
|
"filename": "Filename",
|
||||||
"filenameph": "filename",
|
|
||||||
"action": "Action",
|
"action": "Action",
|
||||||
"addnewline": "Add newline (\\n) to each payload?",
|
"addnewline": "Add newline (\\n) to each payload?",
|
||||||
"outputas": "Ourput as",
|
"outputas": "Output as",
|
||||||
"filelabel": "file",
|
"filelabel": "file",
|
||||||
"deletelabel": "delete"
|
"deletelabel": "delete __file__"
|
||||||
},
|
},
|
||||||
|
"action": {
|
||||||
"append": "append to file",
|
"append": "append to file",
|
||||||
"overwrite": "overwrite file",
|
"overwrite": "overwrite file",
|
||||||
"delete": "delete file",
|
"delete": "delete file"
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
"utf8": "a utf8 string",
|
"utf8": "a utf8 string",
|
||||||
"buffer": "a Buffer",
|
"buffer": "a Buffer"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"wrotefile": "wrote to file: __file__",
|
||||||
|
"deletedfile": "deleted file: __file__",
|
||||||
|
"appendedfile": "appended to file: __file__"
|
||||||
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"wrotefile": "wrote to file",
|
|
||||||
"deletedfile": "deleted file",
|
|
||||||
"appendedfile": "appended to file",
|
|
||||||
"nooverride": "Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props",
|
|
||||||
"nofilename": "No filename specified",
|
"nofilename": "No filename specified",
|
||||||
"invaliddelete": "Warning: Invalid delete. Please use specific delete option in config dialog.",
|
"invaliddelete": "Warning: Invalid delete. Please use specific delete option in config dialog.",
|
||||||
"deletefail": "failed to delete file",
|
"deletefail": "failed to delete file: __error__",
|
||||||
"writefail": "failed to write to file",
|
"writefail": "failed to write to file: __error__",
|
||||||
"appendfail": "failed to append to file"
|
"appendfail": "failed to append to file: __error__"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"redisout": {
|
"redisout": {
|
||||||
@ -682,16 +693,16 @@
|
|||||||
"host": "Host",
|
"host": "Host",
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"key": "Key",
|
"key": "Key",
|
||||||
"keyph": "Redis Key",
|
|
||||||
"type": "Type"
|
"type": "Type"
|
||||||
},
|
},
|
||||||
|
"type": {
|
||||||
"string": "String",
|
"string": "String",
|
||||||
"hash": "Hash",
|
"hash": "Hash",
|
||||||
"set": "Set",
|
"set": "Set",
|
||||||
"list": "List",
|
"list": "List"
|
||||||
|
},
|
||||||
"tip": "If key is blank, the topic will be used as the key.<br>If type is hash, payload should be an object or field=value string.",
|
"tip": "If key is blank, the topic will be used as the key.<br>If type is hash, payload should be an object or field=value string.",
|
||||||
"errors": {
|
"errors": {
|
||||||
"connectedto": "connected to",
|
|
||||||
"invalidpayload": "Invalid payload for redis hash",
|
"invalidpayload": "Invalid payload for redis hash",
|
||||||
"nokey": "No key or topic set"
|
"nokey": "No key or topic set"
|
||||||
}
|
}
|
||||||
@ -706,19 +717,20 @@
|
|||||||
"password": "Password",
|
"password": "Password",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
"collection": "Collection",
|
"collection": "Collection",
|
||||||
"collectionph": "collection",
|
|
||||||
"operation": "Operation",
|
"operation": "Operation",
|
||||||
"onlystore": "Only store msg.payload object",
|
"onlystore": "Only store msg.payload object",
|
||||||
"createnew": "Create a new document if no match found",
|
"createnew": "Create a new document if no match found",
|
||||||
"updateall": "Update all matching documents"
|
"updateall": "Update all matching documents"
|
||||||
},
|
},
|
||||||
|
"operation": {
|
||||||
"save": "save",
|
"save": "save",
|
||||||
"insert": "insert",
|
"insert": "insert",
|
||||||
"update": "update",
|
"update": "update",
|
||||||
"remove": "remove",
|
"remove": "remove",
|
||||||
"find": "find",
|
"find": "find",
|
||||||
"count": "count",
|
"count": "count",
|
||||||
"aggregate": "aggregate",
|
"aggregate": "aggregate"
|
||||||
|
},
|
||||||
"tip": "<b> Tip:</b> If no collection is set, ensure <b>msg.collection</b> will contain the collection name",
|
"tip": "<b> Tip:</b> If no collection is set, ensure <b>msg.collection</b> will contain the collection name",
|
||||||
"errors": {
|
"errors": {
|
||||||
"nocollection": "No collection defined",
|
"nocollection": "No collection defined",
|
||||||
@ -729,9 +741,8 @@
|
|||||||
"feedparse": "feedparse",
|
"feedparse": "feedparse",
|
||||||
"label": {
|
"label": {
|
||||||
"feedurl": "Feed url",
|
"feedurl": "Feed url",
|
||||||
"repeat": "Repeat",
|
"refresh": "Refresh",
|
||||||
"repeatph": "minutes",
|
"minutes": "minutes"
|
||||||
"min": "(M)"
|
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"badstatuscode": "error - Bad status code",
|
"badstatuscode": "error - Bad status code",
|
||||||
@ -739,46 +750,49 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"email": {
|
"email": {
|
||||||
"email": "email",
|
|
||||||
"label": {
|
"label": {
|
||||||
"to": "To",
|
"to": "To",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"userid": "Userid",
|
"userid": "Userid",
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
"repeat": "Check Repeat (S)",
|
"repeat": "Refresh",
|
||||||
|
"seconds": "seconds",
|
||||||
"folder": "Folder"
|
"folder": "Folder"
|
||||||
},
|
},
|
||||||
"inbox": "IIINBOX",
|
|
||||||
"cred-tip": "<b>Note:</b> Copied credentials from global emailkeys.js file.",
|
"default-message": "Your file from Node-RED is attached: __filename__ __description__",
|
||||||
"recent-tip": "Tip: <b>ONLY</b> retrieves the single most recent email.",
|
|
||||||
"errors": {
|
|
||||||
"messagesent": "Message sent",
|
"tip": {
|
||||||
"repeat": "repeat",
|
"cred": "<b>Note:</b> Copied credentials from global emailkeys.js file.",
|
||||||
"message": "message",
|
"recent": "Tip: Only retrieves the single most recent email."
|
||||||
"finished": "Finished",
|
},
|
||||||
"newemail": "received new email",
|
"status": {
|
||||||
"duplicate": "duplicate not sent",
|
"messagesent": "Message sent: __response__",
|
||||||
"inboxzero": "you have achieved inbox zero",
|
"fetching": "fetching",
|
||||||
"error": "error",
|
"foldererror": "fetch folder error",
|
||||||
"nooverride": "Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props",
|
|
||||||
"nocredentials": "No Email credentials found. See info panel.",
|
|
||||||
"nopayload": "No payload to send",
|
|
||||||
"messageerror": "fetch message error",
|
"messageerror": "fetch message error",
|
||||||
|
"message": "message #__number__",
|
||||||
|
"newemail": "received new email: __topic__",
|
||||||
|
"duplicate": "duplicate not sent: __topic__",
|
||||||
|
"inboxzero": "you have achieved Inbox Zero"
|
||||||
|
},
|
||||||
|
"errors": {
|
||||||
"nouserid": "No e-mail userid set",
|
"nouserid": "No e-mail userid set",
|
||||||
"nopassword": "No e-mail password set",
|
"nopassword": "No e-mail password set",
|
||||||
"fetchfail": "Failed to fetch folder",
|
"nocredentials": "No Email credentials found. See info panel.",
|
||||||
"yourfile": "Your file from Node-RED is attached"
|
"nopayload": "No payload to send",
|
||||||
|
"fetchfail": "Failed to fetch folder: __folder__",
|
||||||
|
"messageerror": "Fetch message error: __error__"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"irc": {
|
"irc": {
|
||||||
"irc": "irc",
|
|
||||||
"label": {
|
"label": {
|
||||||
"ircserver": "IRC Server",
|
"ircserver": "IRC Server",
|
||||||
"channel": "Channel",
|
"channel": "Channel",
|
||||||
"action": "Action",
|
"action": "Action",
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"portph": "port",
|
|
||||||
"ssl": "Use Secure SSL connection?",
|
"ssl": "Use Secure SSL connection?",
|
||||||
"self": "Allow self-signed certificates?",
|
"self": "Allow self-signed certificates?",
|
||||||
"nickname": "Nickname"
|
"nickname": "Nickname"
|
||||||
@ -786,8 +800,10 @@
|
|||||||
"payload": "Send payload to channel(s)",
|
"payload": "Send payload to channel(s)",
|
||||||
"topic": "Use msg.topic to set nickname or channel(s)",
|
"topic": "Use msg.topic to set nickname or channel(s)",
|
||||||
"msg": "Send complete msg object to channel(s)",
|
"msg": "Send complete msg object to channel(s)",
|
||||||
"in-tip": "The channel to join must start with a # (as per normal irc rules...)<br/>You may join multiple channels by comma separating a list - #chan1,#chan2,etc.",
|
"tip": {
|
||||||
"out-tip": "The channel to join must start with a # (as per normal irc rules...)<br/>Sending the complete object will stringify the whole msg object before sending.",
|
"in": "The channel to join must start with a #<br/>You may join multiple channels by comma separating a list - #chan1,#chan2,etc.",
|
||||||
|
"out": "The channel to join must start with a #<br/>Sending the complete object will stringify the whole msg object before sending."
|
||||||
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"connect": "CONNECT",
|
"connect": "CONNECT",
|
||||||
"err": "ERR",
|
"err": "ERR",
|
||||||
@ -811,39 +827,43 @@
|
|||||||
"twitter": {
|
"twitter": {
|
||||||
"twitter": "twitter",
|
"twitter": "twitter",
|
||||||
"label": {
|
"label": {
|
||||||
"loginas": "Log in as",
|
"twitter-id":"Twitter ID",
|
||||||
"search": "Search",
|
"search": "Search",
|
||||||
"for": "for",
|
"for": "for",
|
||||||
"forph": "comma-separated words, @ids, #tags",
|
|
||||||
"user": "User",
|
"user": "User",
|
||||||
"userph": "comma-separated @twitter handles",
|
|
||||||
"dmslabel": "DMs",
|
"dmslabel": "DMs",
|
||||||
"tweetslabel": "tweets",
|
"tweetslabel": "tweets",
|
||||||
"twitter": "Twitter",
|
"clickhere": "Click here to authenticate with Twitter."
|
||||||
"clickhere": "Click here to authenticate with Twitter.",
|
|
||||||
"twitterid": "Twitter ID"
|
|
||||||
},
|
},
|
||||||
|
"placeholder": {
|
||||||
|
"for": "comma-separated words, @ids, #tags",
|
||||||
|
"user": "comma-separated @twitter handles"
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
"public": "all public tweets",
|
"public": "all public tweets",
|
||||||
"follow": "the tweets of who you follow",
|
"follow": "the tweets of who you follow",
|
||||||
"user": "the tweets of specific users",
|
"user": "the tweets of specific users",
|
||||||
"direct": "your direct messages",
|
"direct": "your direct messages"
|
||||||
|
},
|
||||||
"tip": "Tip: Use commas without spaces between multiple search terms. Comma = OR, Space = AND.<br/>The Twitter API WILL NOT deliver 100% of all tweets.<br/>Tweets of who you follow will include their retweets and favourites.",
|
"tip": "Tip: Use commas without spaces between multiple search terms. Comma = OR, Space = AND.<br/>The Twitter API WILL NOT deliver 100% of all tweets.<br/>Tweets of who you follow will include their retweets and favourites.",
|
||||||
|
"status": {
|
||||||
|
"using-geo": "Using geo location: __location__",
|
||||||
|
"tweeting": "tweeting",
|
||||||
|
"failed":"failed"
|
||||||
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"badgeo":"possible bad geo area format. Should be lower-left lon, lat, upper-right lon, lat",
|
|
||||||
"oauthbroke":"something in twitter oauth broke.",
|
|
||||||
"ratelimit":"tweet rate limit hit",
|
"ratelimit":"tweet rate limit hit",
|
||||||
"streamerror":"Stream error",
|
"streamerror":"stream error: __error__ (__rc__)",
|
||||||
"enexpectedend":"twitter ended unexpectedly",
|
"unexpectedend":"stream ended unexpectedly",
|
||||||
"truncated":"Tweet greater than 140 : truncated",
|
"invalidtag":"invalid tag property",
|
||||||
"nopayload":"No payload to tweet",
|
|
||||||
"invalidtag":"Invalid tag property",
|
|
||||||
"missingcredentials":"missing twitter credentials",
|
"missingcredentials":"missing twitter credentials",
|
||||||
"sendfail":"Send tweet failed",
|
"truncated":"truncated tweet greater than 140 characters",
|
||||||
"oautherror1": "<h2>Oh no!</h2>",
|
"sendfail":"send tweet failed: __error__",
|
||||||
"oautherror2": "<p>Something went wrong with the authentication process. The following error was returned:</p>",
|
"nopayload":"no payload to tweet",
|
||||||
"oautherror3": "<p><b>__statusCode__</b>: __errorData__</p>",
|
|
||||||
"oautherror4": "<p>One known cause of this type of failure is if the clock is wrong on system running Node-RED.",
|
"oauthbroke":"something in twitter oauth broke.",
|
||||||
"authorized": "<html><head></head><body>Authorised - you can close this window and return to Node-RED</body></html>"
|
"oautherror": "<html><head></head><body><p>Something went wrong with the authentication process. The following error was returned:</p><p><b>__statusCode__</b>: __errorData__</p><p>One known cause of this type of failure is if the clock is wrong on system running Node-RED</p></body></html>",
|
||||||
|
"authorized": "<html><head></head><body><p>Authorised - you can close this window and return to Node-RED</p></body></html>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<script type="text/x-red" data-template-name="tail">
|
<script type="text/x-red" data-template-name="tail">
|
||||||
<div class="form-row node-input-filename">
|
<div class="form-row node-input-filename">
|
||||||
<label for="node-input-filename"><i class="fa fa-file"></i> <span data-i18n="tail.label.filename"></span></label>
|
<label for="node-input-filename"><i class="fa fa-file"></i> <span data-i18n="tail.label.filename"></span></label>
|
||||||
<input type="text" id="node-input-filename" data-i18n="[placeholder]tail.label.filename">
|
<input type="text" id="node-input-filename">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label> </label>
|
<label> </label>
|
||||||
|
@ -17,14 +17,14 @@
|
|||||||
<script type="text/x-red" data-template-name="file">
|
<script type="text/x-red" data-template-name="file">
|
||||||
<div class="form-row node-input-filename">
|
<div class="form-row node-input-filename">
|
||||||
<label for="node-input-filename"><i class="fa fa-file"></i> <span data-i18n="file.label.filename"></span></label>
|
<label for="node-input-filename"><i class="fa fa-file"></i> <span data-i18n="file.label.filename"></span></label>
|
||||||
<input type="text" id="node-input-filename" data-i18n="[placeholder]file.label.filename">
|
<input type="text" id="node-input-filename">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-overwriteFile"><i class="fa fa-random"></i> <span data-i18n="file.label.action"></span></label>
|
<label for="node-input-overwriteFile"><i class="fa fa-random"></i> <span data-i18n="file.label.action"></span></label>
|
||||||
<select type="text" id="node-input-overwriteFile" style="display: inline-block; width: 250px; vertical-align: top;">
|
<select type="text" id="node-input-overwriteFile" style="display: inline-block; width: 250px; vertical-align: top;">
|
||||||
<option value="false" data-i18n="file.append"></option>
|
<option value="false" data-i18n="file.action.append"></option>
|
||||||
<option value="true" data-i18n="file.overwrite"></option>
|
<option value="true" data-i18n="file.action.overwrite"></option>
|
||||||
<option value="delete" data-i18n="file.delete"></option>
|
<option value="delete" data-i18n="file.action.delete"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row" id="node-appline">
|
<div class="form-row" id="node-appline">
|
||||||
@ -54,8 +54,8 @@
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-format"><i class="fa fa-sign-out"></i> <span data-i18n="file.label.outputas"></span></label>
|
<label for="node-input-format"><i class="fa fa-sign-out"></i> <span data-i18n="file.label.outputas"></span></label>
|
||||||
<select id="node-input-format">
|
<select id="node-input-format">
|
||||||
<option value="utf8" data-i18n="file.utf8"></option>
|
<option value="utf8" data-i18n="file.output.utf8"></option>
|
||||||
<option value="" data-i18n="file.buffer"></option>
|
<option value="" data-i18n="file.output.buffer"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -84,8 +84,11 @@
|
|||||||
icon: "file.png",
|
icon: "file.png",
|
||||||
align: "right",
|
align: "right",
|
||||||
label: function() {
|
label: function() {
|
||||||
if (this.overwriteFile === this._("file.label.deletelabel")) { return this.name||this._("file.label.deletelabel")+" "+this.filename; }
|
if (this.overwriteFile === "delete") {
|
||||||
else { return this.name||this.filename||this._("file.label.filelabel"); }
|
return this.name||this._("file.label.deletelabel",{file:this.filename})
|
||||||
|
} else {
|
||||||
|
return this.name||this.filename||this._("file.label.filelabel");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
labelStyle: function() {
|
labelStyle: function() {
|
||||||
return this.name?"node_label_italic":"";
|
return this.name?"node_label_italic":"";
|
||||||
|
@ -27,7 +27,7 @@ module.exports = function(RED) {
|
|||||||
this.on("input",function(msg) {
|
this.on("input",function(msg) {
|
||||||
var filename = this.filename || msg.filename || "";
|
var filename = this.filename || msg.filename || "";
|
||||||
if (msg.filename && n.filename && (n.filename !== msg.filename)) {
|
if (msg.filename && n.filename && (n.filename !== msg.filename)) {
|
||||||
node.warn(RED._("file.errors.nooverride"));
|
node.warn(RED._("common.errors.nooverride"));
|
||||||
}
|
}
|
||||||
if (!this.filename) {
|
if (!this.filename) {
|
||||||
node.status({fill:"grey",shape:"dot",text:filename});
|
node.status({fill:"grey",shape:"dot",text:filename});
|
||||||
@ -36,9 +36,6 @@ module.exports = function(RED) {
|
|||||||
node.warn(RED._("file.errors.nofilename"));
|
node.warn(RED._("file.errors.nofilename"));
|
||||||
} else if (msg.hasOwnProperty('delete')) { // remove warning at some point in future
|
} else if (msg.hasOwnProperty('delete')) { // remove warning at some point in future
|
||||||
node.warn(RED._("file.errors.invaliddelete"));
|
node.warn(RED._("file.errors.invaliddelete"));
|
||||||
//fs.unlink(filename, function (err) {
|
|
||||||
//if (err) { node.error(RED._("file.errors.deletefail")+' : '+err,msg); }
|
|
||||||
//});
|
|
||||||
} else if (msg.payload && (typeof msg.payload != "undefined")) {
|
} else if (msg.payload && (typeof msg.payload != "undefined")) {
|
||||||
var data = msg.payload;
|
var data = msg.payload;
|
||||||
if ((typeof data === "object")&&(!Buffer.isBuffer(data))) {
|
if ((typeof data === "object")&&(!Buffer.isBuffer(data))) {
|
||||||
@ -50,22 +47,22 @@ module.exports = function(RED) {
|
|||||||
// using "binary" not {encoding:"binary"} to be 0.8 compatible for a while
|
// using "binary" not {encoding:"binary"} to be 0.8 compatible for a while
|
||||||
//fs.writeFile(filename, data, {encoding:"binary"}, function (err) {
|
//fs.writeFile(filename, data, {encoding:"binary"}, function (err) {
|
||||||
fs.writeFile(filename, data, "binary", function (err) {
|
fs.writeFile(filename, data, "binary", function (err) {
|
||||||
if (err) { node.error(RED._("file.errors.writefail")+' : '+err,msg); }
|
if (err) { node.error(RED._("file.errors.writefail",{error:err}),msg); }
|
||||||
else if (RED.settings.verbose) { node.log(RED._("file.errors.wrotefile")+': '+filename); }
|
else if (RED.settings.verbose) { node.log(RED._("file.status.wrotefile",{file:filename})); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (this.overwriteFile === "delete") {
|
else if (this.overwriteFile === "delete") {
|
||||||
fs.unlink(filename, function (err) {
|
fs.unlink(filename, function (err) {
|
||||||
if (err) { node.error(RED._("file.errors.deletefail")+' : '+err,msg); }
|
if (err) { node.error(RED._("file.errors.deletefail",{error:err}),msg); }
|
||||||
else if (RED.settings.verbose) { node.log(RED._("file.errors.deletedfile")+": "+filename); }
|
else if (RED.settings.verbose) { node.log(RED._("file.status.deletedfile",{file:filename})); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// using "binary" not {encoding:"binary"} to be 0.8 compatible for a while longer
|
// using "binary" not {encoding:"binary"} to be 0.8 compatible for a while longer
|
||||||
//fs.appendFile(filename, data, {encoding:"binary"}, function (err) {
|
//fs.appendFile(filename, data, {encoding:"binary"}, function (err) {
|
||||||
fs.appendFile(filename, data, "binary", function (err) {
|
fs.appendFile(filename, data, "binary", function (err) {
|
||||||
if (err) { node.error(RED._("file.errors.appendfail")+' : '+err,msg); }
|
if (err) { node.error(RED._("file.errors.appendfail",{error:err}),msg); }
|
||||||
else if (RED.settings.verbose) { node.log(RED._("file.errors.appendedfile")+': '+filename); }
|
else if (RED.settings.verbose) { node.log(RED._("file.status.appendedfile",{file:filename})); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user