From d5af6c595d989c229065a05c5f9178c21e8c7292 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 23 Oct 2023 12:34:32 +0200 Subject: [PATCH] Fix runaway regex in translations.develop (#102386) Co-authored-by: Franck Nijhof --- script/translations/develop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/translations/develop.py b/script/translations/develop.py index 3bfaa279e93..3e386afb641 100644 --- a/script/translations/develop.py +++ b/script/translations/develop.py @@ -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:((?:[a-z0-9-_]+|[:]{2})*)\%\]", value) + matches = re.findall(r"\[\%key:([a-z0-9_]+(?:::(?:[a-z0-9-_])+)+)\%\]", value) if not matches: return value