bpo-18319: gettext() can retrieve a message even if a plural form exists (#19869)

This commit is contained in:
Gilles Bassière 2023-07-23 11:59:19 +02:00 committed by GitHub
parent a2a0e51400
commit 54632528ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View file

@ -320,6 +320,8 @@ class PluralFormsTestCase(GettextBaseTest):
eq(x, 'Hay %s fichero')
x = gettext.ngettext('There is %s file', 'There are %s files', 2)
eq(x, 'Hay %s ficheros')
x = gettext.gettext('There is %s file')
eq(x, 'Hay %s fichero')
def test_plural_context_forms1(self):
eq = self.assertEqual
@ -338,6 +340,8 @@ class PluralFormsTestCase(GettextBaseTest):
eq(x, 'Hay %s fichero')
x = t.ngettext('There is %s file', 'There are %s files', 2)
eq(x, 'Hay %s ficheros')
x = t.gettext('There is %s file')
eq(x, 'Hay %s fichero')
def test_plural_context_forms2(self):
eq = self.assertEqual