diff --git a/invitations/locale/de/LC_MESSAGES/django.mo b/invitations/locale/de/LC_MESSAGES/django.mo new file mode 100644 index 0000000..6838a4f Binary files /dev/null and b/invitations/locale/de/LC_MESSAGES/django.mo differ diff --git a/invitations/locale/de/LC_MESSAGES/django.po b/invitations/locale/de/LC_MESSAGES/django.po new file mode 100644 index 0000000..d74010a --- /dev/null +++ b/invitations/locale/de/LC_MESSAGES/django.po @@ -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 , 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 \n" +"Language-Team: LANGUAGE \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" diff --git a/invitations/locale/ru/LC_MESSAGES/django.mo b/invitations/locale/ru/LC_MESSAGES/django.mo new file mode 100644 index 0000000..e30779e Binary files /dev/null and b/invitations/locale/ru/LC_MESSAGES/django.mo differ diff --git a/invitations/locale/ru/LC_MESSAGES/django.po b/invitations/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 0000000..ba048dc --- /dev/null +++ b/invitations/locale/ru/LC_MESSAGES/django.po @@ -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 , 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 \n" +"Language-Team: LANGUAGE \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" diff --git a/invitations/templates/invitations/forms/_invite.html b/invitations/templates/invitations/forms/_invite.html index c319d21..56f2bfe 100644 --- a/invitations/templates/invitations/forms/_invite.html +++ b/invitations/templates/invitations/forms/_invite.html @@ -1,7 +1,7 @@ {% load i18n %}

{% trans "Invite" %}

-{% trans "Please add an email below. The user will recieve an email with instructions." %} +{% trans "Please add an email below. The user will receive an email with instructions." %}
{% csrf_token %} diff --git a/invitations/views.py b/invitations/views.py index 8af6869..e3ba5f8 100644 --- a/invitations/views.py +++ b/invitations/views.py @@ -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 @@ -38,10 +39,10 @@ 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}, + form=self.get_form_class())) def form_invalid(self, form): return self.render_to_response(self.get_context_data(form=form))