mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Remove dead code in translation checks (#129875)
This commit is contained in:
parent
3858400a6f
commit
e6c20333b3
@ -528,21 +528,6 @@ async def _ensure_translation_exists(
|
||||
ignore_translations[full_key] = "used"
|
||||
return
|
||||
|
||||
key_parts = key.split(".")
|
||||
# Ignore step data translations if title or description exists
|
||||
if (
|
||||
len(key_parts) >= 3
|
||||
and key_parts[0] == "step"
|
||||
and key_parts[2] == "data"
|
||||
and (
|
||||
f"component.{component}.{category}.{key_parts[0]}.{key_parts[1]}.description"
|
||||
in translations
|
||||
or f"component.{component}.{category}.{key_parts[0]}.{key_parts[1]}.title"
|
||||
in translations
|
||||
)
|
||||
):
|
||||
return
|
||||
|
||||
pytest.fail(
|
||||
f"Translation not found for {component}: `{category}.{key}`. "
|
||||
f"Please add to homeassistant/components/{component}/strings.json"
|
||||
|
Loading…
x
Reference in New Issue
Block a user