Ticket #18881: 18881.trans-context-single-quotes-CODE-ONLY.diff

File 18881.trans-context-single-quotes-CODE-ONLY.diff, 968 bytes (added by julien, 3 years ago)
  • django/utils/translation/trans_real.py

    diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
    index 9fd33a7..6911c2c 100644
    a b def blankout(src, char): 
    437437    return dot_re.sub(char, src)
    438438
    439439context_re = re.compile(r"""^\s+.*context\s+((?:"[^"]*?")|(?:'[^']*?'))\s*""")
    440 inline_re = re.compile(r"""^\s*trans\s+((?:"[^"]*?")|(?:'[^']*?'))(\s+.*context\s+(?:"[^"]*?")|(?:'[^']*?'))?\s*""")
    441 block_re = re.compile(r"""^\s*blocktrans(\s+.*context\s+(?:"[^"]*?")|(?:'[^']*?'))?(?:\s+|$)""")
     440inline_re = re.compile(r"""^\s*trans\s+((?:"[^"]*?")|(?:'[^']*?'))(\s+.*context\s+((?:"[^"]*?")|(?:'[^']*?')))?\s*""")
     441block_re = re.compile(r"""^\s*blocktrans(\s+.*context\s+((?:"[^"]*?")|(?:'[^']*?')))?(?:\s+|$)""")
    442442endblock_re = re.compile(r"""^\s*endblocktrans$""")
    443443plural_re = re.compile(r"""^\s*plural$""")
    444444constant_re = re.compile(r"""_\(((?:".*?")|(?:'.*?'))\)""")
Back to Top