mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #26705 -- Fixed plural versions of languages not supported by Django.
This commit is contained in:
committed by
Tim Graham
parent
c4980e28e5
commit
c8d2120b06
@@ -1925,3 +1925,16 @@ class NonDjangoLanguageTests(SimpleTestCase):
|
||||
def test_non_django_language(self):
|
||||
self.assertEqual(get_language(), 'xxx')
|
||||
self.assertEqual(ugettext("year"), "reay")
|
||||
|
||||
@override_settings(
|
||||
USE_I18N=True,
|
||||
LANGUAGES=[
|
||||
('en-us', 'English'),
|
||||
# xyz language has no locale files
|
||||
('xyz', 'XYZ'),
|
||||
],
|
||||
)
|
||||
@translation.override('xyz')
|
||||
def test_plural_non_django_language(self):
|
||||
self.assertEqual(get_language(), 'xyz')
|
||||
self.assertEqual(ungettext('year', 'years', 2), 'years')
|
||||
|
||||
Reference in New Issue
Block a user