问题
If a auto generated django.po file contains the following line in its header
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"manage.py runserver" raises
gettext.py", line 93, in c2py
raise ValueError, 'plural forms expression could be dangerous'
ValueError: plural forms expression could be dangerous
If i remove the line everything works. What does the header mean? Why is it somtimes generated (for example localisation of the haystack app)? What das the error message mean?
回答1:
It means that your translator forgot to fill it in properly.
来源:https://stackoverflow.com/questions/4935704/django-gettext-raises-valueerror-plural-forms-expression-could-be-dangerous