﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24515	Plural handling broken	Claude Paroz	nobody	"Translation of plural strings is currently not following the plural equation from the po files and enforce the English default equation.
{{{
#!diff
Test case:diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py
index ad23861..65aedc0 100644
--- a/tests/i18n/tests.py
+++ b/tests/i18n/tests.py
@@ -30,7 +30,7 @@ from django.utils.translation import (
     get_language, get_language_from_request, get_language_info, gettext,
     gettext_lazy, ngettext_lazy, npgettext, npgettext_lazy, pgettext,
     pgettext_lazy, string_concat, to_locale, trans_real, ugettext,
-    ugettext_lazy, ungettext_lazy,
+    ugettext_lazy, ungettext, ungettext_lazy,
 )
 
 from .forms import CompanyForm, I18nForm, SelectDateForm
@@ -57,6 +57,16 @@ def patch_formats(lang, **settings):
 
 class TranslationTests(TestCase):
 
+    @translation.override('fr')
+    def test_plural(self):
+        """"""
+        Test plurals with ungettext. French differs from English in that 0 is singular.
+        """"""
+        self.assertEqual(ungettext(""%d year"", ""%d years"", 0) % 0, ""0 année"")
+        self.assertEqual(ungettext(""%d year"", ""%d years"", 2) % 2, ""2 années"")
+        self.assertEqual(ungettext(""%(size)d byte"", ""%(size)d bytes"", 0) % {'size': 0}, ""0 octet"")
+        self.assertEqual(ungettext(""%(size)d byte"", ""%(size)d bytes"", 2) % {'size': 2}, ""2 octets"")
+
     def test_override(self):
         activate('de')
         try:
}}}"	Bug	closed	Internationalization	1.8rc1	Release blocker	fixed			Ready for checkin	1	0	0	0	0	0
