Changeset - cd3f326d0ff1
[Not reviewed]
default
0 11 0
Thomas De Schampheleire - 6 years ago 2020-04-06 21:29:37
thomas.de_schampheleire@nokia.com
Grafted from: 6cd57f0c9c0a
email templates: fix missing translation of titles and buttons

The buttons and titles of email templates were not correctly translated. The
corresponding strings were not part of the i18n files because they were not
recognized by the extraction logic.

Note: this will generate new translation strings.

Reported-by: Jan Heylen <jan.heylen@nokia.com>
11 files changed with 26 insertions and 13 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/email_templates/changeset_comment.html
Show inline comments
 
<%inherit file="main.html"/>\
 
\
 
<%block name="header">\
 
<% title = _('Mention in Comment on Changeset "%s"') % h.shorter(message, 200, firstline=True) if is_mention else _('Comment on Changeset "%s"') % h.shorter(message, 200, firstline=True) %>\
 
<%include file="header.html" args="title=title,link=cs_comment_url"/>\
 
</%block>\
 
\
 
<table cellpadding="0" cellspacing="0" border="0" width="100%">
 
    <tr>
 
        <td>
 
<%include file="comment.html" args="text=body,author=cs_comment_user,status=status_change"/>\
 
        </td>
 
    </tr>
 
    <tr>
 
        <td height="30px" style="height:30px"></td>
 
    </tr>
 
    <tr>
 
        <td>
 
            <div>
 
                ${_('Changeset on')}
 
                <a style="${link_text_style}"
 
                   href="${cs_target_repo}">${cs_target_repo}</a>
 
                ${_('branch')}
 
                <span style="${data_style}">${branch}</span>:
 
            </div>
 
            <div>
 
                "<a style="${link_style}"
 
                   href="${cs_url}">${h.shorter(message, 60, firstline=True)}</a>"
 
                ${_('by')}
 
                <span style="${data_style}">${cs_author.full_name_and_username}</span>.
 
            </div>
 
        </td>
 
    </tr>
 
    <tr>
 
        <td>
 
<%include file="button.html" args="url=cs_comment_url,title=_('View Comment'),padding_bottom=False"/>\
 
<% title = _('View Comment') %>\
 
<%include file="button.html" args="url=cs_comment_url,title=title,padding_bottom=False"/>\
 
        </td>
 
    </tr>
 
</table>
kallithea/templates/email_templates/changeset_comment.txt
Show inline comments
 
<%block name="header">\
 
<% title = _('Mention in Comment on Changeset "%s"') % h.shorter(message, 200, firstline=True) if is_mention else _('Comment on Changeset "%s"') % h.shorter(message, 200, firstline=True) %>\
 
<%include file="header.txt" args="title=title,link=cs_comment_url"/>\
 
</%block>\
 

	
 
<%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}:
 
"${h.shorter(message, 60, firstline=True)|n,unicode}" \
 
${_('by')|n,unicode} \
 
${cs_author.full_name_and_username|n,unicode}.
 

	
 
<%include file="button.txt" args="url=cs_comment_url,title=_('View Comment')"/>\
 
<% title = _('View Comment') %>\
 
<%include file="button.txt" args="url=cs_comment_url,title=title"/>\
kallithea/templates/email_templates/default.html
Show inline comments
 
<%inherit file="main.html"/>\
 
\
 
<%block name="header">\
 
<%include file="header.html" args="title=_('Message'),link=None"/>\
 
<% title = _('Message') %>\
 
<%include file="header.html" args="title=title,link=None"/>\
 
</%block>\
 
\
 
<table cellpadding="0" cellspacing="0" border="0" width="100%">
 
    <tr>
 
        <td style="${comment_style}">${body}</td>
 
    </tr>
 
</table>
kallithea/templates/email_templates/password_reset.html
Show inline comments
 
<%inherit file="main.html"/>\
 
\
 
<%block name="header">\
 
<%include file="header.html" args="title=_('Password Reset Request'),link=None"/>\
 
<% title = _('Password Reset Request') %>\
 
<%include file="header.html" args="title=title,link=None"/>\
 
</%block>\
 
\
 
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="table-layout:fixed;word-wrap:break-word;">
 
    <tr>
 
        <td>${_('Hello %s') % user},</td>
 
    </tr>
 
    <tr>
 
        <td height="10px" style="height:10px"></td>
 
    </tr>
 
    <tr>
 
        <td>
 
            ${_('We have received a request to reset the password for your account.')}
 
        </td>
 
    </tr>
 
    <tr>
 
        <td height="10px" style="height:10px"></td>
 
    </tr>
 
    <tr>
 
        <td>
 
            %if reset_token is None:
 
                <div>${_('This account is however managed outside this system and the password cannot be changed here.')}</div>
 
            %else:
 
                <div>
 
                    ${_('To set a new password, click the following link')}:
 
                    <br/>
 
                    <a style="${link_style}" href="${reset_url}"
 
                        target="_blank">${reset_url}</a>
 
                    <br/>
 
                    ${_("Should you not be able to use the link above, please type the following code into the password reset form")}:
 
                    <code>${reset_token}</code>
 
                </div>
 
            %endif
 
        </td>
 
    </tr>
 
    <tr>
 
        <td height="10px" style="height:10px"></td>
 
    </tr>
 
    <tr>
 
        <td>
 
            ${_("If it weren't you who requested the password reset, just disregard this message.")}
 
        </td>
 
    </tr>
 
</table>
kallithea/templates/email_templates/password_reset.txt
Show inline comments
 
<%block name="header">\
 
<%include file="header.txt" args="title=_('Password Reset Request'),link=None"/>\
 
<% title = _('Password Reset Request') %>\
 
<%include file="header.txt" args="title=title,link=None"/>\
 
</%block>\
 
\
 
${_('Hello %s') % user|n,unicode},
 

	
 
${_('We have received a request to reset the password for your account.')|n,unicode}
 

	
 
%if reset_token is None:
 
${_('This account is however managed outside this system and the password cannot be changed here.')|n,unicode}
 
%else:
 
${_('To set a new password, click the following link')|n,unicode}:
 

	
 
${reset_url|n,unicode}
 

	
 
${_("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}
 
%endif
 

	
 
${_("If it weren't you who requested the password reset, just disregard this message.")|n,unicode}
kallithea/templates/email_templates/pull_request.html
Show inline comments
 
@@ -37,52 +37,53 @@
 
                ${_('Description')}:
 
            </div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 
    <tr>
 
        <td>
 
            <table cellpadding="0" cellspacing="0" width="100%" border="0" bgcolor="${color_background_grey}" style="border:1px solid ${color_border};border-radius:4px">
 
                <tr>
 
                    <td height="10px" style="height:10px" colspan="3"></td>
 
                </tr>
 
                <tr>
 
                    <td width="20px" style="width:20px"></td>
 
                    <td>
 
                        <div style="${comment_style}">${body}</div>
 
                    </td>
 
                    <td width="20px" style="width:20px"></td>
 
                </tr>
 
                <tr>
 
                    <td height="10px" style="height:10px" colspan="3"></td>
 
                </tr>
 
            </table>
 
        </td>
 
    </tr>
 
    <tr><td height="15px" style="height:15px"></td></tr>
 
    <tr>
 
        <td>
 
            <div>${_('Changesets')}:</div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 

	
 
    <tr>
 
        <td style="${sans_style}">
 
            <ul style="color:${color_link};padding-left:15px;margin:0">
 
                %for revision, desc in pr_revisions:
 
                    <li style="mso-special-format:bullet">
 
                        <a style="${link_style}"
 
                           href="${h.canonical_url('changeset_home', repo_name=org_repo_name, revision=revision)}">
 
                            ${h.shorter(desc, 80, firstline=True)}
 
                        </a>
 
                    </li>
 
                %endfor
 
            </ul>
 
        </td>
 
    </tr>
 
    <tr>
 
        <td>
 
<%include file="button.html" args="url=pr_url,title=_('View Pull Request'),padding_bottom=False"/>\
 
<% title = _('View Pull Request') %>\
 
<%include file="button.html" args="url=pr_url,title=title,padding_bottom=False"/>\
 
        </td>
 
    </tr>
 
</table>
kallithea/templates/email_templates/pull_request.txt
Show inline comments
 
<%block name="header">\
 
<% title = _('Mention on Pull Request %s "%s" by %s') % (pr_nice_id, pr_title, pr_user_created) if is_mention else _('Added as Reviewer of Pull Request %s "%s" by %s') % (pr_nice_id, pr_title, pr_user_created) %>\
 
<%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}
 
${_('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}
 

	
 

	
 
${_('Description')|n,unicode}:
 

	
 
${body|n,unicode}
 

	
 

	
 
${_('Changesets')|n,unicode}:
 

	
 
%for revision, desc in pr_revisions:
 
${h.shorter(desc, 80, firstline=True)|n,unicode}
 
%endfor
 

	
 
<%include file="button.txt" args="url=pr_url,title='View Pull Request'"/>\
 
<% title = _('View Pull Request') %>\
 
<%include file="button.txt" args="url=pr_url,title=title"/>\
kallithea/templates/email_templates/pull_request_comment.html
Show inline comments
 
<%inherit file="main.html"/>\
 
\
 
<%block name="header">\
 
<% title = _('Mention in Comment on Pull Request %s "%s"') % (pr_nice_id, pr_title) if is_mention else _('Pull Request %s "%s" Closed') % (pr_nice_id, pr_title) if closing_pr else _('Comment on Pull Request %s "%s"') % (pr_nice_id, pr_title) %>\
 
<%include file="header.html" args="title=title,link=pr_comment_url"/>\
 
</%block>\
 
\
 
<table cellpadding="0" cellspacing="0" border="0" width="100%">
 
    <tr>
 
        <td>
 
<%include file="comment.html" args="text=body,author=pr_comment_user,status=status_change,close=closing_pr"/>\
 
        </td>
 
    </tr>
 
    <tr>
 
        <td height="30px" style="height:30px"></td>
 
    </tr>
 
    <tr>
 
        <td>
 
            <div>
 
                ${_('Pull request')}
 
                <a style="${link_style}"
 
                   href="${pr_url}">${pr_nice_id} "${pr_title}"</a>
 
                ${_('by')}
 
                <span style="${data_style}">${pr_owner.full_name_and_username}</span>.
 
            </div>
 
            <div>
 
                ${_('from')}
 
                <a style="${link_text_style}"
 
                   href="${pr_source_repo}">${pr_source_repo}</a>
 
                ${_('branch')}
 
                <span style="${data_style}">${pr_source_branch}</span>
 
                <br/>
 
                ${_('to')}
 
                <a style="${link_text_style}"
 
                   href="${pr_target_repo}">${pr_target_repo}</a>
 
                ${_('branch')}
 
                <span style="${data_style}">${pr_target_branch}</span>:
 
            </div>
 
        </td>
 
    </tr>
 
    <tr>
 
        <td>
 
<%include file="button.html" args="url=pr_comment_url,title=_('View Comment'),padding_bottom=False"/>\
 
<% title = _('View Comment') %>\
 
<%include file="button.html" args="url=pr_comment_url,title=title,padding_bottom=False"/>\
 
        </td>
 
    </tr>
 
</table>
kallithea/templates/email_templates/pull_request_comment.txt
Show inline comments
 
<%block name="header">\
 
<% title = _('Mention in Comment on Pull Request %s "%s"') % (pr_nice_id, pr_title) if is_mention else _('Pull Request %s "%s" Closed') % (pr_nice_id, pr_title) if closing_pr else _('Comment on Pull Request %s "%s"') % (pr_nice_id, pr_title) %>\
 
<%include file="header.txt" args="title=title,link=pr_comment_url"/>\
 
</%block>\
 

	
 
<%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}
 
${_('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}
 

	
 
<%include file="button.txt" args="url=pr_comment_url,title=_('View Comment')"/>\
 
<% title = _('View Comment') %>\
 
<%include file="button.txt" args="url=pr_comment_url,title=title"/>\
kallithea/templates/email_templates/registration.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="main.html"/>\
 
\
 
<%block name="header">\
 
<%include file="header.html" args="title=_('New User Registration'),link=registered_user_url"/>\
 
<% title = _('New User Registration') %>\
 
<%include file="header.html" args="title=title,link=registered_user_url"/>\
 
</%block>\
 
\
 
<table cellpadding="0" cellspacing="0" border="0" width="100%">
 
    <tr>
 
        <td>
 
            ${_('Username')}:
 
        </td>
 
        <td style="${data_style}">
 
            ${new_username}
 
        </td>
 
    </tr>
 
    <tr>
 
        <td height="10px" style="height:10px" colspan="2"></td>
 
    </tr>
 
    <tr>
 
        <td>
 
            ${_('Full Name')}:
 
        </td>
 
        <td style="${data_style}">
 
            ${new_full_name}
 
        </td>
 
    </tr>
 
    <tr>
 
        <td height="10px" style="height:10px" colspan="2"></td>
 
    </tr>
 
    <tr>
 
        <td>
 
            ${_('Email')}:
 
        </td>
 
        <td style="${data_style}">
 
            ${new_email}
 
        </td>
 
    </tr>
 
    <tr>
 
        <td colspan="2">
 
<%include file="button.html" args="url=registered_user_url,title=_('View User Profile'),padding_bottom=False"/>\
 
<% title = _('View User Profile') %>\
 
<%include file="button.html" args="url=registered_user_url,title=title,padding_bottom=False"/>\
 
        </td>
 
    </tr>
 
</table>
kallithea/templates/email_templates/registration.txt
Show inline comments
 
<%block name="header">\
 
<%include file="header.txt" args="title=_('New User Registration'),link=registered_user_url"/>\
 
<% title = _('New User Registration') %>\
 
<%include file="header.txt" args="title=title,link=registered_user_url"/>\
 
</%block>\
 

	
 
${_('Username')|n,unicode}: ${new_username|n,unicode}
 

	
 
${_('Full Name')|n,unicode}: ${new_full_name|n,unicode}
 

	
 
${_('Email')|n,unicode}: ${new_email|n,unicode}
 

	
 
<%include file="button.txt" args="url=registered_user_url,title='View User Profile'"/>\
 
<% title = _('View User Profile') %>\
 
<%include file="button.txt" args="url=registered_user_url,title=title"/>\
0 comments (0 inline, 0 general)