Opened 5 years ago
Last modified 5 years ago
#13166 closed defect
Test failure with Babel 2.7 — at Version 4
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.18 |
Component: | i18n | Version: | |
Severity: | normal | Keywords: | babel |
Cc: | Branch: | ||
Release Notes: |
Made compatible with Babel 2.7. |
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Tests pass with Babel 2.6.0, but fail with Babel 2.7.0. Confirmed failures on 1.0-stable and 1.2-stable.
... ====================================================================== ERROR: test_add_jquery_ui_first_week_day (trac.web.tests.chrome.ChromeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/web/tests/chrome.py", line 374, in test_add_jquery_ui_first_week_day self.assertEqual(1, first_week_day(de, de, [])) File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/web/tests/chrome.py", line 355, in first_week_day chrome.add_jquery_ui(req) File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/web/chrome.py", line 1409, in add_jquery_ui 'period_names': get_period_names_jquery_ui(req), File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/util/datefmt.py", line 511, in get_period_names_jquery_ui for period in ('am', 'pm')) File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/util/datefmt.py", line 511, in <genexpr> for period in ('am', 'pm')) File "/Users/rjollos/.pyenv/versions/trac-2.7.15/lib/python2.7/site-packages/babel/localedata.py", line 218, in __getitem__ orig = val = self._data[key] KeyError: 'am' ---------------------------------------------------------------------- Ran 2407 tests in 169.700s FAILED (errors=1) make: *** [unit-test] Error 1
Change History (4)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
comment:3 by , 5 years ago
comment:4 by , 5 years ago
Owner: | set to |
---|---|
Release Notes: | modified (diff) |
Status: | new → assigned |
Thanks for the patch. I will push the fix.
Note:
See TracTickets
for help on using tickets.
I investigate whether the locales have
am
in the day periods.de
locale in Babel 2.6.0 hasam
period, but missingam
period in Babel 2.7.0.The
am
andpm
periods have been removed fromde
locale at https://github.com/unicode-org/cldr/commit/06fed7197377807d993d2a21aa112f9bafaaf57d#diff-ed5d094ffbebef4d7e8476d25ad05bccL2040.The
am
andpm
periods can be undefined in a locale data, by the investigation.trac/util/datefmt.py