Commit 2701ba05 authored by Isataev Adlet's avatar Isataev Adlet

Сделал поля описание и пол мультиязычными

parent def0b55b
from django import forms from django import forms
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.utils.translation import gettext_lazy as _
from accounts.models import Profile from accounts.models import Profile
class RegistrationForm(forms.ModelForm): class RegistrationForm(forms.ModelForm):
password = forms.CharField(label="Password", required=True, strip=False, widget=forms.PasswordInput) password = forms.CharField(label=_("Password"), required=True, strip=False, widget=forms.PasswordInput)
password_confirm = forms.CharField(label="Confirm Password", required=True, strip=False, widget=forms.PasswordInput) password_confirm = forms.CharField(label=_("ConfirmPassword"), required=True, strip=False,
widget=forms.PasswordInput)
email = forms.EmailField(label="Email", required=True, widget=forms.EmailInput) email = forms.EmailField(label=_("Email"), required=True, widget=forms.EmailInput)
def clean(self): def clean(self):
clean_data = super().clean() clean_data = super().clean()
...@@ -34,13 +36,15 @@ class RegistrationForm(forms.ModelForm): ...@@ -34,13 +36,15 @@ class RegistrationForm(forms.ModelForm):
class Meta: class Meta:
model = User model = User
fields = ["username", "first_name", "last_name", "email", "password", "password_confirm"] fields = ["username", "first_name", "last_name", "email", "password", "password_confirm"]
labels = {"first_name": _("Name"), "last_name": _("Surname"), "email": _("Email"), "username": _("username"),
"password": _("Password"), "password_confirm": _("ConfirmPassword")}
class UserChangeForm(forms.ModelForm): class UserChangeForm(forms.ModelForm):
class Meta: class Meta:
model = get_user_model() model = get_user_model()
fields = ["first_name", "last_name", "email"] fields = ["first_name", "last_name", "email"]
labels = {"first_name": "Name", "last_name": "Surname", "email": "Email"} labels = {"first_name": _("Name"), "last_name": _("Surname"), "email": _("Email")}
class ProfileChangeForm(forms.ModelForm): class ProfileChangeForm(forms.ModelForm):
...@@ -49,14 +53,15 @@ class ProfileChangeForm(forms.ModelForm): ...@@ -49,14 +53,15 @@ class ProfileChangeForm(forms.ModelForm):
class Meta: class Meta:
model = Profile model = Profile
exclude = ["user"] exclude = ["user"]
labels = {"birth_date": _("BirthDate")}
class PasswordChangeForm(forms.ModelForm): class PasswordChangeForm(forms.ModelForm):
old_password = forms.CharField(label="Old password", strip=False, old_password = forms.CharField(label=_("OldPassword"), strip=False,
widget=forms.PasswordInput) widget=forms.PasswordInput)
password = forms.CharField(label="Password", strip=False, password = forms.CharField(label=_("Password"), strip=False,
widget=forms.PasswordInput) widget=forms.PasswordInput)
password_confirm = forms.CharField(label="Confirm password", strip=False, password_confirm = forms.CharField(label=_("ConfirmPassword"), strip=False,
widget=forms.PasswordInput) widget=forms.PasswordInput)
def clean_password_confirm(self): def clean_password_confirm(self):
...@@ -82,4 +87,5 @@ class PasswordChangeForm(forms.ModelForm): ...@@ -82,4 +87,5 @@ class PasswordChangeForm(forms.ModelForm):
class Meta: class Meta:
model = get_user_model() model = get_user_model()
fields = ["old_password", "password", "password_confirm"] fields = ["old_password", "password", "password_confirm"]
\ No newline at end of file labels = {"old_password": _("OldPassword"), "password": _("Password"), "password_confirm": _("ConfirmPassword")}
# Generated by Django 3.2.9 on 2021-12-01 13:31
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('accounts', '0003_auto_20211103_1250'),
]
operations = [
migrations.AlterField(
model_name='gender',
name='name',
field=models.CharField(max_length=15, verbose_name='Gender'),
),
migrations.AlterField(
model_name='profile',
name='birth_date',
field=models.DateField(blank=True, null=True, verbose_name='BirthDate'),
),
migrations.AlterField(
model_name='profile',
name='gender',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='accounts.gender', verbose_name='GenderUser'),
),
migrations.AlterField(
model_name='profile',
name='phone_number',
field=models.CharField(blank=True, max_length=25, null=True, verbose_name='PhoneNumber'),
),
migrations.AlterField(
model_name='profile',
name='user',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL, verbose_name='User'),
),
]
# Generated by Django 3.2.9 on 2021-12-01 18:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0004_auto_20211201_1931'),
]
operations = [
migrations.AddField(
model_name='gender',
name='name_en',
field=models.CharField(max_length=15, null=True, verbose_name='Gender'),
),
migrations.AddField(
model_name='gender',
name='name_kz',
field=models.CharField(max_length=15, null=True, verbose_name='Gender'),
),
migrations.AddField(
model_name='gender',
name='name_ru',
field=models.CharField(max_length=15, null=True, verbose_name='Gender'),
),
]
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
{% endifequal %} {% endifequal %}
<div> <div>
<p>Username: {{ user_obj.username }}</p> <p>{% trans "username" %}: {{ user_obj.username }}</p>
<p>{% trans "FirstName" %}: {{ user_obj.first_name }}</p> <p>{% trans "FirstName" %}: {{ user_obj.first_name }}</p>
<p>{% trans "LastName" %}: {{ user_obj.last_name }}</p> <p>{% trans "LastName" %}: {{ user_obj.last_name }}</p>
<p>{% trans "BirthDate" %}: {{ user_obj.profile.birth_date }}</p> <p>{% trans "BirthDate" %}: {{ user_obj.profile.birth_date }}</p>
......
from modeltranslation.translator import translator, TranslationOptions
from .models import Gender
class GenderTranslationOptions(TranslationOptions):
fields = ('name', )
translator.register(Gender, GenderTranslationOptions)
\ No newline at end of file
...@@ -8,7 +8,7 @@ msgid "" ...@@ -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: 2021-12-01 18:26+0600\n" "POT-Creation-Date: 2021-12-02 00:09+0600\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"
...@@ -17,18 +17,51 @@ msgstr "" ...@@ -17,18 +17,51 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: accounts/forms.py:10 accounts/forms.py:40 accounts/forms.py:62
#: accounts/forms.py:91 accounts/templates/registration/login.html:15
msgid "Password"
msgstr "Password"
#: accounts/forms.py:12 accounts/forms.py:40 accounts/forms.py:64
#: accounts/forms.py:91
msgid "ConfirmPassword"
msgstr "Confirm Password"
#: accounts/forms.py:15 accounts/forms.py:39 accounts/forms.py:47
#: accounts/templates/user_detail.html:25
msgid "Email"
msgstr "Email"
#: accounts/forms.py:39 accounts/forms.py:47
msgid "Name"
msgstr "First Name"
#: accounts/forms.py:39 accounts/forms.py:47
msgid "Surname"
msgstr "Last Name"
#: accounts/forms.py:39 accounts/templates/user_detail.html:19
msgid "username"
msgstr "Username"
#: accounts/forms.py:56 accounts/models.py:17
#: accounts/templates/user_detail.html:22
msgid "BirthDate"
msgstr "Birth Date"
#: accounts/forms.py:60 accounts/forms.py:91
msgid "OldPassword"
msgstr "Old Password"
#: accounts/models.py:7 accounts/templates/user_detail.html:23 #: accounts/models.py:7 accounts/templates/user_detail.html:23
msgid "Gender" msgid "Gender"
msgstr "" msgstr "Gender"
#: accounts/models.py:15 #: accounts/models.py:15
msgid "User" msgid "User"
msgstr "User" msgstr "User"
#: accounts/models.py:17 accounts/templates/user_detail.html:22
msgid "BirthDate"
msgstr "Birth Date"
#: accounts/models.py:19 accounts/templates/user_detail.html:24 #: accounts/models.py:19 accounts/templates/user_detail.html:24
msgid "PhoneNumber" msgid "PhoneNumber"
msgstr "Phone Number" msgstr "Phone Number"
...@@ -67,10 +100,6 @@ msgstr "Login or password error" ...@@ -67,10 +100,6 @@ msgstr "Login or password error"
msgid "Username" msgid "Username"
msgstr "Username" msgstr "Username"
#: accounts/templates/registration/login.html:15
msgid "Password"
msgstr "Password"
#: accounts/templates/registration/login.html:17 #: accounts/templates/registration/login.html:17
msgid "LoginBtn" msgid "LoginBtn"
msgstr "Login" msgstr "Login"
...@@ -91,10 +120,6 @@ msgstr "First Name" ...@@ -91,10 +120,6 @@ msgstr "First Name"
msgid "LastName" msgid "LastName"
msgstr "Last Name" msgstr "Last Name"
#: accounts/templates/user_detail.html:25
msgid "Email"
msgstr "Email"
#: speed_dating/settings.py:130 #: speed_dating/settings.py:130
msgid "English" msgid "English"
msgstr "English" msgstr "English"
...@@ -107,6 +132,14 @@ msgstr "Russian" ...@@ -107,6 +132,14 @@ msgstr "Russian"
msgid "Kazakh" msgid "Kazakh"
msgstr "Kazakh" msgstr "Kazakh"
#: webapp/forms.py:13 webapp/models.py:21
msgid "PlaceEvent"
msgstr "Place Event"
#: webapp/forms.py:13 webapp/models.py:23
msgid "DateEvent"
msgstr "Date Event"
#: webapp/models.py:7 #: webapp/models.py:7
msgid "NameRestaurant" msgid "NameRestaurant"
msgstr "Name Restaurant" msgstr "Name Restaurant"
...@@ -123,14 +156,6 @@ msgstr "Photo Restaurant" ...@@ -123,14 +156,6 @@ msgstr "Photo Restaurant"
msgid "DescriptionRestaurant" msgid "DescriptionRestaurant"
msgstr "Description Restaurant" msgstr "Description Restaurant"
#: webapp/models.py:21
msgid "PlaceEvent"
msgstr "Place Event"
#: webapp/models.py:23
msgid "DateEvent"
msgstr "Date Event"
#: webapp/models.py:25 #: webapp/models.py:25
msgid "ParticipantsEvent" msgid "ParticipantsEvent"
msgstr "Participants Event" msgstr "Participants Event"
...@@ -144,31 +169,31 @@ msgstr "Participants List" ...@@ -144,31 +169,31 @@ msgstr "Participants List"
msgid "BackBtn" msgid "BackBtn"
msgstr "Back" msgstr "Back"
#: webapp/templates/base.html:17 #: webapp/templates/base.html:18
msgid "Home" msgid "Home"
msgstr "Speed Dating" msgstr "Speed Dating"
#: webapp/templates/base.html:25 #: webapp/templates/base.html:26
msgid "Events" msgid "Events"
msgstr "Events" msgstr "Events"
#: webapp/templates/base.html:30 #: webapp/templates/base.html:31
msgid "CreateEvent" msgid "CreateEvent"
msgstr "Create Event" msgstr "Create Event"
#: webapp/templates/base.html:37 #: webapp/templates/base.html:38
msgid "logout" msgid "logout"
msgstr "logout" msgstr "logout"
#: webapp/templates/base.html:41 #: webapp/templates/base.html:42
msgid "Hello" msgid "Hello"
msgstr "Hello" msgstr "Hello"
#: webapp/templates/base.html:46 #: webapp/templates/base.html:47
msgid "Login" msgid "Login"
msgstr "Login" msgstr "Login"
#: webapp/templates/base.html:50 #: webapp/templates/base.html:51
msgid "Registration" msgid "Registration"
msgstr "Registration" msgstr "Registration"
...@@ -210,7 +235,9 @@ msgstr "Participate" ...@@ -210,7 +235,9 @@ msgstr "Participate"
#: webapp/templates/event_detail.html:33 #: webapp/templates/event_detail.html:33
msgid "YouNeedTtoFillOutYourProfile" msgid "YouNeedTtoFillOutYourProfile"
msgstr "You need to fill out your profile. Click on your login, which is located at the top" msgstr ""
"You need to fill out your profile. Click on your login, which is located at "
"the top"
#: webapp/templates/event_detail.html:37 #: webapp/templates/event_detail.html:37
msgid "ParticipateListBtn" msgid "ParticipateListBtn"
...@@ -234,7 +261,15 @@ msgstr "What Is Speed Dating?" ...@@ -234,7 +261,15 @@ msgstr "What Is Speed Dating?"
#: webapp/templates/index.html:26 #: webapp/templates/index.html:26
msgid "LongTextIndex" msgid "LongTextIndex"
msgstr "Participants, as a rule, are selected according to equal social groups. Some organizers are introducing age restrictions. At a classic speed dating party, each participant will have 10-15 private meetings with members of the opposite sex. The girls are seated at tables with numbers. Every 3–7 minutes, men are sequentially transplanted from one girl to another. After each meeting, guests mark their impressions of the interlocutor in the sympathy card or directly exchange contacts. Next, the organizers compare the sympathy cards, and in case of a match +, send contacts to participants." msgstr ""
"Participants, as a rule, are selected according to equal social groups. Some "
"organizers are introducing age restrictions. At a classic speed dating "
"party, each participant will have 10-15 private meetings with members of the "
"opposite sex. The girls are seated at tables with numbers. Every 3–7 "
"minutes, men are sequentially transplanted from one girl to another. After "
"each meeting, guests mark their impressions of the interlocutor in the "
"sympathy card or directly exchange contacts. Next, the organizers compare "
"the sympathy cards, and in case of a match +, send contacts to participants."
#: webapp/templates/participate.html:7 #: webapp/templates/participate.html:7
msgid "ParticipateInTheEvent" msgid "ParticipateInTheEvent"
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -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: 2021-12-01 18:26+0600\n" "POT-Creation-Date: 2021-12-02 00:09+0600\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"
...@@ -17,6 +17,42 @@ msgstr "" ...@@ -17,6 +17,42 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: accounts/forms.py:10 accounts/forms.py:40 accounts/forms.py:62
#: accounts/forms.py:91 accounts/templates/registration/login.html:15
msgid "Password"
msgstr "құпия сөз"
#: accounts/forms.py:12 accounts/forms.py:40 accounts/forms.py:64
#: accounts/forms.py:91
msgid "ConfirmPassword"
msgstr "Растау құпия сөз"
#: accounts/forms.py:15 accounts/forms.py:39 accounts/forms.py:47
#: accounts/templates/user_detail.html:25
msgid "Email"
msgstr "Пошта"
#: accounts/forms.py:39 accounts/forms.py:47
msgid "Name"
msgstr "Аты"
#: accounts/forms.py:39 accounts/forms.py:47
msgid "Surname"
msgstr "Тегі"
#: accounts/forms.py:39 accounts/templates/user_detail.html:19
msgid "username"
msgstr "Қолданушының аты"
#: accounts/forms.py:56 accounts/models.py:17
#: accounts/templates/user_detail.html:22
msgid "BirthDate"
msgstr "Туган кунi"
#: accounts/forms.py:60 accounts/forms.py:91
msgid "OldPassword"
msgstr "Ескі құпия сөз"
#: accounts/models.py:7 accounts/templates/user_detail.html:23 #: accounts/models.py:7 accounts/templates/user_detail.html:23
msgid "Gender" msgid "Gender"
msgstr "Жыныс" msgstr "Жыныс"
...@@ -25,10 +61,6 @@ msgstr "Жыныс" ...@@ -25,10 +61,6 @@ msgstr "Жыныс"
msgid "User" msgid "User"
msgstr "Пайдаланушы" msgstr "Пайдаланушы"
#: accounts/models.py:17 accounts/templates/user_detail.html:22
msgid "BirthDate"
msgstr "Туган кунi"
#: accounts/models.py:19 accounts/templates/user_detail.html:24 #: accounts/models.py:19 accounts/templates/user_detail.html:24
msgid "PhoneNumber" msgid "PhoneNumber"
msgstr "Телефон нөмірі" msgstr "Телефон нөмірі"
...@@ -67,10 +99,6 @@ msgstr "Логин немесе құпия сөзді енгізу қатесі" ...@@ -67,10 +99,6 @@ msgstr "Логин немесе құпия сөзді енгізу қатесі"
msgid "Username" msgid "Username"
msgstr "Қолданушының аты" msgstr "Қолданушының аты"
#: accounts/templates/registration/login.html:15
msgid "Password"
msgstr "құпия сөз"
#: accounts/templates/registration/login.html:17 #: accounts/templates/registration/login.html:17
msgid "LoginBtn" msgid "LoginBtn"
msgstr "Киру" msgstr "Киру"
...@@ -91,10 +119,6 @@ msgstr "Аты" ...@@ -91,10 +119,6 @@ msgstr "Аты"
msgid "LastName" msgid "LastName"
msgstr "Тегі" msgstr "Тегі"
#: accounts/templates/user_detail.html:25
msgid "Email"
msgstr "Пошта"
#: speed_dating/settings.py:130 #: speed_dating/settings.py:130
msgid "English" msgid "English"
msgstr "Ағылшын" msgstr "Ағылшын"
...@@ -107,6 +131,14 @@ msgstr "Орыс" ...@@ -107,6 +131,14 @@ msgstr "Орыс"
msgid "Kazakh" msgid "Kazakh"
msgstr "Казак" msgstr "Казак"
#: webapp/forms.py:13 webapp/models.py:21
msgid "PlaceEvent"
msgstr "Іс-шараның өтетін орны"
#: webapp/forms.py:13 webapp/models.py:23
msgid "DateEvent"
msgstr "Оқиға күні"
#: webapp/models.py:7 #: webapp/models.py:7
msgid "NameRestaurant" msgid "NameRestaurant"
msgstr "Мекеменің атауы" msgstr "Мекеменің атауы"
...@@ -123,14 +155,6 @@ msgstr "Мекеменің фотосы" ...@@ -123,14 +155,6 @@ msgstr "Мекеменің фотосы"
msgid "DescriptionRestaurant" msgid "DescriptionRestaurant"
msgstr "Мекеменің сипаттамасы" msgstr "Мекеменің сипаттамасы"
#: webapp/models.py:21
msgid "PlaceEvent"
msgstr "Іс-шараның өтетін орны"
#: webapp/models.py:23
msgid "DateEvent"
msgstr "Оқиға күні"
#: webapp/models.py:25 #: webapp/models.py:25
msgid "ParticipantsEvent" msgid "ParticipantsEvent"
msgstr "Қатысу және іс-шаралар" msgstr "Қатысу және іс-шаралар"
...@@ -144,31 +168,31 @@ msgstr "Қатысушылар" ...@@ -144,31 +168,31 @@ msgstr "Қатысушылар"
msgid "BackBtn" msgid "BackBtn"
msgstr "Артқа" msgstr "Артқа"
#: webapp/templates/base.html:17 #: webapp/templates/base.html:18
msgid "Home" msgid "Home"
msgstr "Speed Dating" msgstr "Speed Dating"
#: webapp/templates/base.html:25 #: webapp/templates/base.html:26
msgid "Events" msgid "Events"
msgstr "Белсенділік" msgstr "Белсенділік"
#: webapp/templates/base.html:30 #: webapp/templates/base.html:31
msgid "CreateEvent" msgid "CreateEvent"
msgstr "Оқиға жасау" msgstr "Оқиға жасау"
#: webapp/templates/base.html:37 #: webapp/templates/base.html:38
msgid "logout" msgid "logout"
msgstr "Шығу" msgstr "Шығу"
#: webapp/templates/base.html:41 #: webapp/templates/base.html:42
msgid "Hello" msgid "Hello"
msgstr "Салем" msgstr "Салем"
#: webapp/templates/base.html:46 #: webapp/templates/base.html:47
msgid "Login" msgid "Login"
msgstr "Киру" msgstr "Киру"
#: webapp/templates/base.html:50 #: webapp/templates/base.html:51
msgid "Registration" msgid "Registration"
msgstr "Тіркеу" msgstr "Тіркеу"
...@@ -210,7 +234,9 @@ msgstr "Қатысу" ...@@ -210,7 +234,9 @@ msgstr "Қатысу"
#: webapp/templates/event_detail.html:33 #: webapp/templates/event_detail.html:33
msgid "YouNeedTtoFillOutYourProfile" msgid "YouNeedTtoFillOutYourProfile"
msgstr "Сіз профиліңізді толтыруыңыз керек. Жоғарғы жағында орналасқан логиніңізді басыңыз" msgstr ""
"Сіз профиліңізді толтыруыңыз керек. Жоғарғы жағында орналасқан логиніңізді "
"басыңыз"
#: webapp/templates/event_detail.html:37 #: webapp/templates/event_detail.html:37
msgid "ParticipateListBtn" msgid "ParticipateListBtn"
...@@ -234,7 +260,16 @@ msgstr "Жылдам танысу дегеніміз не" ...@@ -234,7 +260,16 @@ msgstr "Жылдам танысу дегеніміз не"
#: webapp/templates/index.html:26 #: webapp/templates/index.html:26
msgid "LongTextIndex" msgid "LongTextIndex"
msgstr "Қатысушылар, әдетте, тең әлеуметтік топтарға сәйкес таңдалады. Кейбір ұйымдастырушылар жас шектеулерін қояды. Классикалық жылдамдықтағы кездесу кешінде әрбір қатысушы қарама-қарсы жыныстың өкілдерімен оңаша 10-15 кездесу өткізеді. Қыздар сандар жазылған үстелдерге отырады. Әр 3-7 минут сайын ер адамдар бір қыздан екіншісіне кезекпен ауыстырылады. Әрбір кездесуден кейін қонақтар сұхбаттасушы туралы алған әсерлерін «көзайым картасына» белгілейді немесе тікелей байланыстар алмасады. Содан кейін ұйымдастырушылар «көзайым карталарын» салыстырады, егер «+» сәйкестік болса, қатысушыларға контактілерді жібереді." msgstr ""
"Қатысушылар, әдетте, тең әлеуметтік топтарға сәйкес таңдалады. Кейбір "
"ұйымдастырушылар жас шектеулерін қояды. Классикалық жылдамдықтағы кездесу "
"кешінде әрбір қатысушы қарама-қарсы жыныстың өкілдерімен оңаша 10-15 кездесу "
"өткізеді. Қыздар сандар жазылған үстелдерге отырады. Әр 3-7 минут сайын ер "
"адамдар бір қыздан екіншісіне кезекпен ауыстырылады. Әрбір кездесуден кейін "
"қонақтар сұхбаттасушы туралы алған әсерлерін «көзайым картасына» белгілейді "
"немесе тікелей байланыстар алмасады. Содан кейін ұйымдастырушылар «көзайым "
"карталарын» салыстырады, егер «+» сәйкестік болса, қатысушыларға "
"контактілерді жібереді."
#: webapp/templates/participate.html:7 #: webapp/templates/participate.html:7
msgid "ParticipateInTheEvent" msgid "ParticipateInTheEvent"
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -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: 2021-12-01 18:26+0600\n" "POT-Creation-Date: 2021-12-02 00:09+0600\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"
...@@ -19,6 +19,43 @@ msgstr "" ...@@ -19,6 +19,43 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && 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" "%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" "%100>=11 && n%100<=14)? 2 : 3);\n"
#: accounts/forms.py:10 accounts/forms.py:40 accounts/forms.py:62
#: accounts/forms.py:91 accounts/templates/registration/login.html:15
msgid "Password"
msgstr "Пароль"
#: accounts/forms.py:12 accounts/forms.py:40 accounts/forms.py:64
#: accounts/forms.py:91
msgid "ConfirmPassword"
msgstr "Подтвердить Пароль"
#: accounts/forms.py:15 accounts/forms.py:39 accounts/forms.py:47
#: accounts/templates/user_detail.html:25
msgid "Email"
msgstr "Почта"
#: accounts/forms.py:39 accounts/forms.py:47
msgid "Name"
msgstr "Имя"
#: accounts/forms.py:39 accounts/forms.py:47
msgid "Surname"
msgstr "Фамилия"
#: accounts/forms.py:39 accounts/templates/user_detail.html:19
msgid "username"
msgstr "Логин"
#: accounts/forms.py:56 accounts/models.py:17
#: accounts/templates/user_detail.html:22
msgid "BirthDate"
msgstr "Дата рождения"
#: accounts/forms.py:60 accounts/forms.py:91
msgid "OldPassword"
msgstr "Старый Пароль"
#: accounts/models.py:7 accounts/templates/user_detail.html:23 #: accounts/models.py:7 accounts/templates/user_detail.html:23
msgid "Gender" msgid "Gender"
msgstr "Пол" msgstr "Пол"
...@@ -27,10 +64,6 @@ msgstr "Пол" ...@@ -27,10 +64,6 @@ msgstr "Пол"
msgid "User" msgid "User"
msgstr "Пользователь" msgstr "Пользователь"
#: accounts/models.py:17 accounts/templates/user_detail.html:22
msgid "BirthDate"
msgstr "Дата рождения"
#: accounts/models.py:19 accounts/templates/user_detail.html:24 #: accounts/models.py:19 accounts/templates/user_detail.html:24
msgid "PhoneNumber" msgid "PhoneNumber"
msgstr "Номер телефона" msgstr "Номер телефона"
...@@ -69,10 +102,6 @@ msgstr "Ошибка ввода логина или пароля" ...@@ -69,10 +102,6 @@ msgstr "Ошибка ввода логина или пароля"
msgid "Username" msgid "Username"
msgstr "Логин" msgstr "Логин"
#: accounts/templates/registration/login.html:15
msgid "Password"
msgstr "Пароль"
#: accounts/templates/registration/login.html:17 #: accounts/templates/registration/login.html:17
msgid "LoginBtn" msgid "LoginBtn"
msgstr "Вход" msgstr "Вход"
...@@ -93,10 +122,6 @@ msgstr "Имя" ...@@ -93,10 +122,6 @@ msgstr "Имя"
msgid "LastName" msgid "LastName"
msgstr "Фамилия" msgstr "Фамилия"
#: accounts/templates/user_detail.html:25
msgid "Email"
msgstr "Почта"
#: speed_dating/settings.py:130 #: speed_dating/settings.py:130
msgid "English" msgid "English"
msgstr "Английский" msgstr "Английский"
...@@ -109,6 +134,14 @@ msgstr "Русский" ...@@ -109,6 +134,14 @@ msgstr "Русский"
msgid "Kazakh" msgid "Kazakh"
msgstr "Казахский" msgstr "Казахский"
#: webapp/forms.py:13 webapp/models.py:21
msgid "PlaceEvent"
msgstr "Место мероприятия"
#: webapp/forms.py:13 webapp/models.py:23
msgid "DateEvent"
msgstr "Дата мероприятия"
#: webapp/models.py:7 #: webapp/models.py:7
msgid "NameRestaurant" msgid "NameRestaurant"
msgstr "Название заведения" msgstr "Название заведения"
...@@ -125,14 +158,6 @@ msgstr "Фото заведения" ...@@ -125,14 +158,6 @@ msgstr "Фото заведения"
msgid "DescriptionRestaurant" msgid "DescriptionRestaurant"
msgstr "Описание заведения" msgstr "Описание заведения"
#: webapp/models.py:21
msgid "PlaceEvent"
msgstr "Место мероприятия"
#: webapp/models.py:23
msgid "DateEvent"
msgstr "Дата мероприятия"
#: webapp/models.py:25 #: webapp/models.py:25
msgid "ParticipantsEvent" msgid "ParticipantsEvent"
msgstr "Участники мероприятия" msgstr "Участники мероприятия"
...@@ -146,31 +171,31 @@ msgstr "Список участников" ...@@ -146,31 +171,31 @@ msgstr "Список участников"
msgid "BackBtn" msgid "BackBtn"
msgstr "Назад" msgstr "Назад"
#: webapp/templates/base.html:17 #: webapp/templates/base.html:18
msgid "Home" msgid "Home"
msgstr "Speed Dating" msgstr "Speed Dating"
#: webapp/templates/base.html:25 #: webapp/templates/base.html:26
msgid "Events" msgid "Events"
msgstr "Мероприятия" msgstr "Мероприятия"
#: webapp/templates/base.html:30 #: webapp/templates/base.html:31
msgid "CreateEvent" msgid "CreateEvent"
msgstr "Создать мероприятие" msgstr "Создать мероприятие"
#: webapp/templates/base.html:37 #: webapp/templates/base.html:38
msgid "logout" msgid "logout"
msgstr "Выход" msgstr "Выход"
#: webapp/templates/base.html:41 #: webapp/templates/base.html:42
msgid "Hello" msgid "Hello"
msgstr "Привет" msgstr "Привет"
#: webapp/templates/base.html:46 #: webapp/templates/base.html:47
msgid "Login" msgid "Login"
msgstr "Вход" msgstr "Вход"
#: webapp/templates/base.html:50 #: webapp/templates/base.html:51
msgid "Registration" msgid "Registration"
msgstr "Регистрация" msgstr "Регистрация"
...@@ -212,7 +237,9 @@ msgstr "Участники" ...@@ -212,7 +237,9 @@ msgstr "Участники"
#: webapp/templates/event_detail.html:33 #: webapp/templates/event_detail.html:33
msgid "YouNeedTtoFillOutYourProfile" msgid "YouNeedTtoFillOutYourProfile"
msgstr "Вам необходимо заполнить Ваш профиль. Нажмите на Ваш логин, который размещен сверху." msgstr ""
"Вам необходимо заполнить Ваш профиль. Нажмите на Ваш логин, который размещен "
"сверху."
#: webapp/templates/event_detail.html:37 #: webapp/templates/event_detail.html:37
msgid "ParticipateListBtn" msgid "ParticipateListBtn"
...@@ -236,7 +263,16 @@ msgstr "Что такое Speed Dating" ...@@ -236,7 +263,16 @@ msgstr "Что такое Speed Dating"
#: webapp/templates/index.html:26 #: webapp/templates/index.html:26
msgid "LongTextIndex" msgid "LongTextIndex"
msgstr "Участников, как правило, подбирают по равноценным социальным группам. Некоторые организаторы вводят возрастные ограничения. На классической спид-дейтинг-вечеринке каждый участник будет иметь 10–15 встреч наедине с представителями противоположного пола. Девушки размещаются за столиками с номерами. Мужчины через каждые 3–7 минут последовательно пересаживаются от одной девушки к другой. После каждой встречи гости отмечают свои впечатления о собеседнике в «карте симпатий» или напрямую обмениваются контактами. Далее организаторы сравнивают «карты симпатий», и, в случае совпадения «+», рассылают контакты участникам." msgstr ""
"Участников, как правило, подбирают по равноценным социальным группам. "
"Некоторые организаторы вводят возрастные ограничения. На классической спид-"
"дейтинг-вечеринке каждый участник будет иметь 10–15 встреч наедине с "
"представителями противоположного пола. Девушки размещаются за столиками с "
"номерами. Мужчины через каждые 3–7 минут последовательно пересаживаются от "
"одной девушки к другой. После каждой встречи гости отмечают свои впечатления "
"о собеседнике в «карте симпатий» или напрямую обмениваются контактами. Далее "
"организаторы сравнивают «карты симпатий», и, в случае совпадения «+», "
"рассылают контакты участникам."
#: webapp/templates/participate.html:7 #: webapp/templates/participate.html:7
msgid "ParticipateInTheEvent" msgid "ParticipateInTheEvent"
......
from django import forms from django import forms
from webapp.models import Event from webapp.models import Event
from django.utils.translation import gettext_lazy as _
class EventForm(forms.ModelForm): class EventForm(forms.ModelForm):
date = forms.DateTimeField(widget=forms.TextInput(attrs={'placeholder': 'YYYY-MM-DD HH-MM-SS','type': 'datetime-local'})) date = forms.DateTimeField(
widget=forms.TextInput(attrs={'placeholder': 'YYYY-MM-DD HH-MM-SS', 'type': 'datetime-local'}))
class Meta: class Meta:
model = Event model = Event
fields = ["place", "date"] fields = ["place", "date"]
labels = {"place": _("PlaceEvent"), "date": _("DateEvent")}
# Generated by Django 3.2.9 on 2021-12-01 13:31
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('webapp', '0004_alter_event_options'),
]
operations = [
migrations.AddField(
model_name='restaurant',
name='description_en',
field=models.TextField(max_length=1000, null=True, verbose_name='DescriptionRestaurant'),
),
migrations.AddField(
model_name='restaurant',
name='description_kz',
field=models.TextField(max_length=1000, null=True, verbose_name='DescriptionRestaurant'),
),
migrations.AddField(
model_name='restaurant',
name='description_ru',
field=models.TextField(max_length=1000, null=True, verbose_name='DescriptionRestaurant'),
),
migrations.AlterField(
model_name='event',
name='date',
field=models.DateTimeField(verbose_name='DateEvent'),
),
migrations.AlterField(
model_name='event',
name='place',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Place', to='webapp.restaurant', verbose_name='PlaceEvent'),
),
migrations.AlterField(
model_name='event',
name='users',
field=models.ManyToManyField(blank=True, related_name='participants', to=settings.AUTH_USER_MODEL, verbose_name='ParticipantsEvent'),
),
migrations.AlterField(
model_name='restaurant',
name='address',
field=models.CharField(max_length=70, verbose_name='AddressRestaurant'),
),
migrations.AlterField(
model_name='restaurant',
name='description',
field=models.TextField(max_length=1000, verbose_name='DescriptionRestaurant'),
),
migrations.AlterField(
model_name='restaurant',
name='name',
field=models.CharField(max_length=30, verbose_name='NameRestaurant'),
),
migrations.AlterField(
model_name='restaurant',
name='photo',
field=models.ImageField(default=1, upload_to='photo', verbose_name='PhotoRestaurant'),
),
]
from modeltranslation.translator import translator, TranslationOptions
from .models import Restaurant
class RestaurantTranslationOptions(TranslationOptions):
fields = ('description', )
translator.register(Restaurant, RestaurantTranslationOptions)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment