# HG changeset patch # User Andrew Shadura # Date 1422044770 -3600 # Node ID 4fbab9d5be4d6b66baef106d9f605d5baaf319f2 # Parent 3a3ec35466e72de25821fabf4dc3cacb52dae6b5 email templates: don't do HTML escaping in plain text templates - convert to Unicode diff -r 3a3ec35466e7 -r 4fbab9d5be4d kallithea/templates/email_templates/changeset_comment.txt --- a/kallithea/templates/email_templates/changeset_comment.txt Mon Feb 23 22:11:38 2015 +0100 +++ b/kallithea/templates/email_templates/changeset_comment.txt Fri Jan 23 21:26:10 2015 +0100 @@ -2,18 +2,18 @@ <%inherit file="main.txt"/> %if is_mention: -${_('Comment from %s on %s changeset %s mentioned you') % (cs_comment_user, cs_target_repo, h.short_id(raw_id))}: +${_('Comment from %s on %s changeset %s mentioned you') % (cs_comment_user, cs_target_repo, h.short_id(raw_id))|n,unicode}: %else: -${_('Comment from %s on %s changeset %s') % (cs_comment_user, cs_target_repo, h.short_id(raw_id))}: +${_('Comment from %s on %s changeset %s') % (cs_comment_user, cs_target_repo, h.short_id(raw_id))|n,unicode}: %endif -${body} +${body|n,unicode} %if status_change: -${_('The changeset status was changed to')}: ${status_change} +${_('The changeset status was changed to')|n,unicode}: ${status_change|n,unicode} %endif -${_('URL')}: ${cs_comment_url} +${_('URL')|n,unicode}: ${cs_comment_url|n,unicode} -${_('Changeset')}: ${h.short_id(raw_id)} -${_('Description')}: -${h.shorter(message, 256)} +${_('Changeset')|n,unicode}: ${h.short_id(raw_id)|n,unicode} +${_('Description')|n,unicode}: +${h.shorter(message, 256)|n,unicode} diff -r 3a3ec35466e7 -r 4fbab9d5be4d kallithea/templates/email_templates/default.txt --- a/kallithea/templates/email_templates/default.txt Mon Feb 23 22:11:38 2015 +0100 +++ b/kallithea/templates/email_templates/default.txt Fri Jan 23 21:26:10 2015 +0100 @@ -1,4 +1,4 @@ ## -*- coding: utf-8 -*- <%inherit file="main.txt"/> -${body} +${body|n,unicode} diff -r 3a3ec35466e7 -r 4fbab9d5be4d kallithea/templates/email_templates/main.txt --- a/kallithea/templates/email_templates/main.txt Mon Feb 23 22:11:38 2015 +0100 +++ b/kallithea/templates/email_templates/main.txt Fri Jan 23 21:26:10 2015 +0100 @@ -1,4 +1,4 @@ -${self.body()} +${self.body()|n,unicode} -- -${_("This is an automatic notification. Don't reply to this mail.")} +${_("This is an automatic notification. Don't reply to this mail.")|n,unicode} diff -r 3a3ec35466e7 -r 4fbab9d5be4d kallithea/templates/email_templates/password_reset.txt --- a/kallithea/templates/email_templates/password_reset.txt Mon Feb 23 22:11:38 2015 +0100 +++ b/kallithea/templates/email_templates/password_reset.txt Fri Jan 23 21:26:10 2015 +0100 @@ -1,11 +1,11 @@ ## -*- coding: utf-8 -*- <%inherit file="main.txt"/> -${_('Hello %s') % user} +${_('Hello %s') % user|n,unicode} -${_('We received a request to create a new password for your account.')} -${_('You can generate it by clicking following URL')}: +${_('We received a request to create a new password for your account.')|n,unicode} +${_('You can generate it by clicking following URL')|n,unicode}: -${reset_url} +${reset_url|n,unicode} -${_("Please ignore this email if you did not request a new password .")} +${_("Please ignore this email if you did not request a new password .")|n,unicode} diff -r 3a3ec35466e7 -r 4fbab9d5be4d kallithea/templates/email_templates/pull_request.txt --- a/kallithea/templates/email_templates/pull_request.txt Mon Feb 23 22:11:38 2015 +0100 +++ b/kallithea/templates/email_templates/pull_request.txt Fri Jan 23 21:26:10 2015 +0100 @@ -2,19 +2,19 @@ <%inherit file="main.txt"/> %if is_mention: -${_('%s mentioned you on %s pull request "%s"') % (pr_user_created, repo_name, pr_title)} +${_('%s mentioned you on %s pull request "%s"') % (pr_user_created, repo_name, pr_title)|n,unicode} %else: -${_('%s requested your review of %s pull request "%s"') % (pr_user_created, repo_name, pr_title)} +${_('%s requested your review of %s pull request "%s"') % (pr_user_created, repo_name, pr_title)|n,unicode} %endif -${_('URL')}: ${pr_url} +${_('URL')|n,unicode}: ${pr_url|n,unicode} -${_('Description')}: -${body} +${_('Description')|n,unicode}: +${body|n,unicode} -${_('Changesets')}: +${_('Changesets')|n,unicode}: %for r,r_msg in pr_revisions: -${h.short_id(r)}: -${h.shorter(r_msg, 256)} +${h.short_id(r)|n,unicode}: +${h.shorter(r_msg, 256)|n,unicode} %endfor diff -r 3a3ec35466e7 -r 4fbab9d5be4d kallithea/templates/email_templates/pull_request_comment.txt --- a/kallithea/templates/email_templates/pull_request_comment.txt Mon Feb 23 22:11:38 2015 +0100 +++ b/kallithea/templates/email_templates/pull_request_comment.txt Fri Jan 23 21:26:10 2015 +0100 @@ -1,15 +1,15 @@ ## -*- coding: utf-8 -*- <%inherit file="main.txt"/> -${_('Comment from %s on %s pull request "%s"') % (pr_comment_user, repo_name, pr_title)}: -${body} +${_('Comment from %s on %s pull request "%s"') % (pr_comment_user, repo_name, pr_title)|n,unicode}: +${body|n,unicode} %if status_change: %if closing_pr: -${_('The comment closed the pull request with status')}: ${status_change} +${_('The comment closed the pull request with status')|n,unicode}: ${status_change|n,unicode} %else: -${_('The comment was made with status')}: ${status_change} +${_('The comment was made with status')|n,unicode}: ${status_change|n,unicode} %endif %endif -${_('URL')}: ${pr_comment_url} +${_('URL')|n,unicode}: ${pr_comment_url|n,unicode} diff -r 3a3ec35466e7 -r 4fbab9d5be4d kallithea/templates/email_templates/registration.txt --- a/kallithea/templates/email_templates/registration.txt Mon Feb 23 22:11:38 2015 +0100 +++ b/kallithea/templates/email_templates/registration.txt Fri Jan 23 21:26:10 2015 +0100 @@ -1,6 +1,6 @@ ## -*- coding: utf-8 -*- <%inherit file="main.txt"/> -${body} +${body|n,unicode} -${_('View this user here')}: ${registered_user_url} +${_('View this user here')|n,unicode}: ${registered_user_url|n,unicode}