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">
|
||||
<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;">
|
||||
<option value="tri" data-i18n="rpi-gpio.none"></option>
|
||||
<option value="up" data-i18n="rpi-gpio.pullup"></option>
|
||||
<option value="down" data-i18n="rpi-gpio.pulldown"></option>
|
||||
<option value="tri" data-i18n="rpi-gpio.registor.none"></option>
|
||||
<option value="up" data-i18n="rpi-gpio.registor.pullup"></option>
|
||||
<option value="down" data-i18n="rpi-gpio.registor.pulldown"></option>
|
||||
</select>
|
||||
</div>
|
||||
<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>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
||||
</div>
|
||||
<div class="form-tips" id="pin-tip"><span data-i18n="[html]rpi-gpio.pin-tip"></span></div>
|
||||
<div class="form-tips"><span data-i18n="[html]rpi-gpio.in-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.tip.in"></span></div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="rpi-gpio in">
|
||||
@ -97,7 +97,7 @@
|
||||
},
|
||||
oneditprepare: function() {
|
||||
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 alreadyuse = this._("rpi-gpio.alreadyuse");
|
||||
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>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
|
||||
</div>
|
||||
<div class="form-tips" id="pin-tip"><span data-i18n="[html]rpi-gpio.pin-tip"></span></div>
|
||||
<div class="form-tips" id="dig-tip"><span data-i18n="[html]rpi-gpio.dig-tip"></span></div>
|
||||
<div class="form-tips" id="pwm-tip"><span data-i18n="[html]rpi-gpio.pwm-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.tip.dig"></span></div>
|
||||
<div class="form-tips" id="pwm-tip"><span data-i18n="[html]rpi-gpio.tip.pwm"></span></div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="rpi-gpio out">
|
||||
@ -238,7 +238,7 @@
|
||||
},
|
||||
oneditprepare: function() {
|
||||
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 alreadyuse = this._("rpi-gpio.alreadyuse");
|
||||
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]) )) {
|
||||
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");
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ module.exports = function(RED) {
|
||||
process.env.PYTHONUNBUFFERED = 1;
|
||||
|
||||
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) {
|
||||
RED.nodes.createNode(this,n);
|
||||
@ -56,7 +56,7 @@ module.exports = function(RED) {
|
||||
}
|
||||
else {
|
||||
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) {
|
||||
if (err.errno === "ENOENT") { node.error(RED._("rpi-gpio.errors.commandnotfound")); }
|
||||
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 {
|
||||
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")});
|
||||
var url = nodeUrl || msg.url;
|
||||
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) {
|
||||
url = mustache.render(nodeUrl,msg);
|
||||
|
@ -23,15 +23,11 @@
|
||||
"not-running": "not running",
|
||||
"sending": "sending",
|
||||
"sendfail": "send failed",
|
||||
"fetching": "fetching",
|
||||
"foldererror": "fetch folder error",
|
||||
"messageerror": "fetch message error",
|
||||
"connecterror": "connect error",
|
||||
"neterror": "net error",
|
||||
"joined": "joined",
|
||||
"quit": "quit",
|
||||
"noconnection": "no connection",
|
||||
"tweeting": "tweeting",
|
||||
"failed": "failed"
|
||||
},
|
||||
"notification": {
|
||||
@ -41,6 +37,9 @@
|
||||
"no-response": "no response from server",
|
||||
"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": {
|
||||
@ -232,7 +231,6 @@
|
||||
"errors": {
|
||||
"not-created": "Cannot create http-in node when httpNodeRoot set to false",
|
||||
"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",
|
||||
"no-url": "No url specified"
|
||||
}
|
||||
@ -552,9 +550,7 @@
|
||||
}
|
||||
},
|
||||
"arduino": {
|
||||
"arduino": "arduino",
|
||||
"label": {
|
||||
"arduino": "Arduino",
|
||||
"pin": "Pin",
|
||||
"type": "Type",
|
||||
"port": "Port"
|
||||
@ -562,13 +558,6 @@
|
||||
"placeholder": {
|
||||
"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": {
|
||||
"connectfirst": "connecting to first board found",
|
||||
"connect": "connecting to __device__",
|
||||
@ -576,13 +565,27 @@
|
||||
"version": "version: __version__",
|
||||
"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": {
|
||||
"portnotconf": "port not configured",
|
||||
"devnotfound": "device __dev__ not found. Trying to find board."
|
||||
}
|
||||
},
|
||||
"rpi-gpio": {
|
||||
"rpi-gpio": "rpi-gpio",
|
||||
"label": {
|
||||
"gpiopin": "GPIO Pin",
|
||||
"selectpin": "select pin",
|
||||
@ -596,9 +599,11 @@
|
||||
"right": "Right",
|
||||
"middle": "Middle"
|
||||
},
|
||||
"none": "none",
|
||||
"pullup": "pullup",
|
||||
"pulldown": "pulldown",
|
||||
"registor": {
|
||||
"none": "none",
|
||||
"pullup": "pullup",
|
||||
"pulldown": "pulldown"
|
||||
},
|
||||
"digout": "Digital output",
|
||||
"pwmout": "PWM output",
|
||||
"initpin0": "initial level of pin - low (0)",
|
||||
@ -610,30 +615,33 @@
|
||||
"pinname": "Pin",
|
||||
"alreadyuse": "already in use",
|
||||
"alreadyset": "already set as",
|
||||
"pin-tip": "<b>Pins in Use</b>: ",
|
||||
"in-tip": "Tip: Only Digital Input is supported - input must be 0 or 1.",
|
||||
"dig-tip": "<b>Tip</b>: For digital output - input must be 0 or 1.",
|
||||
"pwm-tip": "<b>Tip</b>: For PWM output - input must be between 0 and 100.",
|
||||
"errors": {
|
||||
"tip": {
|
||||
"pin": "<b>Pins in Use</b>: ",
|
||||
"in": "Tip: Only Digital Input is supported - input must be 0 or 1.",
|
||||
"dig": "<b>Tip</b>: For digital output - input must be 0 or 1.",
|
||||
"pwm": "<b>Tip</b>: For PWM output - input must be between 0 to 100."
|
||||
},
|
||||
"types": {
|
||||
"digout": "digital output",
|
||||
"input": "input",
|
||||
"pullup": "input with pull up",
|
||||
"pulldown": "input with pull down",
|
||||
"pwmout": "PWM output",
|
||||
"ignorenode": "Ignoring Raspberry Pi specific node.",
|
||||
"pwmout": "PWM output"
|
||||
},
|
||||
"errors": {
|
||||
"ignorenode": "Ignoring Raspberry Pi specific node",
|
||||
"closed": "closed",
|
||||
"version": "Version command failed for some reason.",
|
||||
"version": "Version command failed",
|
||||
"sawpitype": "Saw Pi Type",
|
||||
"libnotfound": "Can't find Pi RPi.GPIO python library.",
|
||||
"gpiopin": "GPIO pin",
|
||||
"alreadyset": "already set as",
|
||||
"libnotfound": "Cannot find Pi RPi.GPIO python library",
|
||||
"alreadyset": "GPIO pin __pin__ already set as type: __type__",
|
||||
"invalidpin": "Invalid GPIO pin",
|
||||
"invalidinput": "Invalid input",
|
||||
"needtobeexecutable": "needs to be executable.",
|
||||
"mustbeexecutable": "nrgpio must to be executable.",
|
||||
"needtobeexecutable": "__command__ needs to be executable",
|
||||
"mustbeexecutable": "nrgpio must to be executable",
|
||||
"commandnotfound": "nrgpio command not found",
|
||||
"commandnotexecutable": "nrgpio command not executable",
|
||||
"error": "error",
|
||||
"error": "error: __error__",
|
||||
"pythoncommandnotfound": "nrpgio python command not running"
|
||||
}
|
||||
},
|
||||
@ -641,39 +649,42 @@
|
||||
"tail": "tail",
|
||||
"label": {
|
||||
"filename": "Filename",
|
||||
"filenameph": "filename",
|
||||
"splitlines": "Split lines if we see \\n?"
|
||||
"splitlines": "Split lines on \\n?"
|
||||
},
|
||||
"errors": {
|
||||
"windowsnotsupport": "Info : Currently not supported on Windows."
|
||||
"windowsnotsupport": "Not currently supported on Windows."
|
||||
}
|
||||
},
|
||||
"file": {
|
||||
"file": "file",
|
||||
"label": {
|
||||
"filename": "Filename",
|
||||
"filenameph": "filename",
|
||||
"action": "Action",
|
||||
"addnewline": "Add newline (\\n) to each payload?",
|
||||
"outputas": "Ourput as",
|
||||
"outputas": "Output as",
|
||||
"filelabel": "file",
|
||||
"deletelabel": "delete"
|
||||
"deletelabel": "delete __file__"
|
||||
},
|
||||
"action": {
|
||||
"append": "append to file",
|
||||
"overwrite": "overwrite file",
|
||||
"delete": "delete file"
|
||||
},
|
||||
"output": {
|
||||
"utf8": "a utf8 string",
|
||||
"buffer": "a Buffer"
|
||||
},
|
||||
"status": {
|
||||
"wrotefile": "wrote to file: __file__",
|
||||
"deletedfile": "deleted file: __file__",
|
||||
"appendedfile": "appended to file: __file__"
|
||||
},
|
||||
"append": "append to file",
|
||||
"overwrite": "overwrite file",
|
||||
"delete": "delete file",
|
||||
"utf8": "a utf8 string",
|
||||
"buffer": "a Buffer",
|
||||
"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",
|
||||
"invaliddelete": "Warning: Invalid delete. Please use specific delete option in config dialog.",
|
||||
"deletefail": "failed to delete file",
|
||||
"writefail": "failed to write to file",
|
||||
"appendfail": "failed to append to file"
|
||||
"deletefail": "failed to delete file: __error__",
|
||||
"writefail": "failed to write to file: __error__",
|
||||
"appendfail": "failed to append to file: __error__"
|
||||
}
|
||||
},
|
||||
"redisout": {
|
||||
@ -682,16 +693,16 @@
|
||||
"host": "Host",
|
||||
"port": "Port",
|
||||
"key": "Key",
|
||||
"keyph": "Redis Key",
|
||||
"type": "Type"
|
||||
},
|
||||
"string": "String",
|
||||
"hash": "Hash",
|
||||
"set": "Set",
|
||||
"list": "List",
|
||||
"type": {
|
||||
"string": "String",
|
||||
"hash": "Hash",
|
||||
"set": "Set",
|
||||
"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.",
|
||||
"errors": {
|
||||
"connectedto": "connected to",
|
||||
"invalidpayload": "Invalid payload for redis hash",
|
||||
"nokey": "No key or topic set"
|
||||
}
|
||||
@ -706,19 +717,20 @@
|
||||
"password": "Password",
|
||||
"server": "Server",
|
||||
"collection": "Collection",
|
||||
"collectionph": "collection",
|
||||
"operation": "Operation",
|
||||
"onlystore": "Only store msg.payload object",
|
||||
"createnew": "Create a new document if no match found",
|
||||
"updateall": "Update all matching documents"
|
||||
},
|
||||
"save": "save",
|
||||
"insert": "insert",
|
||||
"update": "update",
|
||||
"remove": "remove",
|
||||
"find": "find",
|
||||
"count": "count",
|
||||
"aggregate": "aggregate",
|
||||
"operation": {
|
||||
"save": "save",
|
||||
"insert": "insert",
|
||||
"update": "update",
|
||||
"remove": "remove",
|
||||
"find": "find",
|
||||
"count": "count",
|
||||
"aggregate": "aggregate"
|
||||
},
|
||||
"tip": "<b> Tip:</b> If no collection is set, ensure <b>msg.collection</b> will contain the collection name",
|
||||
"errors": {
|
||||
"nocollection": "No collection defined",
|
||||
@ -729,9 +741,8 @@
|
||||
"feedparse": "feedparse",
|
||||
"label": {
|
||||
"feedurl": "Feed url",
|
||||
"repeat": "Repeat",
|
||||
"repeatph": "minutes",
|
||||
"min": "(M)"
|
||||
"refresh": "Refresh",
|
||||
"minutes": "minutes"
|
||||
},
|
||||
"errors": {
|
||||
"badstatuscode": "error - Bad status code",
|
||||
@ -739,46 +750,49 @@
|
||||
}
|
||||
},
|
||||
"email": {
|
||||
"email": "email",
|
||||
"label": {
|
||||
"to": "To",
|
||||
"server": "Server",
|
||||
"port": "Port",
|
||||
"userid": "Userid",
|
||||
"password": "Password",
|
||||
"repeat": "Check Repeat (S)",
|
||||
"repeat": "Refresh",
|
||||
"seconds": "seconds",
|
||||
"folder": "Folder"
|
||||
},
|
||||
"inbox": "IIINBOX",
|
||||
"cred-tip": "<b>Note:</b> Copied credentials from global emailkeys.js file.",
|
||||
"recent-tip": "Tip: <b>ONLY</b> retrieves the single most recent email.",
|
||||
"errors": {
|
||||
"messagesent": "Message sent",
|
||||
"repeat": "repeat",
|
||||
"message": "message",
|
||||
"finished": "Finished",
|
||||
"newemail": "received new email",
|
||||
"duplicate": "duplicate not sent",
|
||||
"inboxzero": "you have achieved inbox zero",
|
||||
"error": "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",
|
||||
|
||||
"default-message": "Your file from Node-RED is attached: __filename__ __description__",
|
||||
|
||||
|
||||
"tip": {
|
||||
"cred": "<b>Note:</b> Copied credentials from global emailkeys.js file.",
|
||||
"recent": "Tip: Only retrieves the single most recent email."
|
||||
},
|
||||
"status": {
|
||||
"messagesent": "Message sent: __response__",
|
||||
"fetching": "fetching",
|
||||
"foldererror": "fetch folder 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",
|
||||
"nopassword": "No e-mail password set",
|
||||
"fetchfail": "Failed to fetch folder",
|
||||
"yourfile": "Your file from Node-RED is attached"
|
||||
"nocredentials": "No Email credentials found. See info panel.",
|
||||
"nopayload": "No payload to send",
|
||||
"fetchfail": "Failed to fetch folder: __folder__",
|
||||
"messageerror": "Fetch message error: __error__"
|
||||
}
|
||||
},
|
||||
"irc": {
|
||||
"irc": "irc",
|
||||
"label": {
|
||||
"ircserver": "IRC Server",
|
||||
"channel": "Channel",
|
||||
"action": "Action",
|
||||
"port": "Port",
|
||||
"portph": "port",
|
||||
"ssl": "Use Secure SSL connection?",
|
||||
"self": "Allow self-signed certificates?",
|
||||
"nickname": "Nickname"
|
||||
@ -786,8 +800,10 @@
|
||||
"payload": "Send payload to channel(s)",
|
||||
"topic": "Use msg.topic to set nickname or 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.",
|
||||
"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.",
|
||||
"tip": {
|
||||
"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": {
|
||||
"connect": "CONNECT",
|
||||
"err": "ERR",
|
||||
@ -811,39 +827,43 @@
|
||||
"twitter": {
|
||||
"twitter": "twitter",
|
||||
"label": {
|
||||
"loginas": "Log in as",
|
||||
"twitter-id":"Twitter ID",
|
||||
"search": "Search",
|
||||
"for": "for",
|
||||
"forph": "comma-separated words, @ids, #tags",
|
||||
"user": "User",
|
||||
"userph": "comma-separated @twitter handles",
|
||||
"dmslabel": "DMs",
|
||||
"tweetslabel": "tweets",
|
||||
"twitter": "Twitter",
|
||||
"clickhere": "Click here to authenticate with Twitter.",
|
||||
"twitterid": "Twitter ID"
|
||||
"clickhere": "Click here to authenticate with Twitter."
|
||||
},
|
||||
"placeholder": {
|
||||
"for": "comma-separated words, @ids, #tags",
|
||||
"user": "comma-separated @twitter handles"
|
||||
},
|
||||
"search": {
|
||||
"public": "all public tweets",
|
||||
"follow": "the tweets of who you follow",
|
||||
"user": "the tweets of specific users",
|
||||
"direct": "your direct messages"
|
||||
},
|
||||
"public": "all public tweets",
|
||||
"follow": "the tweets of who you follow",
|
||||
"user": "the tweets of specific users",
|
||||
"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.",
|
||||
"status": {
|
||||
"using-geo": "Using geo location: __location__",
|
||||
"tweeting": "tweeting",
|
||||
"failed":"failed"
|
||||
},
|
||||
"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",
|
||||
"streamerror":"Stream error",
|
||||
"enexpectedend":"twitter ended unexpectedly",
|
||||
"truncated":"Tweet greater than 140 : truncated",
|
||||
"nopayload":"No payload to tweet",
|
||||
"invalidtag":"Invalid tag property",
|
||||
"streamerror":"stream error: __error__ (__rc__)",
|
||||
"unexpectedend":"stream ended unexpectedly",
|
||||
"invalidtag":"invalid tag property",
|
||||
"missingcredentials":"missing twitter credentials",
|
||||
"sendfail":"Send tweet failed",
|
||||
"oautherror1": "<h2>Oh no!</h2>",
|
||||
"oautherror2": "<p>Something went wrong with the authentication process. The following error was returned:</p>",
|
||||
"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.",
|
||||
"authorized": "<html><head></head><body>Authorised - you can close this window and return to Node-RED</body></html>"
|
||||
"truncated":"truncated tweet greater than 140 characters",
|
||||
"sendfail":"send tweet failed: __error__",
|
||||
"nopayload":"no payload to tweet",
|
||||
|
||||
"oauthbroke":"something in twitter oauth broke.",
|
||||
"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">
|
||||
<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>
|
||||
<input type="text" id="node-input-filename" data-i18n="[placeholder]tail.label.filename">
|
||||
<input type="text" id="node-input-filename">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label> </label>
|
||||
|
@ -17,14 +17,14 @@
|
||||
<script type="text/x-red" data-template-name="file">
|
||||
<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>
|
||||
<input type="text" id="node-input-filename" data-i18n="[placeholder]file.label.filename">
|
||||
<input type="text" id="node-input-filename">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<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;">
|
||||
<option value="false" data-i18n="file.append"></option>
|
||||
<option value="true" data-i18n="file.overwrite"></option>
|
||||
<option value="delete" data-i18n="file.delete"></option>
|
||||
<option value="false" data-i18n="file.action.append"></option>
|
||||
<option value="true" data-i18n="file.action.overwrite"></option>
|
||||
<option value="delete" data-i18n="file.action.delete"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row" id="node-appline">
|
||||
@ -54,8 +54,8 @@
|
||||
<div class="form-row">
|
||||
<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">
|
||||
<option value="utf8" data-i18n="file.utf8"></option>
|
||||
<option value="" data-i18n="file.buffer"></option>
|
||||
<option value="utf8" data-i18n="file.output.utf8"></option>
|
||||
<option value="" data-i18n="file.output.buffer"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@ -84,8 +84,11 @@
|
||||
icon: "file.png",
|
||||
align: "right",
|
||||
label: function() {
|
||||
if (this.overwriteFile === this._("file.label.deletelabel")) { return this.name||this._("file.label.deletelabel")+" "+this.filename; }
|
||||
else { return this.name||this.filename||this._("file.label.filelabel"); }
|
||||
if (this.overwriteFile === "delete") {
|
||||
return this.name||this._("file.label.deletelabel",{file:this.filename})
|
||||
} else {
|
||||
return this.name||this.filename||this._("file.label.filelabel");
|
||||
}
|
||||
},
|
||||
labelStyle: function() {
|
||||
return this.name?"node_label_italic":"";
|
||||
|
@ -27,7 +27,7 @@ module.exports = function(RED) {
|
||||
this.on("input",function(msg) {
|
||||
var filename = this.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) {
|
||||
node.status({fill:"grey",shape:"dot",text:filename});
|
||||
@ -36,9 +36,6 @@ module.exports = function(RED) {
|
||||
node.warn(RED._("file.errors.nofilename"));
|
||||
} else if (msg.hasOwnProperty('delete')) { // remove warning at some point in future
|
||||
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")) {
|
||||
var data = msg.payload;
|
||||
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
|
||||
//fs.writeFile(filename, data, {encoding:"binary"}, function (err) {
|
||||
fs.writeFile(filename, data, "binary", function (err) {
|
||||
if (err) { node.error(RED._("file.errors.writefail")+' : '+err,msg); }
|
||||
else if (RED.settings.verbose) { node.log(RED._("file.errors.wrotefile")+': '+filename); }
|
||||
if (err) { node.error(RED._("file.errors.writefail",{error:err}),msg); }
|
||||
else if (RED.settings.verbose) { node.log(RED._("file.status.wrotefile",{file:filename})); }
|
||||
});
|
||||
}
|
||||
else if (this.overwriteFile === "delete") {
|
||||
fs.unlink(filename, function (err) {
|
||||
if (err) { node.error(RED._("file.errors.deletefail")+' : '+err,msg); }
|
||||
else if (RED.settings.verbose) { node.log(RED._("file.errors.deletedfile")+": "+filename); }
|
||||
if (err) { node.error(RED._("file.errors.deletefail",{error:err}),msg); }
|
||||
else if (RED.settings.verbose) { node.log(RED._("file.status.deletedfile",{file:filename})); }
|
||||
});
|
||||
}
|
||||
else {
|
||||
// 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, "binary", function (err) {
|
||||
if (err) { node.error(RED._("file.errors.appendfail")+' : '+err,msg); }
|
||||
else if (RED.settings.verbose) { node.log(RED._("file.errors.appendedfile")+': '+filename); }
|
||||
if (err) { node.error(RED._("file.errors.appendfail",{error:err}),msg); }
|
||||
else if (RED.settings.verbose) { node.log(RED._("file.status.appendedfile",{file:filename})); }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user