{{{
{# some comment with the word blocktrans #}{% blocktrans with foo=bar
%}text text text
}}}
The blocktrans gets closed some lines below. When running makemessages now
it didn't find this blocktrans, only after I've removed the comment it
found it and created a msgid for it.
Even though I experienced this in a Django 1.4.22 project I got told in
#django on FreeNode that such a comment needs to be on a separate line
which the docs don't say a word about:
https://docs.djangoproject.com/ja/1.9/topics/templates/#comments
--
Ticket URL: <https://code.djangoproject.com/ticket/26883>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> I had a template containing a line like the following:
>
> {{{
> {# some comment with the word blocktrans #}{% blocktrans with foo=bar
> %}text text text
> }}}
>
> The blocktrans gets closed some lines below. When running makemessages
> now it didn't find this blocktrans, only after I've removed the comment
> it found it and created a msgid for it.
>
> Even though I experienced this in a Django 1.4.22 project I got told in
> #django on FreeNode that such a comment needs to be on a separate line
> which the docs don't say a word about:
> https://docs.djangoproject.com/ja/1.9/topics/templates/#comments
New description:
I had a template containing a line like the following:
{{{
{# some comment with the word blocktrans #}{% blocktrans with foo=bar
%}text text text
}}}
The blocktrans gets closed some lines below. When running makemessages now
it didn't find this blocktrans, only after I've removed the comment it
found it and created a msgid for it.
Even though I experienced this in a Django 1.4.22 project (which I know is
EOL by now) I got told in #django on FreeNode that such a comment needs to
be on a separate line which the docs don't say a word about:
https://docs.djangoproject.com/ja/1.9/topics/templates/#comments
--
--
Ticket URL: <https://code.djangoproject.com/ticket/26883#comment:1>
Comment (by audiolion):
This could be something to do with how comments are tokenized in
django.utils.translation
https://github.com/django/django/blob/master/django/utils/translation/trans_real.py#L607
--
Ticket URL: <https://code.djangoproject.com/ticket/26883#comment:2>
* version: => master
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/26883#comment:3>
* status: new => closed
* resolution: => duplicate
Comment:
Duplicate of #21963.
--
Ticket URL: <https://code.djangoproject.com/ticket/26883#comment:4>