django/tests/regressiontests/i18n/commands
Ramiro Morales 47ddd6a408 Fixed #19552 -- Enhanced makemessages handling of ``{# #}``-style template comments.
They are simply ignored now. This allows for a more correct behavior when
they are placed before translatable constructs on the same line.

Previously, the latter were wrongly 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.

Also, 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 %}``tags remains unchanged.

Thanks juneih at redpill-linpro dot com for the report and Claude for
his work on the issue.
2013-01-29 19:13:23 -03:00
..
ignore_dir
locale Made (make|compile)messages commands accept multiple locales at once. 2013-01-17 00:53:17 -03:00
templates Fixed #19552 -- Enhanced makemessages handling of ``{# #}``-style template comments. 2013-01-29 19:13:23 -03:00
__init__.py Fixed #10004 and #12320 -- Enabled the makemessages management command to collect comments for translators that start with the "Translators" keyword. Thanks for the report and patches, martinb and Claude Paroz. 2010-11-17 15:37:33 +00:00
code.sample Fixed #18479 -- Stopped makemessages raising error on gettext warnings 2012-07-18 20:43:35 +02:00
compilation.py Made (make|compile)messages commands accept multiple locales at once. 2013-01-17 00:53:17 -03:00
extraction.py Fixed #19552 -- Enhanced makemessages handling of ``{# #}``-style template comments. 2013-01-29 19:13:23 -03:00
javascript.js Fixed #7704, #14045 and #15495 -- Introduce a lexer for Javascript to fix multiple problems of the translation of Javascript files with xgettext. Many thanks to Ned Batchelder for his contribution of the JsLex library. 2011-06-07 16:11:25 +00:00
tests.py [py3] Replaced basestring by six.string_types. 2012-07-22 09:29:54 +02:00