#10991 closed defect (fixed)

[PATCH] WikiCalendarMacros.get_macro_description() doesn't work on Trac 0.12.x

Reported by: jun66j5 Owned by: hasienda
Priority: normal Component: WikiCalendarMacro
Severity: normal Keywords:
Cc: Trac Release: 0.12


Getting the description for [[WikiCalendar*]], the following is rendered instead.

Error: Can't get description for macro WikiCalendar

global name 'gettext' is not defined
  • wikicalendar/

    1414# by keeping Babel optional here. 
    1616    from trac.util.translation import domain_functions 
    17     add_domain, _, tag_ = \ 
    18         domain_functions('wikicalendar', ('add_domain', '_', 'tag_')) 
     17    add_domain, _, gettext, tag_ = \ 
     18        domain_functions('wikicalendar', 
     19                         ('add_domain', '_', 'gettext', 'tag_')) 
    1920except ImportError: 
    2021    from genshi.builder import tag as tag_ 
    2122    from trac.util.translation import gettext 

Attachments (0)

Change History (2)

comment:1 Changed 18 months ago by hasienda

(In [12846]) WikiCalendarMacro: Extract missing gettext from domain_functions, refs #10991.

As Jun Omae noticed instantly, I forgot to import the gettext call that I
introduced for 0.12 compatibility in [12843] last night.
Thank you for your review and proposed patch.

comment:2 Changed 18 months ago by hasienda

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

(In [12991]) WikiCalendarMacro: Releasing current, tested macro package as final product, closes #7639, #8175, #9718, #10991, #10992 and #10993.

Special thanks to Jun Omae for pushing development by testing and providing
valuable hints in our discussion about utilizing Babel for better
localization and for making macro execution thread-safe as well.

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.