#1461: [PATCH] Genshi and i18n
---------------------------------+------------------------------------------
Reporter: dbrattli | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 1.1 beta 2
Component: TurboGears | Version: 1.0.3
Severity: normal | Resolution:
Keywords: needs documentation |
---------------------------------+------------------------------------------
Comment (by dbrattli):
Sounds good. I would suggest that we look at the i18n.run_template_filter
config setting and only insert the genshi filter if it's set. That way we
do not need to write up any more documentation than there already is,
since things should work the same way as for Kid. Developers then don't
have to set up the filter themselves. Something like:
{{{
def genshi_loader_callback(template):
template.filters.insert(0, Translator(gettext))
get = config.get
engine_options = {
...
}
if get("i18n.run_template_filter", False):
engine_options["genshi.loader_callback"] = genshi_loader_callback
....
}}}
To early in the morning for me to find a way to write that "if" inside the
engine_options dict ;-)
--
Ticket URL: <http://trac.turbogears.org/ticket/1461#comment:14>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---