Incompatibilities with recent CLDR releases
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zope.i18n |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
The versions of LDML files in locales/data are pretty old (released in 2004).
Getting any new version from unicode.org: http://
1. Parsing the generation in this format fails:
<generation date="$Date: 2012-10-11 23:11:48 +0300 (Thu, 11 Oct 2012) $"/>
File ".../eggs/
generationDate = date(int(year), int(month), int(day))
ValueError: invalid literal for int() with base 10: '$Date: 2012'
2. There is an assumption that a date format e.g.:
<dateFormat>
</dateFormat>
implies length for all the date parts - it does not and will fail when formatting dates.
File ".../eggs/
text += info.get(elem, elem)
TypeError: coercing to Unicode: need string or buffer, tuple found
<type 'exceptions.
coercing to Unicode: need string or buffer, tuple found
> /home/undesa/
-> text += info.get(elem, elem)
This likely never bombed before since a lookup of the info dictionary always returned a string.
3. getFormatter (zope/i18n/
There are a number of issues with lookup here:
formats = getattr(cal, category+'Formats')
if length is None:
length = getattr(
# 'datetime' is always a bit special; we often do not have a length
# specification, but we need it for looking up the date and time
# formatters
if category == 'dateTime':
For instance: length = getattr(cal, 'default'
Why should this fall back to looking up the format key from the calendar instance?
Also, formats[None] raises an AttributeError
Now tracked on Github:
https:/ /github. com/zopefoundat ion/zope. i18n/issues/ 13