From c8d2120b06e1b82cb0db896aa0f9767b2f14256c Mon Sep 17 00:00:00 2001 From: Thejaswi Puthraya Date: Tue, 7 Jun 2016 18:32:42 +0530 Subject: Fixed #26705 -- Fixed plural versions of languages not supported by Django. --- django/utils/translation/trans_real.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django/utils') diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 7a2a1c63a2..d7e97e7ed2 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -113,6 +113,9 @@ class DjangoTranslation(gettext_module.GNUTranslations): self.__to_language = to_language(language) self.__locale = to_locale(language) self._catalog = None + # If a language doesn't have a catalog, use the Germanic default for + # pluralization: anything except one is pluralized. + self.plural = lambda n: int(n != 1) if self.domain == 'django': if localedirs is not None: -- cgit v1.3