I'm trying to translate some text that contains a percent sign like so:
{% trans "100% butterfly" %}
When I run the makemessages command, I get the following output in my german .po file:
#: .\appName\templates\appName\butterflies.html:54
#, fuzzy, python-format
#| msgid ""
#| "100% butterfly"
msgid ""
"100%% butterfly"
msgstr ""
"100% shmetterling"
Which when compiled, fails to translate the text to German. I've tried doing {% trans "100%% butterfly" %}
, but this causes the pages to display "100%% butterfly" when viewed in both german and english. I've also tried using blocktrans tags instead to translate the text, with the same result.
Manually erasing the extra % in the .po file, along with the #, fuzzy, python-format
line works, but I'd rather not have to do this for every % sign I'm trying to translate.
How do I escape this in my HTML so that Django stops generating a fuzzy translation in the .po file and doesn't get confused thinking I'm trying to do some python formatting?