Opened 6 years ago

Closed 6 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


Calendar.month_name returns 2bytecode if locale is ja_JP.

Patch is here.


    (this hunk was shorter than expected) 
    1111import calendar 
    1313from trac.util.datefmt import utc 
     14from trac.util.text import to_unicode 
    1516def add_months(thedate, months): 
    1617    """ Add <months> months to <thedate>. """ 
    1718    y, m, d = thedate.timetuple()[:3] 
    2626        return month_list 
    2727    else: 
    2828        # 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)] 
    3131def parse_period(items=[]): 
    3232    """ Parses a list of items for elements of dates, and returns 

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by osimons

  • Resolution set to fixed
  • Status changed from new to closed

(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.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.