Opened 4 years ago

Closed 4 years ago

#10991 closed defect (fixed)

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

Reported by: Jun Omae Owned by: Steffen Hoffmann
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 4 years ago by Steffen Hoffmann

(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 4 years ago by Steffen Hoffmann

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
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.