From cf69b7f084848da2c7363f93442e7f773ecf0e21 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sat, 26 Mar 2022 14:58:55 +0530 Subject: [PATCH] fix: only match 1 python context string at most --- frappe/translate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/translate.py b/frappe/translate.py index 04d1feea76..9869a89840 100644 --- a/frappe/translate.py +++ b/frappe/translate.py @@ -37,7 +37,7 @@ TRANSLATE_PATTERN = re.compile( r"([\"'])" # start of context string identifier; 5th capture group r"(?P((?!\5).)*)" # capture context string till closing id is found r"\5" # match context string closure - r")*" # match one or more context string (?wat this should be 0 or 1) + r")?" # match 0 or 1 context strings # END: python context search # BEGIN: JS context search