diff options
author | bphillips <bphillips@caktusgroup.com> | 2015-11-27 14:08:08 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-12-03 19:44:15 -0500 |
commit | 7f663aeccf17a75d5fe3fee02d1ac577fdeb57f2 (patch) | |
tree | 492aebd7b3756375cae71e88f7a859634e823c92 /tests/admin_widgets/tests.py | |
parent | 717a54c88307eabda9240cd28f0c7851f18b45eb (diff) | |
download | django-7f663aeccf17a75d5fe3fee02d1ac577fdeb57f2.tar.gz |
Fixed #25820 -- Allowed whitespace in admin's calendar.js month/weekday names.
This is useful for certain language translations.
Diffstat (limited to 'tests/admin_widgets/tests.py')
-rw-r--r-- | tests/admin_widgets/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index d111c3ab7e..99b7b85afa 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -777,8 +777,8 @@ class DateTimePickerSeleniumFirefoxTests(SeleniumDataMixin, AdminSeleniumWebDriv # Enter test data member = models.Member.objects.create(name='Bob', birthdate=datetime(1984, 5, 15), gender='M') - # Get month names translations for every locales - month_string = 'January February March April May June July August September October November December' + # Get month name translations for every locale + month_string = 'May' path = os.path.join(os.path.dirname(import_module('django.contrib.admin').__file__), 'locale') for language_code, language_name in settings.LANGUAGES: try: @@ -786,12 +786,12 @@ class DateTimePickerSeleniumFirefoxTests(SeleniumDataMixin, AdminSeleniumWebDriv except IOError: continue if month_string in catalog._catalog: - month_names = catalog._catalog[month_string] + month_name = catalog._catalog[month_string] else: - month_names = month_string + month_name = month_string # Get the expected caption - may_translation = month_names.split(' ')[4] + may_translation = month_name expected_caption = '{0:s} {1:d}'.format(may_translation.upper(), 1984) # Test with every locale |