Changeset 8999
- Timestamp:
- Jan 3, 2010, 1:19:32 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/setup.py
r8884 r8999 19 19 try: 20 20 import babel 21 extractors = [ 22 ('**.py', 'python', None), 23 ('**/templates/**.html', 'genshi', None), 24 ('**/templates/**.txt', 'genshi', 25 {'template_class': 'genshi.template:NewTextTemplate'}), 26 ] 21 27 extra['message_extractors'] = { 22 'trac': [ 23 ('**.py', 'python', None), 24 ('**/templates/**.html', 'genshi', None), 25 ('**/templates/**.txt', 'genshi', { 26 'template_class': 'genshi.template:TextTemplate' 27 }) 28 ], 29 'tracopt': [ 30 ('**.py', 'python', None) 31 ] 28 'trac': extractors, 29 'tracopt': extractors, 32 30 } 33 31 except ImportError: -
trunk/trac/ticket/notification.py
r8847 r8999 24 24 from trac.util.text import CRLF, wrap, obfuscate_email_address 25 25 26 from genshi.template.text import TextTemplate26 from genshi.template.text import NewTextTemplate 27 27 28 28 class TicketNotificationSystem(Component): … … 218 218 def format_subj(self, summary): 219 219 template = self.config.get('notification','ticket_subject_template') 220 template = TextTemplate(template.encode('utf8'))220 template = NewTextTemplate(template.encode('utf8')) 221 221 222 222 prefix = self.config.get('notification', 'smtp_subject_prefix') -
trunk/trac/ticket/templates/ticket_notify_email.txt
r8970 r8999 1 1 $ticket_body_hdr 2 2 $ticket_props 3 #choose ticket.new 4 #when True 3 {% choose ticket.new %}\ 4 {% when True %}\ 5 5 $ticket.description 6 #end 7 #otherwise 8 #if changes_body 6 {% end %}\ 7 {% otherwise %}\ 8 {% if changes_body %}\ 9 9 Changes (by $change.author): 10 10 11 11 $changes_body 12 #end 13 #if changes_descr 14 #if not changes_body and not change.comment and change.author 12 {% end %}\ 13 {% if changes_descr %}\ 14 {% if not changes_body and not change.comment and change.author %}\ 15 15 Description changed by $change.author: 16 #end 16 {% end %}\ 17 17 $changes_descr 18 18 -- 19 #end 20 #if change.comment 19 {% end %}\ 20 {% if change.comment %}\ 21 21 22 22 Comment${not changes_body and ' (by %s)' % change.author or ''}: 23 23 24 24 $change.comment 25 #end 26 #end 27 #end 25 {% end %}\ 26 {% end %}\ 27 {% end %}\ 28 28 29 29 -- -
trunk/trac/versioncontrol/templates/revisionlog.txt
r6331 r8999 5 5 # ${format_datetime()} 6 6 7 #for item in items 8 #with change = changes[item.rev]; extra = extra_changes[item.rev] 7 {% for item in items %}\ 8 {% with change = changes[item.rev]; extra = extra_changes[item.rev] %}\ 9 9 ${http_date(change.date)} ${format_author(change.author)} [$item.rev] 10 #for idx, file in enumerate(extra.files) 10 {% for idx, file in enumerate(extra.files) %}\ 11 11 * $file (${dict(edit='modified', add='added', delete='deleted', 12 12 copy='copied', move='moved')[extra.actions[idx]]}) 13 #end 13 {% end %}\ 14 14 15 15 ${verbose and extra.message or shorten_line(extra.message)} 16 16 17 17 18 #end 19 #end 18 {% end %}\ 19 {% end %}\ -
trunk/trac/web/chrome.py
r8952 r8999 50 50 from genshi.core import Attrs, START 51 51 from genshi.output import DocType 52 from genshi.template import TemplateLoader, MarkupTemplate, TextTemplate52 from genshi.template import TemplateLoader, MarkupTemplate, NewTextTemplate 53 53 54 54 from trac import __version__ as VERSION … … 767 767 768 768 Also, if the optional `method` argument is set to `'text'`, a 769 TextTemplate instance will be created instead of a MarkupTemplate. 769 `NewTextTemplate` instance will be created instead of a 770 `MarkupTemplate`. 770 771 """ 771 772 if not self.templates: … … 782 783 variable_lookup='lenient', callback=_template_loaded) 783 784 if method == 'text': 784 cls = TextTemplate785 cls = NewTextTemplate 785 786 else: 786 787 cls = MarkupTemplate … … 793 794 794 795 The `content_type` argument is used to choose the kind of template 795 used ( TextTemplate if `'text/plain'`, MarkupTemplate otherwise), and796 tweak the rendering process (use of XHTML Strict doctype if796 used (`NewTextTemplate` if `'text/plain'`, `MarkupTemplate` otherwise), 797 and tweak the rendering process (use of XHTML Strict doctype if 797 798 `'text/html'` is given). 798 799
Note:
See TracChangeset
for help on using the changeset viewer.