Fix incorrect regex in translation script (#91536)

This commit is contained in:
epenet 2023-04-17 12:18:34 +02:00 committed by GitHub
parent 5c7d124f02
commit d1b8f2987c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ def substitute_translation_references(integration_strings, flattened_translation
def substitute_reference(value, flattened_translations):
"""Substitute localization key references in a translation string."""
matches = re.findall(r"\[\%key:((?:[\w]+|[:]{2})*)\%\]", value)
matches = re.findall(r"\[\%key:((?:[a-z0-9-_]+|[:]{2})*)\%\]", value)
if not matches:
return value