Roll out agency content parity across locales
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user