matopeto / kindle-weather-dashboard

194 stars 36 forks source link

Wrong day of the week and month in Spanish locale #24

Open sartalp opened 2 months ago

sartalp commented 2 months ago

I've just found this project and it's really wonderful to repurpose my old Kindle 5 (KT2).

However, as I set the locale to Spanish, the day of the week and the month in the bottom are wrong. I've looked at the code and the moment-with-locales file seems to be OK though?

On the bottom of the Kindle it shows: "st, 17. júl 2024" but it should show: "mi, 17 jul 2024".

Thanks!

sartalp commented 2 months ago

Update: changing the locale in the URL from sp to es did the trick, but now the text doesn't fit, overlapping the moon phase and the sunrise.

It shows mi, 17 de jul. de 2024 which is far too long. It's not uncommon in Spanish to get rid of the "de" when writing a date, especially if the month has been abbreviated, like here. That could be a possible solution. I'm not hosting my server so I would ask to update the source. Thanks again!

matopeto commented 2 months ago

Hi,

thank you for the report and investigation

Update: changing the locale in the URL from sp to es did the trick

Good catch :) I will compare Moment and OWM language codes and and will try to fix the problem for all language.

It shows mi, 17 de jul. de 2024 which is far too long. It's not uncommon in Spanish to get rid of the "de" when writing a date, especially if the month has been abbreviated, like here.

I'm using moment.js formatter "ll" format, i don't see any better for Spanish locale, if I want to show month name

image

But maybe i will make date format configurable

That could be a possible solution. I'm not hosting my server so I would ask to update the source. Thanks again!

Will try to do my best, but it may takes week or two for me now, because I'm busy now

but now the text doesn't fit, overlapping the moon phase and the sunrise.

You can try landscape mode, It has more space

I'm not hosting my server so I would ask to update the source

But if you have some skills I think you can download, change and copy the files directly to Kindle and then navigate the folder with file:// protocol file:///mnt/us/ is the root

sartalp commented 2 months ago

Hi again,

Thanks for your prompt response, I see you've already been changing things around. As of now, it's perfect for me. I've switched to landscape mode and it looks really good, with the correct "es" locale. The only thing that was bothering me was the browser chrome, but I've hidden it with some tape and (at least from a distance) it looks veeery smart. Thanks again! 5818664742087148145

matopeto commented 2 months ago

I see you've already been changing things around

Yes i fix the different API and moment locale (should be correct for all supported language, except Zulu)

I will add custom date/time format later

it looks veeery smart

Yes, thanks for sharing :)

matopeto commented 3 weeks ago

linking "time format" related issues #20 and #1