mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 18:39:30 +00:00
Improve logic for detecting unused ignore translations (#128441)
This commit is contained in:
@@ -475,14 +475,14 @@ async def _ensure_translation_exists(
|
||||
) -> None:
|
||||
"""Raise if translation doesn't exist."""
|
||||
full_key = f"component.{component}.{category}.{key}"
|
||||
if full_key in ignore_translations:
|
||||
ignore_translations[full_key] = "used"
|
||||
return
|
||||
|
||||
translations = await async_get_translations(hass, "en", category, [component])
|
||||
if full_key in translations:
|
||||
return
|
||||
|
||||
if full_key in ignore_translations:
|
||||
ignore_translations[full_key] = "used"
|
||||
return
|
||||
|
||||
key_parts = key.split(".")
|
||||
# Ignore step data translations if title or description exists
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user