Add lokalise multi reference check to hassfest (#101876)

This commit is contained in:
Robert Resch 2023-10-23 10:57:19 +02:00 committed by GitHub
parent e4af09d261
commit 0c5b963847
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: