I am trying to run the Django language localization on a project, but makemessages always ignores the html templates in my templates folder.
I am running python manage.py makemessages -a
from the project root, and all of the strings that are marked for translation inside .py
files anywhere in the project are successfully added to the .po
file.
Any of the strings in the html templates, i.e., {{ trans "String_to_translate" }}
are ignored and not added to the .po file even though the necessary module is loaded at the top of the template, {% load i18n %}
.
To test the possibility that the whole template folder was excluded from the makemessages function, I made a .py
file and included a string for translation there, and it was successfully added to the .po
file.
With all of that being said, does anyone know what could possibly be causing this problem?