diff --git a/rhodecode/templates/email_templates/commit_comment.mako b/rhodecode/templates/email_templates/commit_comment.mako --- a/rhodecode/templates/email_templates/commit_comment.mako +++ b/rhodecode/templates/email_templates/commit_comment.mako @@ -1,11 +1,25 @@ ## -*- coding: utf-8 -*- <%inherit file="base.mako"/> + <%def name="subject()" filter="n,trim"> -${_('[mention]') if mention else ''} ${_('%(user)s commented on a commit of %(repo_name)s') % { - 'user': h.person(user), - 'repo_name': repo_name - } } +<% +data = { + 'user': h.person(user), + 'comment_file': comment_file, + 'comment_line': comment_line, + 'repo_name': repo_name, + 'commit_id': h.show_id(commit), +} +%> +${_('[mention]') if mention else ''} \ + +% if comment_file: + ${_('%(user)s commented on commit `%(commit_id)s` (file: `%(comment_file)s`)') % data} ${_('in the %(repo_name)s repository') % data} +% else: + ${_('%(user)s commented on commit `%(commit_id)s`') % data |n} ${_('in the %(repo_name)s repository') % data} +% endif + %def> <%def name="body_plaintext()" filter="n,trim"> @@ -31,18 +45,30 @@ ${self.plaintext_footer()} %def> + +<% +data = { + 'user': h.person(user), + 'comment_file': comment_file, + 'comment_line': comment_line, + 'repo': commit_target_repo, + 'repo_name': repo_name, + 'commit_id': h.show_id(commit), +} +%>
-${_('Generate new password here.') % {'url': password_reset_url} |n} -
\ No newline at end of file +${_('Generate new password here')}. + diff --git a/rhodecode/templates/email_templates/password_reset_confirmation.mako b/rhodecode/templates/email_templates/password_reset_confirmation.mako --- a/rhodecode/templates/email_templates/password_reset_confirmation.mako +++ b/rhodecode/templates/email_templates/password_reset_confirmation.mako @@ -27,4 +27,4 @@ Below is your new access password for Rhpassword:
\ No newline at end of file +password:
diff --git a/rhodecode/templates/email_templates/pull_request_comment.mako b/rhodecode/templates/email_templates/pull_request_comment.mako --- a/rhodecode/templates/email_templates/pull_request_comment.mako +++ b/rhodecode/templates/email_templates/pull_request_comment.mako @@ -1,15 +1,44 @@ ## -*- 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} +<% +data = { + 'user': h.person(user), + 'pr_title': pull_request.title, + 'pr_id': pull_request.pull_request_id, + 'status': status_change, + 'comment_file': comment_file, + 'comment_line': comment_line, +} +%> + +${_('[mention]') if mention else ''} \ + +% if comment_file: + ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s" (file: `%(comment_file)s`)') % data |n} +% else: + % if status_change: + ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s" (status: %(status)s)') % data |n} + % else: + ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s"') % data |n} + % endif + +% endif %def> <%def name="body_plaintext()" filter="n,trim"> +<% +data = { + 'user': h.person(user), + 'pr_title': pull_request.title, + 'pr_id': pull_request.pull_request_id, + 'status': status_change, + 'comment_file': comment_file, + 'comment_line': comment_line, +} +%> ${self.subject()} * ${_('Comment link')}: ${pr_comment_url} @@ -22,39 +51,46 @@ --- +%if status_change and not closing_pr: + ${_('%(user)s submitted pull request #%(pr_id)s status: *%(status)s*') % data} +%elif status_change and closing_pr: + ${_('%(user)s submitted pull request #%(pr_id)s status: *%(status)s and closed*') % data} +%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()} %def> + +<% +data = { + 'user': h.person(user), + 'pr_title': pull_request.title, + 'pr_id': pull_request.pull_request_id, + 'status': status_change, + 'comment_file': comment_file, + 'comment_line': comment_line, +} +%>