## -*- coding: utf-8 -*- <%inherit file="base.mako"/> <%def name="subject()" filter="n,trim"> ${_('[mention]') if mention else ''} ${_('%(user)s commented on pull request #%(pr_id)s: "%(pr_title)s"') % { 'user': h.person(user), 'pr_title': pull_request.title, 'pr_id': pull_request.pull_request_id } |n} <%def name="body_plaintext()" filter="n,trim"> ${self.subject()} * ${_('Comment link')}: ${pr_comment_url} * ${_('Source repository')}: ${pr_source_repo_url} %if comment_file: * ${_('File: %(comment_file)s on line %(comment_line)s') % {'comment_file': comment_file, 'comment_line': comment_line}} %endif --- ${comment_body|n} %if status_change and not closing_pr: ${_('Pull request status was changed to')}: *${status_change}* %elif status_change and closing_pr: ${_('Pull request was closed with status')}: *${status_change}* %endif ${self.plaintext_footer()} % if comment_file: %endif %if status_change and not closing_pr: %elif status_change and closing_pr: %endif

% if comment_file: ${_('%(user)s commented on %(comment_file)s on pull request #%(pr_id)s: "%(pr_title)s".') % {'user': h.person(user), 'comment_file': comment_file, 'pr_title': pull_request.title, 'pr_id': pull_request.pull_request_id} |n} % elif status_change and not closing_pr: ${_('%(user)s changed the status of pull request #%(pr_id)s "%(pr_title)s" to %(status)s.') % {'user': h.person(user),'pr_title': pull_request.title,'pr_id': pull_request.pull_request_id, 'status': status_change} |n} %elif status_change and closing_pr: ${_('%(user)s closed pull request #%(pr_id)s "%(pr_title)s" with status %(status)s.') % {'user': h.person(user),'pr_title': pull_request.title,'pr_id': pull_request.pull_request_id, 'status': status_change} |n} %else: ${_('%(user)s commented in pull request #%(pr_id)s "%(pr_title)s".') % {'user': h.person(user),'pr_title': pull_request.title,'pr_id': pull_request.pull_request_id} |n} % endif

${_('Source')}${pr_source_repo.repo_name}
${_('File')}${_('%(comment_file)s on line %(comment_line)s') % {'comment_file': comment_file, 'comment_line': comment_line}}
${_('Status')}${_('The commit status was changed to')} ${status_change}
${_('Status')}${_('Pull request was closed with status')}: ${status_change}
${_('Comment')}${h.render(comment_body, renderer=renderer_type, mentions=True)}