django/django — pull request #677 by ramiro (2013-01-26 17:14:32+00:00)
Title: Fix for #19552 -- Ignore template comments when extracting translations. Slightly more strict validation of translator comments placement

In the general case comments are now ignored. This provides a more correct behavior when they are located before translatable constructs on the same line. Previously the latter were simply ignored (because the former were preserved when converting template code to the internal Python-syntax form later fed to xgettext but Python has no `/* ... */`-style comments).

Special comments directed to translators are now only taken in account when they are located at the end of a line. e.g.:
```
{# Translators: ignored #}{% trans "Literal A" %}{# Translators: valid, associated with "Literal B" below #}
{% trans "Literal B" %}
```
Behavior of `{% comment %}...{% endcomment %}` remains unchanged.