Roll out agency content parity across locales

This commit is contained in:
2026-03-31 00:29:01 +02:00
parent 582efd017d
commit eef11801a6
4 changed files with 5041 additions and 141 deletions

View File

@@ -49,6 +49,7 @@ CTA_RULES = {
r"^Service",
r"^Dienstleistungen",
r"^Erstgespräch",
r"^Beratung",
r"^Einführ",
r"^Anpassung",
r"^Ansichts",
@@ -83,6 +84,7 @@ CTA_RULES = {
r"^Descubrir",
r"^Contactar",
r"^Planificar",
r"^Program",
r"^Programe",
r"^Concertar",
r"^Enviar",
@@ -141,6 +143,8 @@ def validate_cta(locale_code: str, field_path: str, normalized: str):
last_segment = field_path.split(".")[-1]
if last_segment not in CTA_FIELDS:
return []
if any(re.search(pattern, normalized) for pattern in CTA_RULES.get(locale_code, ())):
if any(
re.search(pattern, normalized) for pattern in CTA_RULES.get(locale_code, ())
):
return []
return [make_issue("cta_language_mismatch", field_path, normalized)]