Commit 8b4b4ff7 authored by Michal Čihař's avatar Michal Čihař

Add workaround for plurals change in Slovenian

The preffered order of plurals have changed, we need to find way to
handle this.

See also
https://answers.launchpad.net/launchpad/+question/18324Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent dd10f2c3
......@@ -483,6 +483,12 @@ class Language(models.Model, PercentMixin):
elif self.code == 'pt_BR':
self.nplurals = 2
self.pluralequation = 'n > 1'
elif self.code == 'sl':
# This is currently changing, we need to find way to migrate data:
# https://answers.launchpad.net/launchpad/+question/18324
self.pluralequation = (
'n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3'
)
def base_code(self):
return self.code.replace('_', '-').split('-')[0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment