Every time I run django-admin.py makemessages -l en
, it adds the following line to the djangojs.po file:
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
After that, running python manage.py runserver
breaks with this error:
ValueError: plural forms expression could be dangerous
Of course, removing that line will fix the error.
How can I prevent this line from being added?
P.S. I'm looking for a way to force django-admin not adding this line, or adding something I prefer, or at least something that doesn't produce an error.
I'm using Django 1.11.
This is an issue that was due to missing plural forms in en translation catalogs. As a result django was inserting "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
as a default (which isn't valid syntax).
It was fixed when django 2.0 was released. See this issue for details.
For anyone having problems with this, it may be worth checking your version of django, and updating if necessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With