mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] bpo-18319: gettext() can retrieve a message even if a plural form exists (GH-19869) (GH-107107)
(cherry picked from commit 54632528ee
)
Co-authored-by: Gilles Bassière <gbassiere@gmail.com>
This commit is contained in:
parent
26137e2cf7
commit
c1c3f0bfec
3 changed files with 12 additions and 4 deletions
|
@ -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
|
||||
|
@ -340,6 +342,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue