1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Made makemessages leave '%%' sequences untouched when extracting translatable literals from blocktrans template tags.

This makes it consistent with behavior introduced when fixing #11240 in
processing of literal passed to the trans tag to avoid double escaping
(i.e. `'%%%%'` sequences in resulting PO files.)

Also, cleaned up tests changes from r17190 (removed commented out code and
implemented compatibility with Python 2.5.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ramiro Morales
2011-12-11 00:48:26 +00:00
parent 12a20b6c22
commit f2e99ecfda
3 changed files with 6 additions and 13 deletions

View File

@@ -67,6 +67,8 @@ continued here.{% endcomment %}
{% blocktrans context "Special blocktrans context #3" count 2 %}Translatable literal #8c-singular{% plural %}Translatable literal #8c-plural{% endblocktrans %}
{% blocktrans with a=1 context "Special blocktrans context #4" %}Translatable literal #8d {{ a }}{% endblocktrans %}
{% blocktrans with a=1 %}Blocktrans extraction shouldn't double escape this: %%, a={{ a }}{% endblocktrans %}
{% trans "Literal with a percent symbol at the end %" %}
{% trans "Literal with a percent % symbol in the middle" %}
{% trans "Completed 50% of all the tasks" %}