Skip to content

Commit

Permalink
Merge pull request #86 from DH-IT-Portal-Development/fix/translate-tag
Browse files Browse the repository at this point in the history
update makemessages regex to match django's translate tag
  • Loading branch information
bbonf authored Aug 7, 2023
2 parents 54b24b1 + c52d1df commit 467cef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cdh/core/management/commands/makemessages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 467cef6

Please sign in to comment.