def test_ngettext_plural_unknown():
    s = i18n.ngettext('unknown1', 'unknown2', 3)
    assert isinstance(s, str)
    assert s == 'unknown2'
def test_ngettext_plural():
    s = i18n.ngettext('horse', 'horses', 3)
    assert isinstance(s, str)
    assert s == 'chevaux'
def test_ngettext_singular_unknown():
    s = i18n.ngettext('unknown1', 'unknown2', 1)
    assert isinstance(s, str)
    assert s == 'unknown1'
Exemplo n.º 4
0
def test_ngettext_singular():
    s = i18n.ngettext('horse', 'horses', 1)
    assert isinstance(s, str) and (s == 'cheval')
def test_ngettext_singular():
    s = i18n.ngettext('horse', 'horses', 1)
    assert isinstance(s, str)
    assert s == 'cheval'
Exemplo n.º 6
0
def test_ngettext_singular_unknown():
    i18n.set_locale(i18n.Locale('fr', 'FR'))
    s = i18n.ngettext('unknown1', 'unknown2', 1)
    assert isinstance(s, str) and (s == 'unknown1')
Exemplo n.º 7
0
def test_ngettext_plural_unknown():
    i18n.set_locale(i18n.Locale('fr_FR'))
    s = i18n.ngettext('unknown1', 'unknown2', 3)
    assert isinstance(s, str) and (s == 'unknown2')
Exemplo n.º 8
0
 def test_ngettext_singular_unknown(self):
     i18n.set_locale(i18n.Locale('fr', 'FR'))
     s = i18n.ngettext('unknown1', 'unknown2', 1)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown1')
Exemplo n.º 9
0
def test_ngettext_plural():
    s = i18n.ngettext('horse', 'horses', 3)
    assert isinstance(s, str) and (s == 'chevaux')
Exemplo n.º 10
0
 def test_ngettext_singular(self):
     s = i18n.ngettext('horse', 'horses', 1)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'cheval')
Exemplo n.º 11
0
 def test_ngettext_plural(self):
     s = i18n.ngettext('horse', 'horses', 3)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'chevaux')
Exemplo n.º 12
0
 def test_ngettext_plural_unknown(self):
     i18n.set_locale(i18n.Locale('fr_FR'))
     s = i18n.ngettext('unknown1', 'unknown2', 3)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown2')
Exemplo n.º 13
0
 def test_ngettext_singular_unknown(self):
     i18n.set_locale(i18n.Locale('fr', 'FR'))
     s = i18n.ngettext('unknown1', 'unknown2', 1)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown1')
Exemplo n.º 14
0
 def test_ngettext_plural(self):
     s = i18n.ngettext('horse', 'horses', 3)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'chevaux')
Exemplo n.º 15
0
 def test_ngettext_singular(self):
     s = i18n.ngettext('horse', 'horses', 1)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'cheval')
Exemplo n.º 16
0
 def test_ngettext_plural_unknown(self):
     i18n.set_locale(i18n.Locale('fr_FR'))
     s = i18n.ngettext('unknown1', 'unknown2', 3)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown2')