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

View file

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

View file

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

View file

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