Modify ↓
Opened 12 years ago
Closed 12 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 |
Description
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/api.py
14 14 # by keeping Babel optional here. 15 15 try: 16 16 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_')) 19 20 except ImportError: 20 21 from genshi.builder import tag as tag_ 21 22 from trac.util.translation import gettext
Attachments (0)
Change History (2)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → 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.
Note: See
TracTickets for help on using
tickets.
(In [12846]) WikiCalendarMacro: Extract missing
gettext
fromdomain_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.