简体   繁体   中英

Django translation - makemessages commenting out entries

I am adding entries from .jinja templates to the django.po file for translation, and when I add the entries and reload the page the translations run fine.

However, when I run makemessages my new entries get commented out. Any ideas?

This is similar to the following, but since that hasn't been active in a year I was wondering if anyone has had any progress/new ideas:

How to properly add entries for computed values to the django internationalization messages file?

I found the answer, my .jinja templates weren't being included in the makemessages script. To enable them, you have to add --extension=jinja to the script.

I found answers telling me to run python manage.py makemessages -e jinja , but this did not work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM