bruxy70 / Garbage-Collection

🗑 Custom Home Assistant sensor for scheduling garbage collection (or other regularly re-occurring events - weekly on given days, semi-weekly or monthly)
MIT License
383 stars 90 forks source link

change language #431

Closed mattiabrunello5 closed 1 year ago

mattiabrunello5 commented 1 year ago

Before you submit a new bug report, please check that

Write your question here

Hi, i wish to know if its possible to change the language of the month ( maybe edit some file in the repo?) 1

thanks

bruxy70 commented 1 year ago

The translations are done on front-end (in the user context - in fact, each user can have a different language configured). The integration runs on the back-end (it only has one state, even if no user is signed in). I think it runs in the system locale, that is English I thing. And that's the problem with the "Verbose state" - that is done on the back end and it "bakes" it in the state (I think it is conceptually wrong and I should have rejected that, but it is done, many people use it and it would be hard to remove it).

So from the above, I'd render this human-readable state in the dashboard. Then it will run in the user context and should respect the language you have set-up for the user.