Skip to content

Commit

Permalink
Merge 80ef321 into 5cbcb9e
Browse files Browse the repository at this point in the history
  • Loading branch information
eugena committed Jan 9, 2018
2 parents 5cbcb9e + 80ef321 commit 6964d2e
Show file tree
Hide file tree
Showing 6 changed files with 211 additions and 3 deletions.
Binary file added invitations/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
103 changes: 103 additions & 0 deletions invitations/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-07 18:53+0500\n"
"PO-Revision-Date: 2018-01-07 18:53+0500\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: base_invitation.py:11
msgid "accepted"
msgstr "angenommen"

#: base_invitation.py:12
msgid "key"
msgstr "Schlüssel"

#: base_invitation.py:13
msgid "sent"
msgstr "gesendet"

#: forms.py:31
msgid "This e-mail address has already been invited."
msgstr "Diese E-Mail-Adresse wurde bereits eingeladen."

#: forms.py:33
msgid "This e-mail address has already accepted an invite."
msgstr "Diese E-Mail-Adresse hat bereits eine Einladung angenommen."

#: forms.py:35
msgid "An active user is using this e-mail address"
msgstr "Ein aktiver Benutzer verwendet diese E-Mail-Adresse"

#: forms.py:51 forms.py:62
msgid "E-mail"
msgstr "E-Mail"

#: models.py:21
msgid "e-mail address"
msgstr "E-Mail-Adresse"

#: models.py:23
msgid "created"
msgstr "erstellt"

#: templates/invitations/email/email_invite_message.txt:3
#, python-format
msgid ""
"\n"
"\n"
"Hello,\n"
"\n"
"You (%(email)s) have been invited to join %(site_name)s\n"
"\n"
"If you'd like to join, please go to %(invite_url)s\n"
"\n"
msgstr ""
"\n"
"\n"
"Hallo,\n"
"\n"
"Sie (%(email)s) wurden eingeladen, %(site_name)s s beizutreten\n"
"\n"
"Wenn Sie mitmachen möchten, gehen Sie bitte zu %(invite_url)s\n"
"\n"

#: templates/invitations/email/email_invite_subject.txt:3
#, python-format
msgid "Invitation to join %(site_name)s"
msgstr "Einladung zum Beitritt %(site_name)s"

#: templates/invitations/forms/_invite.html:3
msgid "Invite"
msgstr "Einladung"

#: templates/invitations/forms/_invite.html:4
msgid ""
"Please add an email below. The user will recieve an email with instructions."
msgstr "Bitte fügen Sie eine E-Mail unten hinzu. Der Benutzer erhält eine E-Mail mit Anweisungen."

#: templates/invitations/forms/_invite.html:9
msgid "Email"
msgstr "E-mail"

#: templates/invitations/messages/invite_accepted.txt:3
#, python-format
msgid "Invitation to - %(email)s - has been accepted"
msgstr "Die an %(email)s gesendete Einladung wurde angenommen"

#: views.py:44
msgid "%(email)s has been invited"
msgstr "Einladung ist an %(email)s gesendet"
Binary file added invitations/locale/ru/LC_MESSAGES/django.mo
Binary file not shown.
105 changes: 105 additions & 0 deletions invitations/locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-07 18:53+0500\n"
"PO-Revision-Date: 2018-01-07 18:53+0500\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"

#: base_invitation.py:11
msgid "accepted"
msgstr "принято"

#: base_invitation.py:12
msgid "key"
msgstr "ключ"

#: base_invitation.py:13
msgid "sent"
msgstr "отправлено"

#: forms.py:31
msgid "This e-mail address has already been invited."
msgstr "На этот e-mail уже отправлено приглашение."

#: forms.py:33
msgid "This e-mail address has already accepted an invite."
msgstr "Приглашение, отправленное на этот e-mail, уже принято."

#: forms.py:35
msgid "An active user is using this e-mail address"
msgstr "Пользователь с e-mail уже существует"

#: forms.py:51 forms.py:62
msgid "E-mail"
msgstr "E-mail"

#: models.py:21
msgid "e-mail address"
msgstr "e-mail адрес"

#: models.py:23
msgid "created"
msgstr "создано"

#: templates/invitations/email/email_invite_message.txt:3
#, python-format
msgid ""
"\n"
"\n"
"Hello,\n"
"\n"
"You (%(email)s) have been invited to join %(site_name)s\n"
"\n"
"If you'd like to join, please go to %(invite_url)s\n"
"\n"
msgstr ""
"\n"
"\n"
"Здравствуйте,\n"
"\n"
"Вы (%(email)s) приглашены присоединиться к проекту %(site_name)s\n"
"\n"
"Если Вы хотите присоединиться, перейдите по ссылке %(invite_url)s\n"
"\n"

#: templates/invitations/email/email_invite_subject.txt:3
#, python-format
msgid "Invitation to join %(site_name)s"
msgstr "Приглашение присоединиться к %(site_name)s"

#: templates/invitations/forms/_invite.html:3
msgid "Invite"
msgstr "Приглашение"

#: templates/invitations/forms/_invite.html:4
msgid ""
"Please add an email below. The user will receive an email with instructions."
msgstr "Введите email ниже и пользователь получит письмо с инструкциями."

#: templates/invitations/forms/_invite.html:9
msgid "Email"
msgstr "Email"

#: templates/invitations/messages/invite_accepted.txt:3
#, python-format
msgid "Invitation to - %(email)s - has been accepted"
msgstr "Приглашение, отправленное на %(email)s, принято"

#: views.py:44
msgid "%(email)s has been invited"
msgstr "Приглашение отправлено на %(email)s"
2 changes: 1 addition & 1 deletion invitations/templates/invitations/forms/_invite.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load i18n %}

<h4 class="title">{% trans "Invite" %}</h4>
<span class="alert alert-info">{% trans "Please add an email below. The user will recieve an email with instructions." %}</span>
<span class="alert alert-info">{% trans "Please add an email below. The user will receive an email with instructions." %}</span>

<form id="invite-form" method="POST" action="{% url 'invitations:send-invite' %}">
{% csrf_token %}
Expand Down
4 changes: 2 additions & 2 deletions invitations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from django.core.validators import validate_email
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext_lazy as _

from .forms import InviteForm, CleanEmailMixin
from .exceptions import AlreadyInvited, AlreadyAccepted, UserRegisteredEmail
Expand Down Expand Up @@ -38,10 +39,9 @@ def form_valid(self, form):
invite.send_invitation(self.request)
except Exception:
return self.form_invalid(form)

return self.render_to_response(
self.get_context_data(
success_message='%s has been invited' % email))
success_message=_('%(email)s has been invited') % {"email": email}))

def form_invalid(self, form):
return self.render_to_response(self.get_context_data(form=form))
Expand Down

0 comments on commit 6964d2e

Please sign in to comment.