russian translate (#962)

add support internalization and russian translate.
This commit is contained in:
dodther
2023-03-21 20:20:23 +10:00
committed by GitHub
parent a55be34bc0
commit a14ef95fb3
5 changed files with 124 additions and 43 deletions

View File

@@ -49,8 +49,8 @@ module.exports = function(RED) {
var msg = {payload:0, topic:"sun", sun:sun, moon:moon, start:s1, end:s2, now:now};
if ((e1 > 0) & (e2 < 0)) { msg.payload = 1; }
if (oldval == null) { oldval = msg.payload; }
if (msg.payload == 1) { node.status({fill:"yellow",shape:"dot",text:"day"}); }
else { node.status({fill:"blue",shape:"dot",text:"night"}); }
if (msg.payload == 1) { node.status({fill:"yellow",shape:"dot",text:"sunrise.dayState"}); }
else { node.status({fill:"blue",shape:"dot",text:"sunrise.nightState"}); }
if (msg.payload != oldval) {
oldval = msg.payload;
node.send([msg,msg]);