1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Add and remove namespaces for i18n (#627)

* Add necessary name spaces for i18n

* Remove unnecessary name spaces for i18n
This commit is contained in:
Kazuhito Yokoi 2020-04-04 06:12:22 +09:00 committed by GitHub
parent 9b1eeb2756
commit 7c759e10dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -173,8 +173,8 @@
<label for="node-input-read" style="width:70%;"><span data-i18n="rpi-gpio.label.readinitial"></span></label> <label for="node-input-read" style="width:70%;"><span data-i18n="rpi-gpio.label.readinitial"></span></label>
</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="node-red: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]node-red:common.label.name">
</div> </div>
<div class="form-tips" id="pin-tip"><span data-i18n="[html]rpi-gpio.tip.pin"></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> <div class="form-tips"><span data-i18n="[html]rpi-gpio.tip.in"></span></div>
@ -366,8 +366,8 @@
<input type="text" id="node-input-freq" placeholder="100"> Hz <input type="text" id="node-input-freq" placeholder="100"> Hz
</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="node-red: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]node-red:common.label.name">
</div> </div>
<div class="form-tips" id="pin-tip"><span data-i18n="[html]rpi-gpio.tip.pin"></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="dig-tip"><span data-i18n="[html]rpi-gpio.tip.dig"></span></div>
@ -497,8 +497,8 @@
</div> </div>
<br/> <br/>
<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="node-red: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]node-red:common.label.name">
</div> </div>
</script> </script>
@ -528,8 +528,8 @@
<script type="text/html" data-template-name="rpi-keyboard"> <script type="text/html" data-template-name="rpi-keyboard">
<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="node-red: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]node-red:common.label.name">
</div> </div>
</script> </script>

View File

@ -87,7 +87,7 @@ module.exports = function(RED) {
} }
} }
else { else {
node.status({fill:"grey",shape:"dot",text:"node-red:rpi-gpio.status.not-available"}); node.status({fill:"grey",shape:"dot",text:"rpi-gpio.status.not-available"});
if (node.read === true) { if (node.read === true) {
var val; var val;
if (node.intype == "up") { val = 1; } if (node.intype == "up") { val = 1; }
@ -193,7 +193,7 @@ module.exports = function(RED) {
} }
} }
else { else {
node.status({fill:"grey",shape:"dot",text:"node-red:rpi-gpio.status.not-available"}); node.status({fill:"grey",shape:"dot",text:"rpi-gpio.status.not-available"});
node.on("input", function(msg) { node.on("input", function(msg) {
node.status({fill:"grey",shape:"dot",text:RED._("rpi-gpio.status.na",{value:msg.payload.toString()})}); node.status({fill:"grey",shape:"dot",text:RED._("rpi-gpio.status.na",{value:msg.payload.toString()})});
}); });
@ -260,7 +260,7 @@ module.exports = function(RED) {
}); });
} }
else { else {
node.status({fill:"grey",shape:"dot",text:"node-red:rpi-gpio.status.not-available"}); node.status({fill:"grey",shape:"dot",text:"rpi-gpio.status.not-available"});
} }
} }
RED.nodes.registerType("rpi-mouse",PiMouseNode); RED.nodes.registerType("rpi-mouse",PiMouseNode);
@ -313,7 +313,7 @@ module.exports = function(RED) {
}); });
} }
else { else {
node.status({fill:"grey",shape:"dot",text:"node-red:rpi-gpio.status.not-available"}); node.status({fill:"grey",shape:"dot",text:"rpi-gpio.status.not-available"});
} }
} }
RED.nodes.registerType("rpi-keyboard",PiKeyboardNode); RED.nodes.registerType("rpi-keyboard",PiKeyboardNode);