Hi, I tried to create a Core integration but it got declined because of unstable 3rd party API.
I am in the process of submitting the integration to HACS instead, however I’m having a weird issue.
When I copied the files manually to the custom_components folder, everything looks/works fine, my config flow loads the placeholders of the fields and shows the errors as it should, no worries.
After that I created a repo and moved all the integration files there, updated docs/readme/manifest (according to the docs) and added the integration via HACS as a custom repository.
The issue is that the Config Flow does not show ANY strings this way. Just blank string fields.
When I try to trigger an incorrect flow, it errors out correctly, however it still doesn’t show any error messages.
Other than that I think it works correctly - it updates entities, loads messages and whatnot. It’s just that the strings are missing.
Examples:
The flow when the integration is copied in custom_components:
Hi, i had the same issue the other day when working on my integration, it was a pain to figure out as well.
On custom integrations it seems like you need a folder titled “translations”, and have a copy of strings.json in there called en.json (or any other language you might want).
I believe the strings.json gets completely ignored but still needs to be there?
I can see the strings.json in the original PR on the HA github, and you use this syntax:
I believe this all has to do with custom integrations not having access to the translations of the core integrations. The docs say that lokalize strings should work, so if anyone knows how to get those to work on custom integrations I’d love to know as well. https://developers.home-assistant.io/docs/internationalization/custom_integration
Side note: be sure to do a hard refresh of your browser while testing changes.
Nobody/nothing will autogenerate the translations for your custom component
As said above, you need both strings.json and translations/<lang>.json, including en.json, which is a copy of strings.json if you used english.