divio/django-cms — Issue #1096: ValueError, 'plural forms expression could be dangerous'
Author: kendriu
Created: 2011-11-23 21:56:22+00:00
State: open

1. I had installed django-cms according to this tutorial: https://www.django-cms.org/en/documentation/

2. Then I have changed settings,py like this:
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'pl-pl'
3. Now when i runserver, it throws exception:

"ValueError: plural forms expression could be dangerous"

Full Traceback:
(cms)andy@andy-desktop:~/tmp/cms/demo$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 14, in
execute_manager(settings)
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/core/management/base.py", line 209, in execute
translation.activate('en-us')
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 100, in activate
return _trans.activate(language)
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 202, in activate
_active.value = translation(language)
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 185, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 166, in _fetch
res = _merge(apppath)
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 153, in _merge
t = _translation(path)
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 135, in _translation
t = gettext_module.translation('django', path, [loc], DjangoTranslation)
File "/usr/lib/python2.7/gettext.py", line 493, in translation
t = _translations.setdefault(key, class_(fp))
File "/home/andy/tmp/cms/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 70, in __init__
gettext_module.GNUTranslations.__init__(self, *args, **kw)
File "/usr/lib/python2.7/gettext.py", line 180, in __init__
self._parse(fp)
File "/usr/lib/python2.7/gettext.py", line 315, in _parse
self.plural = c2py(plural)
File "/usr/lib/python2.7/gettext.py", line 93, in c2py
raise ValueError, 'plural forms expression could be dangerous'
ValueError: plural forms expression could be dangerous