-
Notifications
You must be signed in to change notification settings - Fork 279
feat: locale option for dates and number formatting #644
Conversation
- Moved locale initialization from app.js ti init.js - Added locale info in readme.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done all changes... Really I don't manage git... Do I have to carry over the last changes you made "that do not belong to any branch" in my code or can the merge be done directly?
You can The change looks almost good to me. I'm playing with some remaining stuff:
|
Ah ok, perfect, I wanted to understand if you had not done the merge because I had to carry out some operations. |
I think the defaults you've selected are pretty good. We can add more later if needed. |
This would be a bit tricky actually because ChartJs uses I'm good with those changes now and will merge if you don't see any issues. |
Very well, I think we can proceed with the merge, I will also try to study the chartjs / moment problem ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why relative path?
If TileBoard is deployed to a non-root path like |
right |
Here is what I was experimenting with: 4d0b775 This breaks graph tooltips though because the |
trying to investigate on chart, I created an HIstory item then I got this error: |
You are probably hitting this issue #386 I've made a PR with a fix at home-assistant/core#43679 but it was confusingly rejected... |
hi Rafal, |
We could discuss more on the HA issue but the last time I checked, I didn't see other API actually checking the origins whitelisted by the user. |
OK ... Therefore:
class HistoryPeriodView(HomeAssistantView):
in api component (and relative initialization) OR create a derived class in api.py leaving this in place class APIHistoryPeriodView(HistoryPeriodView):
and then do the initialization at the right time!!! async def async_setup(hass, config):
I have not checked what happens with regard to the dependencies also local of the HistoryPeriodView class or its references but I think it is an easily solvable problem. Finally, I didn't even try to figure out what the timing of the Home Assistant initialization workflow was (i.e. the reason for the current malfunction) because the project is too complex and there are no flow and class diagrams ... they have everything in mind, I don't! See you |
Sorry, but at the moment I don't have time to go deep into this and try to understand how to fix this the best way. I would prefer to discuss those things inside appropriate issues because otherwise, things get messy and hard to follow and find. This issue is about locale formatting so it's kinda out of place to discuss CORS issues here. |
verry sorry making trouble with git...
+/- all modifications included, please check...