mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
More node i18n tidy-up
This commit is contained in:
@@ -109,16 +109,16 @@
|
||||
if (this.pauseType == "delay") {
|
||||
var units = this.timeoutUnits ? this.timeoutUnits.charAt(0) : "s";
|
||||
if (this.timeoutUnits == "milliseconds") { units = "ms"; }
|
||||
return this.name||this._("delay.delaylabel")+" "+this.timeout+" " + units;
|
||||
return this.name||this._("delay.label.delay")+" "+this.timeout+" " + units;
|
||||
} else if (this.pauseType == "rate") {
|
||||
var units = this.rateUnits ? this.rateUnits.charAt(0) : "s";
|
||||
return this.name||this._("delay.limitlabel")+" "+this.rate+" "+this._("delay.msgperlabel")+ units;
|
||||
return this.name||this._("delay.label.limit")+" "+this.rate+" msg/"+ units;
|
||||
} else if (this.pauseType == "random") {
|
||||
return this.name || this._("delay.randomlabel");
|
||||
return this.name || this._("delay.label.random");
|
||||
}
|
||||
else {
|
||||
var units = this.rateUnits ? this.rateUnits.charAt(0) : "s";
|
||||
return this.name || this._("delay.queuelabel") +this.rate+" "+this._("delay.msgperlabel")+ units;
|
||||
return this.name || this._("delay.label.queue") +this.rate+" msg/"+ units;
|
||||
}
|
||||
},
|
||||
labelStyle: function() { // sets the class to apply to the label
|
||||
|
@@ -104,7 +104,7 @@ module.exports = function(RED) {
|
||||
node.status({text:node.buffer.length});
|
||||
}
|
||||
if (node.buffer.length > 1000) {
|
||||
node.warn(this.name + " " + RED._("delay.buffererr"));
|
||||
node.warn(this.name + " " + RED._("delay.error.buffer"));
|
||||
}
|
||||
} else {
|
||||
node.send(msg);
|
||||
|
@@ -16,17 +16,17 @@
|
||||
|
||||
<script type="text/x-red" data-template-name="comment">
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-comment"></i> <span data-i18n="comment.title"></span></label>
|
||||
<input type="text" id="node-input-name" data-i18n="[placeholder]comment.comment">
|
||||
<label for="node-input-name"><i class="fa fa-comment"></i> <span data-i18n="comment.label.title"></span></label>
|
||||
<input type="text" id="node-input-name">
|
||||
</div>
|
||||
<div class="form-row" style="margin-bottom: 0px;">
|
||||
<label for="node-input-info" style="width: 100% !important;"><i class="fa fa-comments"></i> <span data-i18n="comment.body"></span></label>
|
||||
<label for="node-input-info" style="width: 100% !important;"><i class="fa fa-comments"></i> <span data-i18n="comment.label.body"></span></label>
|
||||
<input type="hidden" id="node-input-info" autofocus="autofocus">
|
||||
</div>
|
||||
<div class="form-row node-text-editor-row">
|
||||
<div style="height: 250px;" class="node-text-editor" id="node-input-info-editor" ></div>
|
||||
<div style="height: 250px;" class="node-text-editor" id="node-input-info-editor"></div>
|
||||
</div>
|
||||
<div class="form-tips"><span data-i18n="comment.tip1"></span><i><a href="https://help.github.com/articles/markdown-basics/" target="_new"><span data-i18n="comment.tip2"></span></a></i></div>
|
||||
<div class="form-tips" data-i18n="[html]comment.tip"></div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="comment">
|
||||
@@ -51,8 +51,8 @@
|
||||
return this.name?"node_label_italic":"";
|
||||
},
|
||||
info: function() {
|
||||
var t = this.name || this._("comment.commentnode");
|
||||
var b = this.info || this._("comment.commentinfo");
|
||||
var t = this.name || this._("comment.defaulttitle");
|
||||
var b = this.info || this._("comment.defaultinfo");
|
||||
return "### "+t+"\n"+b;
|
||||
},
|
||||
oneditprepare: function() {
|
||||
|
@@ -39,7 +39,7 @@
|
||||
outputs:1,
|
||||
icon: "",
|
||||
label: function() {
|
||||
return "("+this.name+")"||this._("unknown.label.unknownlabel");
|
||||
return "("+this.name+")"||this._("unknown.label.unknown");
|
||||
},
|
||||
labelStyle: function() {
|
||||
return "node_label_unknown";
|
||||
|
Reference in New Issue
Block a user