Config flow: custom override of core domain shows unresolved [%key:...] instead of translations/en.json
### Checklist
- [x] I have updated to the latest available Home Assistant version.
- [x] I have cleared the cache of my browser.
- [x] I have tried a different browser to see if it is related to my browser.
- [ ] I have tried reproducing the issue in [safe mode](https://www.home-assistant.io/blog/2023/11/01/release-202311/#restarting-into-safe-mode) to rule out problems with unsupported custom resources.
### Describe the issue you are experiencing
## Description
When a **custom integration overrides a built-in core integration** using the **same domain** (e.g. `control4` in `custom_components/control4/`), the config flow UI shows **unresolved translation references** such as:
- `[%key:common::config_flow::data::ip%]`
- `[%key:common::config_flow::error::unknown%]`
instead of the literal strings defined in the custom integration’s `translations/en.json`.
This affects **field labels**, **error messages**, and potentially **abort reasons** for standard keys (`host`, `username`, `password`, `unknown`, `invalid_auth`, etc.).
## Environment
- Home Assistant version: **2026.6.x** (e.g. 2026.6.3)
- UI language: **English**
- Integration: custom **`control4`** in `custom_components/control4/` (overrides core Control4)
- `manifest.json` includes `"version"` (required for core override)
## Steps to reproduce
1. Install a custom integration that **uses the same domain as a core integration** (example: `control4`).
2. Provide `custom_components/control4/translations/en.json` with **literal** strings, e.g.:
```json
{
"config": {
"step": {
"user": {
"data": {
"host": "IP address",
"username": "Username",
"password": "Password"
}
}
},
"error": {
"unknown": "Unknown error",
"cannot_connect": "Failed to connect",
"invalid_auth": "Invalid authentication"
}
}
}
### Describe the behavior you expected
When a custom integration overrides a core integration (same domain, e.g. `control4` in `custom_components/control4/`), the config flow should use the custom integration’s `translations/en.json` for all config-flow strings.
Specifically:
- **Field labels** for standard keys (`host`, `username`, `password`) should show the literals from custom translations (e.g. **IP address**, **Username**, **Password**), not bundled core `[%key:...]` placeholders.
- **Error messages** for standard keys (`unknown`, `cannot_connect`, `invalid_auth`) should show the custom literals (e.g. **Unknown error**, **Failed to connect**, **Invalid authentication**).
- **Abort messages** (e.g. `already_configured`) should use custom translations when provided.
After `loadBackendTranslation("config", "control4")` runs, custom backend strings should **override** bundled frontend strings for the same lookup paths (e.g. `component.control4.config.step.user.data.host`).
Developers should be able to use normal schema keys (`CONF_HOST`, `errors["base"] = "unknown"`) and normal `translations/*.json` files without workarounds when replacing a core integration via `custom_components/`.
### Steps to reproduce the issue
1. Run Home Assistant **2026.6.x** (e.g. 2026.6.3) with UI language **English**.
2. Install a **custom integration** that overrides a core integration using the **same domain**:
- Path: `config/custom_components/control4/`
- `manifest.json` must include `"version"` (required to override core)
- Example: community Control4 fork (e.g. https://github.com/mike-dubman/hass-control4)
3. Add `custom_components/control4/translations/en.json` with **literal** strings (not `[%key:...]`):
```json
{
"config": {
"step": {
"user": {
"data": {
"host": "IP address",
"username": "Username",
"password": "Password"
},
"description": "Please enter your Control4 account details and the IP address of your local controller."
}
},
"error": {
"unknown": "Unknown error",
"cannot_connect": "Failed to connect",
"invalid_auth": "Invalid authentication"
}
}
}
### What version of Home Assistant Core has the issue?
2026.6.3
### What was the last working version of Home Assistant Core?
_No response_
### In which browser are you experiencing the issue?
_No response_
### Which operating system are you using to run this browser?
_No response_
### State of relevant entities
```txt
```
### Problem-relevant frontend configuration
```yaml
```
### JavaScript errors shown in your browser console/inspector
```txt
```
### Additional information
_No response_
0 条评论