Trac电子邮件通知模板语言

时间:2011-10-19 07:45:21

标签: trac

在Trac 0.12中,人们可以change the contents of email notifications,我正在尝试简化模板以仅包含更改,例如

{% choose ticket.new %}\
{%   when True %}\
$ticket_body_hdr
$ticket_props
$ticket.description
{%   end %}\
{%   otherwise %}\
{%     if changes_body %}\
${_('Changes (by %(author)s):', author=change.author)}

$changes_body
{%     end %}\
{%     if changes_descr %}\
{%       if not changes_body and not change.comment and change.author %}\
${_('Description changed by %(author)s:', author=change.author)}
{%       end %}\
$changes_descr
--
{%     end %}\
{%     if change.comment %}\

${changes_body and _('Comment:') or _('Comment (by %(author)s):', author=change.author)}

$change.comment
{%     end %}\
{%   end %}\
{% end %}\
-- 
${_('Ticket URL: <%(link)s>', link=ticket.link)}

但是,我在哪里可以找到模板所用语言的参考?我如何提出一个可以保持修订控制扩展的评论,如$ Id $?

1 个答案:

答案 0 :(得分:3)

Trac将Genshi用于两种不同形式的模板:XML和文本。

我从未使用过TracNotification,但您发布的是文本模板。可以在Genshi wiki找到相关文档。