mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Fix translations merging (#34417)
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
@@ -192,3 +192,17 @@ async def test_get_translations_while_loading_components(hass):
|
||||
"component.component1.title": "Component 1",
|
||||
"component.component1.hello": "world",
|
||||
}
|
||||
|
||||
|
||||
async def test_get_translation_categories(hass):
|
||||
"""Test the get translations helper loads config flow translations."""
|
||||
with patch.object(translation, "async_get_config_flows", return_value={"light"}):
|
||||
translations = await translation.async_get_translations(
|
||||
hass, "en", "title", None, True
|
||||
)
|
||||
assert "component.light.title" in translations
|
||||
|
||||
translations = await translation.async_get_translations(
|
||||
hass, "en", "device_automation", None, True
|
||||
)
|
||||
assert "component.light.device_automation.action_type.turn_on" in translations
|
||||
|
||||
Reference in New Issue
Block a user