You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: correct the meta-only stub claim in the add-a-language procedure (#2144)
Both the locales README and AGENTS.md said a new language's settings catalog
may start as a meta-only stub. Following that literally leaves a PR red: the
Decision and PredicateOp word checks in test_settings_ui_i18n.py apply to every
catalog and are not behind LOCALE_COMPLETENESS_CHECKS, and once a catalog does
carry messages, the address-register check in test_translate_locales.py wants
one whose English addresses the reader.
Both documents now name what a catalog owes before it merges, and the README's
list of ungated PR-CI checks gains the two checks that live outside
test_locale_parity.py. Verified by running the corrected procedure: a stub with
meta plus those keys, an empty component catalog, regenerated projections and
the code added to the AGENTS.md locale list leaves the three locale test files
green.
Three comments carried the same claim and now describe what they actually
guard: the _TRANSLATED_LOCALES exclusion in test_translate_locales.py, and the
completeness marker plus the tools-tab docstring in test_settings_ui_i18n.py.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/ha_mcp/settings_ui/AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ Any reachable HA instance works for `HOMEASSISTANT_URL` / `HOMEASSISTANT_TOKEN`.
37
37
-`settings.html` — the page markup. `__HA_MCP_CSS__` and `__HA_MCP_JS__` are filled once at import. `__HA_MCP_THEME_PREFS__`, `__HA_MCP_I18N__`, `__HA_MCP_LANG__`, and `__HA_MCP_DIR__` are filled per request by `_render_settings_html()`.
38
38
-`settings.js` — the client script, injected into `<script>__HA_MCP_JS__</script>`. Not served as a separate asset.
39
39
-`settings.css` — the stylesheet, injected into `<style>__HA_MCP_CSS__</style>`.
40
-
-`_i18n.py` and `locales/*.json` — auto-discovered translation catalogs. English is the per-key fallback for `messages`. Adding a language is not a single-file change: it ships on all four translated surfaces or not at all. Its `tool_groups` and `tools` sections must end up exact — the post-merge locale-sync workflow fills and verifies them, so a `meta`-only stub may merge — and `en.json` is the wrong starting point because it carries both of those empty by design. See `locales/README.md` for the procedure and the repository-root `AGENTS.md` § Translations for the rules CI enforces. The wheel, sdist and binary declarations match the locale directory by pattern, so a new catalog needs no packaging edit — but keep those patterns intact when touching packaging.
40
+
-`_i18n.py` and `locales/*.json` — auto-discovered translation catalogs. English is the per-key fallback for `messages`. Adding a language is not a single-file change: it ships on all four translated surfaces or not at all. Its `tool_groups` and `tools` sections must end up exact — the post-merge locale-sync workflow fills and verifies them, so a near-empty catalog may merge, though not a `meta`-only one: the `Decision` and `PredicateOp` words plus one reader-addressing key are checked ungated against the shipped catalogs — and `en.json` is the wrong starting point because it carries both of those empty by design. See `locales/README.md` for the procedure and the repository-root `AGENTS.md` § Translations for the rules CI enforces. The wheel, sdist and binary declarations match the locale directory by pattern, so a new catalog needs no packaging edit — but keep those patterns intact when touching packaging.
0 commit comments