﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24257	The trans template tag fails to get a message when there is a % character in the string	Alan Boudreault	nobody	"I am using a nested template with translation in my django template file. This is my basic html code:
{{{
 <script id=""invoice-date-modal-template"" type=""text/html"">
        <div id=""modal"" class=""reveal-modal tiny "" data-reveal>
            <h5><%= client %> - <%= date %></h5>
            <h6>{% trans ""Modify the invoice state of <%= client %> dated of <%= date %>?"" %}</h6>
            <p>{% trans ""Select the session invoice date and confirm."" %}</p>
            <div class=""row"">...</div>
      </div>
 </script>
}}}

makemessages && compilemessages.

In django.po: I see that the % characters has been doubled:
{{{
msgid """"
""Modify the invoice state of <%%= client %%> of <%%= date %%>?""
msgstr """"
""Changer l'état de facturation de <%%= client %%> du <%%= date %%>?""
}}}

In my web application, I can see that my first trans is not translated, but the second one is ok.

I've found a workaround for that: using blocktrans instead of trans. Doing it this way work in my application:
{{{
<h6>{% blocktrans %}Modify the invoice state of <%= client %> of <%= date %>?{% endblocktrans %}</h6>
}}}


Looks like something is different or missing with the trans template tag."	Bug	closed	Internationalization	1.7	Normal	fixed	trans templatetag i18n		Accepted	1	0	0	0	0	0
