From c52d1df9b47dae1016f3cb053652fb124ce5bb56 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 7 Aug 2023 10:53:25 +0200 Subject: [PATCH] update makemessages regex to match django's translate tag --- src/cdh/core/management/commands/makemessages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdh/core/management/commands/makemessages.py b/src/cdh/core/management/commands/makemessages.py index 297b3052..fba4b0d4 100644 --- a/src/cdh/core/management/commands/makemessages.py +++ b/src/cdh/core/management/commands/makemessages.py @@ -15,7 +15,7 @@ def templatize(src, **kwargs): template.inline_re = re.compile( # Match the trans 'some text' part - r"""^\s*trans(?:format)?\s+((?:"[^"]*?")|(?:'[^']*?'))""" + r"""^\s*trans(?:format|late)?\s+((?:"[^"]*?")|(?:'[^']*?'))""" # Match and ignore optional filters r"""(?:\s*\|\s*[^\s:]+(?::(?:[^\s'":]+|(?:"[^"]*?")|(?:'[^']*?')))?)*""" # Match the optional context part