Django: gettext raises ValueError: 'plural for

2019-02-14 18:42发布

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条回答
一纸荒年 Trace。
2楼-- · 2019-02-14 19:48

It means that your translator forgot to fill it in properly.

查看更多
登录 后发表回答