Modify ↓
Opened 17 years ago
Closed 17 years ago
#3021 closed defect (fixed)
Error at browse by time when locale is ja_JP
Reported by: | hirobe | Owned by: | osimons |
---|---|---|---|
Priority: | normal | Component: | FullBlogPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Calendar.month_name returns 2bytecode if locale is ja_JP.
Patch is here.
-
util.py
(this hunk was shorter than expected) 11 11 import calendar 12 12 13 13 from trac.util.datefmt import utc 14 from trac.util.text import to_unicode 14 15 15 16 def add_months(thedate, months): 16 17 """ Add <months> months to <thedate>. """ 17 18 y, m, d = thedate.timetuple()[:3] … … 26 26 return month_list 27 27 else: 28 28 # Use list from default locale setting 29 return [ calendar.month_name[i+1]for i in range(12)]29 return [to_unicode(calendar.month_name[i+1]) for i in range(12)] 30 30 31 31 def parse_period(items=[]): 32 32 """ Parses a list of items for elements of dates, and returns
Attachments (0)
Note: See
TracTickets for help on using
tickets.
(In [3695]) FullBlogPlugin: Fix for unicode error related to calendar month names in some locales.
Closes #3021, and thanks to hirobe for report and patch.