Skip to content

Commit

Permalink
Add lokalise multi reference check to hassfest (home-assistant#101876)
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus authored Oct 23, 2023
1 parent e4af09d commit 0c5b963
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions script/hassfest/translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,11 @@ def validate_translation_file( # noqa: C901
"translations",
f"{reference['source']} contains invalid reference {reference['ref']}: Could not find {key}",
)
elif match := re.match(RE_REFERENCE, search[key]):
integration.add_error(
"translations",
f"Lokalise supports only one level of references: \"{reference['source']}\" should point to directly to \"{match.groups()[0]}\"",
)


def validate(integrations: dict[str, Integration], config: Config) -> None:
Expand Down

0 comments on commit 0c5b963

Please sign in to comment.