mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-16 05:36:29 +00:00
Add network description to translation files (#2660)
This commit is contained in:
parent
455e80b07c
commit
d50fd3b580
@ -332,7 +332,10 @@ SCHEMA_TRANSLATION_CONFIGURATION = vol.Schema(
|
||||
|
||||
|
||||
SCHEMA_ADDON_TRANSLATIONS = vol.Schema(
|
||||
{vol.Optional(ATTR_CONFIGURATION): {str: SCHEMA_TRANSLATION_CONFIGURATION}},
|
||||
{
|
||||
vol.Optional(ATTR_CONFIGURATION): {str: SCHEMA_TRANSLATION_CONFIGURATION},
|
||||
vol.Optional(ATTR_NETWORK): {str: str},
|
||||
},
|
||||
extra=vol.REMOVE_EXTRA,
|
||||
)
|
||||
|
||||
|
@ -21,7 +21,10 @@ def test_loading_traslations(coresys: CoreSys, tmp_path):
|
||||
for file in ("no.yaml", "de.yaml"):
|
||||
write_json_or_yaml_file(
|
||||
tmp_path / "translations" / file,
|
||||
{"configuration": {"test": {"name": "test", "test": "test"}}},
|
||||
{
|
||||
"configuration": {"test": {"name": "test", "test": "test"}},
|
||||
"network": {"80/tcp": "Webserver port"},
|
||||
},
|
||||
)
|
||||
|
||||
translations = coresys.store.data._read_addon_translations(tmp_path)
|
||||
@ -32,3 +35,5 @@ def test_loading_traslations(coresys: CoreSys, tmp_path):
|
||||
assert translations["de"]["configuration"]["test"]["name"] == "test"
|
||||
|
||||
assert "test" not in translations["en"]["configuration"]["test"]
|
||||
|
||||
assert translations["no"]["network"]["80/tcp"] == "Webserver port"
|
||||
|
Loading…
x
Reference in New Issue
Block a user