Fixed some password reset email translation issues

This commit is contained in:
PCoder 2017-09-02 16:24:25 +05:30
parent f701f10e24
commit 1c42623964
4 changed files with 29 additions and 15 deletions

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-02 10:32+0000\n"
"POT-Creation-Date: 2017-09-02 10:50+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -200,17 +200,34 @@ msgstr "Passwort zurücksetzen"
msgid ""
"\n"
"You're receiving this email because you requested a password reset for your "
"user account at %(site_name)s.<br/>\n"
"Please go to the following page and choose a new password: %(base_url)s"
"%(password_reset_url)s<br/>\n"
"If you didn't request a new password, ignore this e-mail.<br/>\n"
"Thank you!\n"
msgstr ""
"\n"
"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei "
"%(site_name)s zurücksetzen möchtest.<br/>\n"
"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s"
"%(password_reset_url)s Solltest du kein neues Passwort angefordert haben, "
"dann ignoriere diese E-Mail.<br/>\n"
"Dankeschön!\n"
#, python-format
msgid ""
"You're receiving this email because you requested a password reset for your "
"user account at %(site_name)s.\n"
"Please go to the following page and choose a new password: %(base_url)s"
"%(password_reset_url)s\n"
"If you didn't request a new password, ignore this e-mail.\n"
"Thank you!\n"
msgstr ""
"\n"
"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei %(site_name)s "
"zurücksetzen möchtest.\n"
"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s%(password_reset_url)s Solltest "
"du kein neues Passwort angefordert haben, dann ignoriere diese E-Mail.\n"
"Du erhälst diese E-Mail da du dein Passwort für deinen Account bei "
"%(site_name)s zurücksetzen möchtest.\n"
"Bitte folge diesem Link und wähle ein neues Passwort: %(base_url)s"
"%(password_reset_url)s Solltest du kein neues Passwort angefordert haben, "
"dann ignoriere diese E-Mail.\n"
"Dankeschön!\n"
msgid "Don't have an account yet ? "

View file

@ -6,9 +6,9 @@
{% block email_body %}
{% url 'hosting:reset_password_confirm' uidb64=uid token=token as password_reset_url %}
{% blocktrans %}
You're receiving this email because you requested a password reset for your user account at {{site_name}}.
Please go to the following page and choose a new password: {{base_url}}{{ password_reset_url }}
If you didn't request a new password, ignore this e-mail.
You're receiving this email because you requested a password reset for your user account at {{site_name}}.<br/>
Please go to the following page and choose a new password: {{base_url}}{{ password_reset_url }}<br/>
If you didn't request a new password, ignore this e-mail.<br/>
Thank you!
{% endblocktrans %}
{% endblock %}

View file

@ -1,12 +1,9 @@
{% extends "datacenterlight/emails/base_email_datacenterlight.txt" %}
{% load i18n %}
{% block email_head %}
{% trans 'Password Reset' %}
{% endblock %}
{% block email_head %}{% trans 'Password Reset' %}{% endblock %}
{% block email_body %}
{% url 'hosting:reset_password_confirm' uidb64=uid token=token as password_reset_url %}
{% blocktrans with amount=article.price%}
You're receiving this email because you requested a password reset for your user account at {{site_name}}.
{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{site_name}}.
Please go to the following page and choose a new password: {{base_url}}{{ password_reset_url }}
If you didn't request a new password, ignore this e-mail.
Thank you!

View file

@ -86,7 +86,7 @@ class PasswordResetViewMixin(FormView):
messages.add_message(self.request, messages.SUCCESS, self.success_message)
context = self.test_generate_email_context(user)
email_data = {
'subject': 'Password Reset',
'subject': _('Password Reset'),
'to': email,
'context': context,
'template_name': 'password_reset_email',