Modify

Opened 13 years ago

Closed 9 years ago

Last modified 9 years ago

#9568 closed defect (fixed)

Can Babel be made an optional component for 0.12?

Reported by: Ryan J Ollos Owned by: Steffen Hoffmann
Priority: normal Component: WikiCalendarMacro
Severity: normal Keywords: i18n compatibility
Cc: trachacks@… Trac Release: 0.11

Description

I don't have much experience working with Babel, but several plugins seem to have Babel as an optional component. Is it possible to do that with this plugin? I suppose I could just install Babel ...

Attachments (1)

WikiCalendarMacro-nobabel.patch (622 bytes) - added by Patrick Schaaf 9 years ago.
nobabel fixes against r14364

Download all attachments as: .zip

Change History (11)

comment:1 Changed 13 years ago by Steffen Hoffmann

Component: WikiTicketCalendarMacroWikiCalendarMacro
Keywords: i18n compatibility added
Status: newassigned

Sure, already did so for a number of plugins.

I need to look into the source and apply changes needed i.e. to retain the locale directory in packages even without compiled message catalogs and make sure that translation helpers really fallback gracefully in situations without Babel installed.

Thanks for pointing out this weakness. I accept this as complaint about an obvious regression. Babel is not hard to install, but OTOH it is still optional in Trac these days, no question. BTW, the requested changes are needed for re-gaining backwards-compatibility down to Trac 0.11 too, and it's not too hard.

Beware, that I pulled WikiTicketCalendarMacro development (back) to WikiCalendarMacro. (We even talked about it some time ago, didn't we?) While I'm currently not completely satisfied with trunk code, it is nonetheless running well - for me - with Trac 0.13dev, now providing both macros, better user input sanitization and unicode support, and should do equally well at least with Trac 0.12 too.

comment:2 in reply to:  1 Changed 13 years ago by Ryan J Ollos

Replying to hasienda:

Thanks for pointing out this weakness. I accept this as complaint about an obvious

regression.

Had I been paying more attention I would have reported this as an enhancement, but thanks for accepting the feedback anyway.

Beware, that I pulled WikiTicketCalendarMacro development (back) to WikiCalendarMacro. (We even talked about it some time ago, didn't we?) While I'm currently not completely satisfied with trunk code, it is nonetheless running well - for me - with Trac 0.13dev, now providing both macros, better user input sanitization and unicode support, and should do equally well at least with Trac 0.12 too.

I'm in the process of a Trac 0.11.7 -> 0.12.2 switch over. I hope to have that completed by the end of the weekend. I'll be able to do lots of testing on 0.12.2 for you.

comment:3 Changed 13 years ago by Steffen Hoffmann

(In [10985]) WikiCalendarMacro: Apply fix for packaging without compiled message catalogs, refs #9568.

Similar issues existed for AccountManagerPlugin (#7850), TagsPlugin (#7787) and others before. Previous code (done by me) was just too inconvenient and didn't respect current Trac policy to still treat Babel as optional dependency.

Other, not striktly related changes are just more steps towards next release. This includes especially ongoing documentation of changes.

comment:4 Changed 13 years ago by Ryan J Ollos

I'm up and running now. I'll report back after I've done some additional testing. Thanks!

comment:5 Changed 13 years ago by Steffen Hoffmann

(In [11557]) WikiCalendarMacro: Try header localization according to user pref, refs #7564 and #9568.

Calendar headers are localized according to user preference, if the server has suitable locales installed. Unrelated micro-improvement: CSS tooltip text is slightly magnified now.

comment:6 Changed 12 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

(In [12842]) WikiCalendarMacro: Releasing current, tested macro package as final product, closes #64, #578, #6636, #7564, #7653, #8818, #9568, #9718 and #9719.

After a long time one of the oldest Trac hacks (see changeset [53]) is united with its ambitious fork WikiTicketCalendarMacro for convenience. While maintaining separate wiki pages for both macros, upstream development continues together in the source:wikicalendarmacro/trunk branch.

comment:7 Changed 9 years ago by Patrick Schaaf

Resolution: fixed
Status: closedreopened

With the current version of the macro installed on trac 0.11.6 without babel, I needed two more mocks, classes Locale and UnknownLocaleError, to get it to work. Patch follows as attachment.

Changed 9 years ago by Patrick Schaaf

nobabel fixes against r14364

comment:8 Changed 9 years ago by Patrick Schaaf

Cc: trachacks@… added

comment:9 Changed 9 years ago by Ryan J Ollos

Resolution: fixed
Status: reopenedclosed

In 15112:

2.1.1dev: Add additional mock classes for Trac < 0.12

Patch by bof.

Fixes #9568.

comment:10 Changed 9 years ago by Ryan J Ollos

In 15113:

2.1.1dev: Remove tag_svn_revision

The attribute isn't supported in setuptools >= 10.

Refs #9568.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
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.