From 84a907d906280f795f345bdf6a372eda9babdb55 Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Mon, 21 Sep 2026 14:35:33 +0200 Subject: [PATCH] Fix regex for invalid placeholders (#7738) This issue added some false positives to the list and broke the string synchronization. --- tools/localazy/checkForbiddenTerms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/localazy/checkForbiddenTerms.py b/tools/localazy/checkForbiddenTerms.py index 7e1ec6480d..622db009e0 100755 --- a/tools/localazy/checkForbiddenTerms.py +++ b/tools/localazy/checkForbiddenTerms.py @@ -47,8 +47,9 @@ forbiddenTerms = { # %s %d %f ... -> simple conversion # %1$s %2$d ... -> positional # %.2f %1$.2f -> optional precision +# It also contains a trailing dot to catch cases like "%s." which are valid placeholders but will be flagged as invalid by the regex. _VALID_PLACEHOLDER = re.compile( - r'%(?:\d+\$)?(?:\.\d+)?[a-zA-Z]' + r'%(?:\d+\$)?(?:\.\d+)?[a-zA-Z]\.*' ) # Grab each candidate token: a '%' plus the run of chars that could belong to a