I have a Django application that has translations for 24 languages. Everything is working fine, except the polish translations are not working!
When I try to activate the polish language django.utils.translation.activate(lang_code)
I always get this error:
ValueError at /pl/traininglog/
plural forms expression could be dangerous
The plural form expression that Django generates is this (also notice the line break):
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2)\n"
I checked with the gettext website and other sites and this should be the right expression.
The strange thing: When I change the Plural-Forms string to something obviously wrong or even delete it, the error message stays the same. (And yes, I do a: ./manage.py compilemessages
)
As said, the other 23 languages work like expected. Anyone had the same or similar issue?
Thanks in advance, Anton