Changeset - 8014ac73587d
[Not reviewed]
default
0 9 0
Mads Kiilerich (mads) - 5 years ago 2021-02-16 21:38:09
mads@kiilerich.com
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.
9 files changed with 54 insertions and 54 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/email/button.txt
Show inline comments
 
<%page args="url,title" />\
 

	
 
${title|n,unicode}: ${url}
 
${title|n}: ${url}
kallithea/templates/email/changeset_comment.txt
Show inline comments
 
@@ -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"/>\
kallithea/templates/email/comment.txt
Show inline comments
 
<%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
kallithea/templates/email/default.txt
Show inline comments
 
<%block name="header">\
 
</%block>\
 
\
 
${body|n,unicode}\
 
${body|n}\
kallithea/templates/email/header.txt
Show inline comments
 
@@ -3,6 +3,6 @@
 
${link}
 

	
 
%endif
 
${title|n,unicode}
 
${title|n}
 

	
 
## Trailing empty line
kallithea/templates/email/password_reset.txt
Show inline comments
 
@@ -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}
kallithea/templates/email/pull_request.txt
Show inline comments
 
@@ -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') %>\
kallithea/templates/email/pull_request_comment.txt
Show inline comments
 
@@ -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"/>\
kallithea/templates/email/registration.txt
Show inline comments
 
@@ -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"/>\
0 comments (0 inline, 0 general)