I'm currently localizing my Django app. All other translations work fine except percent-sign inside blocktrans tags.
In my template I have {% blocktrans %}Original % blocktrans{endblocktrans %}
.
django-admin makemessages
produces this in django.po:
#: templates/index.html:78
#, python-format
msgid "Original %% blocktrans"
msgstr ""
I update that to msgstr "Translated %% blocktrans"
, run django-admin compilemessages
, restart dev server and refresh the page, but I still see Original % blocktrans
in the output. Other translations are shown properly.
For reference, {% trans "Original % trans" %}
also works ok. After makemessages and translation I have:
#: templates/index.html:72
msgid "Original % trans"
msgstr "Translated % trans"
This works as expected - translated version is shown.
I must use blocktrans because I also need to embed variables to the strings. I'm using Django 1.2.5.
How can I make blocktrans work with percent-signs?