You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When language set to "Norwegian Bokmål" on the user profile, the card crashes due to unkown language code "no". If I change it to English the card works as expected.
To Reproduce
Click on your name in left menu and change to language "Norwegian Bokmål". Go back to the view where you have added the card and you will see that it doesn't render. In developer tools, you will find this:
Uncaught (in promise) Error: No language undefined.
doHumanization sun-card.js:452
humanize sun-card.js:452
renderDaylight sun-card.js:700
render sun-card.js:620
update sun-card.js:186
update sun-card.js:616
performUpdate sun-card.js:148
_enqueueUpdate sun-card.js:148
_requestUpdate sun-card.js:148
initialize sun-card.js:148
initialize sun-card.js:186
J sun-card.js:148
ne sun-card.js:186
a sun-card.js:616
createElement ute:1
s chunk.c136a66895309b59c3fe.js:13138
d chunk.c136a66895309b59c3fe.js:13138
d chunk.c136a66895309b59c3fe.js:13138
l chunk.c136a66895309b59c3fe.js:13138
Vt chunk.c136a66895309b59c3fe.js:12159
value chunk.c136a66895309b59c3fe.js:23707
value chunk.c136a66895309b59c3fe.js:24142
value chunk.c136a66895309b59c3fe.js:23707
n app.664a8247.js:1
d chunk.c136a66895309b59c3fe.js:13138
sun-card.js:452:212500
_enqueueUpdate sun-card.js:148
InterpretGeneratorResume self-hosted:1478
AsyncFunctionNext self-hosted:684
(Async: async)
_requestUpdate sun-card.js:148
initialize sun-card.js:148
initialize sun-card.js:186
J sun-card.js:148
ne sun-card.js:186
a sun-card.js:616
createElement ute:1
s chunk.c136a66895309b59c3fe.js:13138
d chunk.c136a66895309b59c3fe.js:13138
d chunk.c136a66895309b59c3fe.js:13138
l chunk.c136a66895309b59c3fe.js:13138
Vt chunk.c136a66895309b59c3fe.js:12159
value chunk.c136a66895309b59c3fe.js:23707
value chunk.c136a66895309b59c3fe.js:24142
value chunk.c136a66895309b59c3fe.js:23707
n app.664a8247.js:1
d chunk.c136a66895309b59c3fe.js:13138
Expected behavior
Fallback to a defined language if the card stumbles upon a unknown language. I would guess english is a good default language.
Desktop (please complete the following information):
OS: Windows 10
Browser Firefox
Version 80.0.1
Additional context
If given pointers to where I should add translations for "no" I can submit a PR
The text was updated successfully, but these errors were encountered:
More information; hardcoding 'no' as language in the .js file the card works (humanize-duration-ts supports Norwegian) and displays norwegian for sunset and the length of day.
I would therefore suspect that this line is not picking up the language code correctly for some reason:
Describe the bug
When language set to "Norwegian Bokmål" on the user profile, the card crashes due to unkown language code "no". If I change it to English the card works as expected.
To Reproduce
Click on your name in left menu and change to language "Norwegian Bokmål". Go back to the view where you have added the card and you will see that it doesn't render. In developer tools, you will find this:
Uncaught (in promise) Error: No language undefined.
doHumanization sun-card.js:452
humanize sun-card.js:452
renderDaylight sun-card.js:700
render sun-card.js:620
update sun-card.js:186
update sun-card.js:616
performUpdate sun-card.js:148
_enqueueUpdate sun-card.js:148
_requestUpdate sun-card.js:148
initialize sun-card.js:148
initialize sun-card.js:186
J sun-card.js:148
ne sun-card.js:186
a sun-card.js:616
createElement ute:1
s chunk.c136a66895309b59c3fe.js:13138
d chunk.c136a66895309b59c3fe.js:13138
d chunk.c136a66895309b59c3fe.js:13138
l chunk.c136a66895309b59c3fe.js:13138
Vt chunk.c136a66895309b59c3fe.js:12159
value chunk.c136a66895309b59c3fe.js:23707
value chunk.c136a66895309b59c3fe.js:24142
value chunk.c136a66895309b59c3fe.js:23707
n app.664a8247.js:1
d chunk.c136a66895309b59c3fe.js:13138
sun-card.js:452:212500
_enqueueUpdate sun-card.js:148
InterpretGeneratorResume self-hosted:1478
AsyncFunctionNext self-hosted:684
(Async: async)
_requestUpdate sun-card.js:148
initialize sun-card.js:148
initialize sun-card.js:186
J sun-card.js:148
ne sun-card.js:186
a sun-card.js:616
createElement ute:1
s chunk.c136a66895309b59c3fe.js:13138
d chunk.c136a66895309b59c3fe.js:13138
d chunk.c136a66895309b59c3fe.js:13138
l chunk.c136a66895309b59c3fe.js:13138
Vt chunk.c136a66895309b59c3fe.js:12159
value chunk.c136a66895309b59c3fe.js:23707
value chunk.c136a66895309b59c3fe.js:24142
value chunk.c136a66895309b59c3fe.js:23707
n app.664a8247.js:1
d chunk.c136a66895309b59c3fe.js:13138
Expected behavior
Fallback to a defined language if the card stumbles upon a unknown language. I would guess english is a good default language.
Desktop (please complete the following information):
Additional context
If given pointers to where I should add translations for "no" I can submit a PR
The text was updated successfully, but these errors were encountered: