Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#11290 closed defect (duplicate)

trac-1.0.1/Babel-1.3 - TracError: "2010-8-28" is an invalid date, or the date format is not known. Try "y\u5e74M\u6708d\u65e5" instead.

Reported by: beber@… Owned by:
Priority: normal Milestone:
Component: i18n Version: 1.0.1
Severity: normal Keywords:
Cc: djc@…, tomwij@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

While running the test case suite for trac 1.0.1 using python 2.7.5 and Babel 1.3, it fail on trac.util.tests.datefmt.I18nDateFormatTestCase case with the following error :

======================================================================
ERROR: test_i18n_parse_date_date (trac.util.tests.datefmt.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/util/tests/datefmt.py", line 953, in test_i18n_parse_date_date
    datefmt.parse_date(u'2010-8-28', tz, zh_CN))
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/util/datefmt.py", line 466, in parse_date
    date=text, hint=hint), _('Invalid Date'))
TracError: "2010-8-28" is an invalid date, or the date format is not known. Try "y\u5e74M\u6708d\u65e5" instead.

======================================================================
ERROR: test_i18n_parse_date_datetime (trac.util.tests.datefmt.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/util/tests/datefmt.py", line 888, in test_i18n_parse_date_datetime
    tz, zh_CN))
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/util/datefmt.py", line 466, in parse_date
    date=text, hint=hint), _('Invalid Date'))
TracError: "2010-8-28 \u4e0b\u534801:45:56" is an invalid date, or the date format is not known. Try "y\u5e74M\u6708d\u65e5" instead.

======================================================================
ERROR: test_i18n_parse_date_datetime_meridiem (trac.util.tests.datefmt.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/util/tests/datefmt.py", line 914, in test_i18n_parse_date_datetime_meridiem
    zh_CN))
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/util/datefmt.py", line 466, in parse_date
    date=text, hint=hint), _('Invalid Date'))
TracError: "2011-2-22 \u4e0a\u53480:45:56" is an invalid date, or the date format is not known. Try "y\u5e74M\u6708d\u65e5" instead.

======================================================================
ERROR: test_i18n_parse_date_roundtrip (trac.util.tests.datefmt.I18nDateFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/util/tests/datefmt.py", line 965, in test_i18n_parse_date_roundtrip
    actual = datefmt.parse_date(formatted, tz, locale)
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/util/datefmt.py", line 466, in parse_date
    date=text, hint=hint), _('Invalid Date'))
TracError: "2010/8/28 \u4e0b\u53481:45:56" is an invalid date, or the date format is not known. Try "y/M/d" instead.

It seems to be link to ticket:11258

Attachments (0)

Change History (6)

in reply to:  description comment:1 by Ryan J Ollos, 7 years ago

Resolution: duplicate
Status: newclosed

Replying to beber@…:

It seems to be link to ticket:11258

I've reproduced the error you report with Trac 1.0.1 and Babel 1.3, and on upgrading to Trac 1.0-stable the error is resolved. It seems this is a duplicate of #11258, as you've already noted.

comment:2 by anonymous, 7 years ago

What you is valid :) But here it an intention to make it work for 1.0.1 only. I've able to trac what commit fix this and here the list :

11684 11689 11690 11691 11712 11769 11771 11773 11776 11783 11816 11876 11892 11893

comment:3 by Jun Omae, 7 years ago

Babel 1.3 still breaks the compatibilities for zh_CN and zh_TW, see comment:3:ticket:11258. Currently, I recommend to downgrade to Babel 0.9.6.

comment:4 by be, 7 years ago

Babel follow CLDR specification about locales naming, and theses specs have changes zh_CN to zh_Hans and zh_TW to zh_Hant. So it's not really an issue with Babel.

comment:5 by anonymous, 6 years ago

I dwongrade the Babel version to 0.9.6, but this problem still show.

in reply to:  5 comment:6 by Ryan J Ollos, 6 years ago

Replying to anonymous:

I dwongrade the Babel version to 0.9.6, but this problem still show.

Please ask on the MailingList and we will try to help you resolve the issue.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.