Modify

Opened 15 years ago

Closed 15 years ago

Last modified 8 years ago

#7018 closed defect (fixed)

[patch] breaks wiki page, if calender items have non-ascii chars in i18n enabled environment

Reported by: Steffen Hoffmann Owned by: anonymous
Priority: normal Component: WikiTicketCalendarMacro
Severity: critical Keywords: i18n Genshi unicode
Cc: Trac Release: 0.11

Description

wiki page not shown, if some locale settings cause special characters (i.e. German "Umlaute") to be sent to Genshi for display,

i.e. German month name for March is causing no page display at all on Feb (contains '>' navigation link to March with tooltip "März", Apr (contains '<' nav link to Mar too and of course the month March itself with its name being prominent on to of Calender, rendering it almost useless for my use cases that strictly require German Web_UI

Attachments (2)

20090824_trac_wikiticketcalendermakro_err.pdf (9.6 KB) - added by Steffen Hoffmann 15 years ago.
Screenshot with Genshi error, while hit by not properly encoded non-ascii chars
WikiTicketCalendarMacro_i18n_unicode-fix.patch (3.7 KB) - added by Steffen Hoffmann 15 years ago.
unicode encode fix for I18n support for calender items

Download all attachments as: .zip

Change History (8)

Changed 15 years ago by Steffen Hoffmann

Screenshot with Genshi error, while hit by not properly encoded non-ascii chars

Changed 15 years ago by Steffen Hoffmann

unicode encode fix for I18n support for calender items

comment:1 Changed 15 years ago by Steffen Hoffmann

tested with

Trac trunk 0.12dev t:r8263 and t:r9115
Genshi 0.6dev-r1092 (i18n branch)

comment:2 Changed 15 years ago by Ryan J Ollos

I'm going to go ahead and apply the patch to the trunk, but I won't have time to test. I'd appreciate if you can report back if you are able to test the latest version of the trunk. Thanks for the patch.

comment:3 Changed 15 years ago by Ryan J Ollos

Owner: changed from Ryan J Ollos to anonymous
Status: newassigned

I committed the file you sent by email. I'm not sure if that includes a fix for the issue described here. If not, could you please send create a patch against the current 0.12 branch that includes these changes?

Sorry, I haven't had much time lately to work on this plugin or review patches.

comment:4 Changed 15 years ago by Steffen Hoffmann

Keywords: hasienda added
Resolution: fixed
Status: assignedclosed

As I found out, that the modified version here will work only with Trac < 0.12devr9210.

The version you committed into r7893 has more than the changes in the patch file attached to this ticket. It includes

  • i18n support (introduced with trac-0.12dev) by adding unicode function to cope well with non-ascii chars (closing this ticket),
  • cleanup the code a litte,
  • support for pre-configuration of template to be used with new wiki pages called from calendar,
  • code to produce 2 additional nav items on top of the calendar to support for going back/forward 3 months at once

I'll announce especially last two as new features at wiki page, if you don't mind.

  • Template support is just a must-have.
  • The navs are an useful addition to existing month and year nav - just 2 clicks instead of 6 for skipping half a year. Someone might want to make that an option, well that could be done too.

Beware: You'll need another version for recent versions of trac-0.12dev, so for upcoming Trac 0.12 as well. But this is already done. Look at #7039, please.

comment:5 Changed 15 years ago by Steffen Hoffmann

appears to be a follow-up to #2548

BTW, speaking about i18n/l10n support before was misleading. The fixes where for proper unicode character handling, what is relevant in internationalized environments. Actual i18n work was WiP that leaked into with current revision. But that is lame, doing actually nothing but bloat the code. I'll rework this now to match current best practice for Trac plugin i18n/l10n.

But beware: This will require a transition from the one-file-macro to a full-fledged plugin, since we'll use one message catalog per language, and all this will need to be packaged (as a Python egg). Goodbye macro-style, hello WikiTicketCalendarMacro plugin-style.

comment:6 Changed 8 years ago by Ryan J Ollos

Keywords: hasienda removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anonymous.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.