I am trying to translate text containing a percent sign like this:
{% 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"
That at compilation does not transfer the text to German. I tried doing {% trans "100%% butterfly" %} , but this makes the pages display a "100 %% butterfly" when viewed in German and English. I also tried using blocktrans tags instead to translate text with the same result.
Manually removing the extra% in the .po file along with the line #, fuzzy, python-format , but I wouldnβt do this for every% sign I am trying to translate.
How can I avoid this in my HTML so that Django will stop generating fuzzy translations in the .po file and not get confused thinking that I am trying to format in python?
source share