jensrossbach / node-red-contrib-chronos

Time-based Node-RED scheduling, repeating, queueing, routing, filtering and manipulating nodes
https://jensrossbach.github.io/node-red-contrib-chronos
MIT License
28 stars 1 forks source link

Scheduler node: time portion of status text showing as German #179

Closed zachowj closed 1 month ago

zachowj commented 1 month ago

Describe the bug

When using the "time of day" event for the scheduler node. The status text of the node shows German for the time section and English for the "next event" section when the browser default locale is set to English.

It does show English correctly when the "sun/moon position" is selected.

To reproduce screenshots show setup

Expected behavior To show English for both when the browser locale is set to English.

Screenshots

image

image

image

Context information Please complete the following information.

Additional information

jensrossbach commented 1 month ago

There's not much I can do about this. The status text contains a static part (e.g., "next event") which is translated using the Node-RED translation functionality and a dynamic part (the time part) which is translated by the moment library. The latter always uses the configured language of the backend (i.e., either the configured language of the Node-RED runtime from settings.js or - if nothing is configured there - the configured language of the operating system). The translation of the static part via Node-RED seems to use the configured language of the editor (i.e., the setting that you configure in the browser). However, this doesn't seem to be consistent, I've also seen different behavior of Node-RED here.

Hint: Ensure that the language configured in the Node-RED editor and in the Node-RED runtime match, then these effects shouldn't occur.

Here are some related topics: https://discourse.nodered.org/t/node-status-translation/49907 https://discourse.nodered.org/t/feature-request-node-status-translation-context/80368

jensrossbach commented 1 month ago

Sorry, I missed the part with the inconsistency between time of day and sun or moon time. So I made more tests and were able to reproduce the issue. I found a small bug that I will correct in a new patch release.

jensrossbach commented 1 month ago

Should be solved with release 1.25.1.