Mercurial > kallithea
changeset 8856:8014ac73587d
mail: drop unicode filter from templates
Unicode is the default in py3, and we no longer pass any non-string arguments
that need stringification before rendering.
This is backing out a part of 4fbab9d5be4d.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 16 Feb 2021 21:38:09 +0100 |
parents | 129244cfc086 |
children | 6c1a8d17b2b9 |
files | kallithea/templates/email/button.txt kallithea/templates/email/changeset_comment.txt kallithea/templates/email/comment.txt kallithea/templates/email/default.txt kallithea/templates/email/header.txt kallithea/templates/email/password_reset.txt kallithea/templates/email/pull_request.txt kallithea/templates/email/pull_request_comment.txt kallithea/templates/email/registration.txt |
diffstat | 9 files changed, 54 insertions(+), 54 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/email/button.txt Tue Feb 16 23:41:17 2021 +0100 +++ b/kallithea/templates/email/button.txt Tue Feb 16 21:38:09 2021 +0100 @@ -1,3 +1,3 @@ <%page args="url,title" />\ -${title|n,unicode}: ${url} +${title|n}: ${url}
--- a/kallithea/templates/email/changeset_comment.txt Tue Feb 16 23:41:17 2021 +0100 +++ b/kallithea/templates/email/changeset_comment.txt Tue Feb 16 21:38:09 2021 +0100 @@ -5,13 +5,13 @@ <%include file="comment.txt" args="text=body,author=cs_comment_user,status=status_change"/>\ -${_('Changeset on')|n,unicode} \ -${cs_target_repo|n,unicode} \ -${_('branch')|n,unicode} \ -${branch|n,unicode}: -"${webutils.shorter(message, 60, firstline=True)|n,unicode}" \ -${_('by')|n,unicode} \ -${cs_author.full_name_and_username|n,unicode}. +${_('Changeset on')|n} \ +${cs_target_repo|n} \ +${_('branch')|n} \ +${branch|n}: +"${webutils.shorter(message, 60, firstline=True)|n}" \ +${_('by')|n} \ +${cs_author.full_name_and_username|n}. <% title = _('View Comment') %>\ <%include file="button.txt" args="url=cs_comment_url,title=title"/>\
--- a/kallithea/templates/email/comment.txt Tue Feb 16 23:41:17 2021 +0100 +++ b/kallithea/templates/email/comment.txt Tue Feb 16 21:38:09 2021 +0100 @@ -1,15 +1,15 @@ <%page args="author,text,status,close=False" />\ -${author|n,unicode}: +${author|n}: %if status: -${_('Status change:')|n,unicode} \ -${status|n,unicode} +${_('Status change:')|n} \ +${status|n} %endif %if close: -${_('The pull request has been closed.')|n,unicode} +${_('The pull request has been closed.')|n} %endif -${text|n,unicode} +${text|n} ## Trailing empty line
--- a/kallithea/templates/email/default.txt Tue Feb 16 23:41:17 2021 +0100 +++ b/kallithea/templates/email/default.txt Tue Feb 16 21:38:09 2021 +0100 @@ -1,4 +1,4 @@ <%block name="header">\ </%block>\ \ -${body|n,unicode}\ +${body|n}\
--- a/kallithea/templates/email/header.txt Tue Feb 16 23:41:17 2021 +0100 +++ b/kallithea/templates/email/header.txt Tue Feb 16 21:38:09 2021 +0100 @@ -3,6 +3,6 @@ ${link} %endif -${title|n,unicode} +${title|n} ## Trailing empty line
--- a/kallithea/templates/email/password_reset.txt Tue Feb 16 23:41:17 2021 +0100 +++ b/kallithea/templates/email/password_reset.txt Tue Feb 16 21:38:09 2021 +0100 @@ -3,19 +3,19 @@ <%include file="header.txt" args="title=title,link=None"/>\ </%block>\ \ -${_('Hello %s') % user|n,unicode}, +${_('Hello %s') % user|n}, -${_('We have received a request to reset the password for your account.')|n,unicode} +${_('We have received a request to reset the password for your account.')|n} %if reset_token is None: -${_('This account is however managed outside this system and the password cannot be changed here.')|n,unicode} +${_('This account is however managed outside this system and the password cannot be changed here.')|n} %else: -${_('To set a new password, click the following link')|n,unicode}: +${_('To set a new password, click the following link')|n}: -${reset_url|n,unicode} +${reset_url|n} -${_("Should you not be able to use the link above, please type the following code into the password reset form")|n,unicode}: -${reset_token|n,unicode} +${_("Should you not be able to use the link above, please type the following code into the password reset form")|n}: +${reset_token|n} %endif -${_("If it weren't you who requested the password reset, just disregard this message.")|n,unicode} +${_("If it weren't you who requested the password reset, just disregard this message.")|n}
--- a/kallithea/templates/email/pull_request.txt Tue Feb 16 23:41:17 2021 +0100 +++ b/kallithea/templates/email/pull_request.txt Tue Feb 16 21:38:09 2021 +0100 @@ -3,30 +3,30 @@ <%include file="header.txt" args="title=title,link=pr_url"/>\ </%block>\ -${_('Pull request')|n,unicode} \ -${pr_nice_id|n,unicode} \ -"${pr_title|n,unicode}" \ -${_('by')|n,unicode} \ -${pr_owner.full_name_and_username|n,unicode} +${_('Pull request')|n} \ +${pr_nice_id|n} \ +"${pr_title|n}" \ +${_('by')|n} \ +${pr_owner.full_name_and_username|n} ${_('from')} \ -${pr_source_repo|n,unicode} \ -${_('branch')|n,unicode} \ -${pr_source_branch|n,unicode} -${_('to')|n,unicode} \ -${pr_target_repo|n,unicode} \ -${_('branch')|n,unicode} \ -${pr_target_branch|n,unicode} +${pr_source_repo|n} \ +${_('branch')|n} \ +${pr_source_branch|n} +${_('to')|n} \ +${pr_target_repo|n} \ +${_('branch')|n} \ +${pr_target_branch|n} -${_('Description')|n,unicode}: +${_('Description')|n}: -${body|n,unicode} +${body|n} -${_('Changesets')|n,unicode}: +${_('Changesets')|n}: %for revision, desc in pr_revisions: -${webutils.shorter(desc, 80, firstline=True)|n,unicode} +${webutils.shorter(desc, 80, firstline=True)|n} %endfor <% title = _('View Pull Request') %>\
--- a/kallithea/templates/email/pull_request_comment.txt Tue Feb 16 23:41:17 2021 +0100 +++ b/kallithea/templates/email/pull_request_comment.txt Tue Feb 16 21:38:09 2021 +0100 @@ -5,19 +5,19 @@ <%include file="comment.txt" args="text=body,author=pr_comment_user,status=status_change,close=closing_pr"/>\ -${_('Pull request')|n,unicode} \ -${pr_nice_id|n,unicode} \ -"${pr_title|n,unicode}" \ -${_('by')|n,unicode} \ -${pr_owner.full_name_and_username|n,unicode} +${_('Pull request')|n} \ +${pr_nice_id|n} \ +"${pr_title|n}" \ +${_('by')|n} \ +${pr_owner.full_name_and_username|n} ${_('from')} \ -${pr_source_repo|n,unicode} \ -${_('branch')|n,unicode} \ -${pr_source_branch|n,unicode} -${_('to')|n,unicode} \ -${pr_target_repo|n,unicode} \ -${_('branch')|n,unicode} \ -${pr_target_branch|n,unicode} +${pr_source_repo|n} \ +${_('branch')|n} \ +${pr_source_branch|n} +${_('to')|n} \ +${pr_target_repo|n} \ +${_('branch')|n} \ +${pr_target_branch|n} <% title = _('View Comment') %>\ <%include file="button.txt" args="url=pr_comment_url,title=title"/>\
--- a/kallithea/templates/email/registration.txt Tue Feb 16 23:41:17 2021 +0100 +++ b/kallithea/templates/email/registration.txt Tue Feb 16 21:38:09 2021 +0100 @@ -3,11 +3,11 @@ <%include file="header.txt" args="title=title,link=registered_user_url"/>\ </%block>\ -${_('Username')|n,unicode}: ${new_username|n,unicode} +${_('Username')|n}: ${new_username|n} -${_('Full Name')|n,unicode}: ${new_full_name|n,unicode} +${_('Full Name')|n}: ${new_full_name|n} -${_('Email')|n,unicode}: ${new_email|n,unicode} +${_('Email')|n}: ${new_email|n} <% title = _('View User Profile') %>\ <%include file="button.txt" args="url=registered_user_url,title=title"/>\