You've already forked WhereToGoRedux
mirror of
https://github.com/Llloooggg/WhereToGoRedux.git
synced 2026-03-06 04:56:23 +03:00
Обновлена локализация широты и долготы в админке
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.gis.geos import Point
|
from django.contrib.gis.geos import Point
|
||||||
|
from django.utils.translation import gettext_lazy
|
||||||
|
|
||||||
from facilities.models import Facility
|
from facilities.models import Facility
|
||||||
|
|
||||||
@@ -10,11 +11,13 @@ class FacilityLocationForm(forms.ModelForm):
|
|||||||
min_value=-90,
|
min_value=-90,
|
||||||
max_value=90,
|
max_value=90,
|
||||||
required=True,
|
required=True,
|
||||||
|
label=gettext_lazy("Latitude"),
|
||||||
)
|
)
|
||||||
longitude = forms.FloatField(
|
longitude = forms.FloatField(
|
||||||
min_value=-180,
|
min_value=-180,
|
||||||
max_value=180,
|
max_value=180,
|
||||||
required=True,
|
required=True,
|
||||||
|
label=gettext_lazy("Longitude"),
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta(object):
|
class Meta(object):
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
from django.contrib.gis.db import models as gis_models
|
from django.contrib.gis.db import models as gis_models
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Facility(models.Model):
|
class Facility(models.Model):
|
||||||
name = models.CharField(max_length=200, verbose_name=_("name"))
|
name = models.CharField(max_length=200, verbose_name=gettext_lazy("name"))
|
||||||
address = models.CharField(max_length=100, verbose_name=_("address"))
|
address = models.CharField(
|
||||||
city = models.CharField(max_length=50, verbose_name=_("city"))
|
max_length=100, verbose_name=gettext_lazy("address")
|
||||||
|
)
|
||||||
|
city = models.CharField(max_length=50, verbose_name=gettext_lazy("city"))
|
||||||
location = gis_models.PointField(
|
location = gis_models.PointField(
|
||||||
null=True, blank=True, verbose_name=_("location")
|
null=True, blank=True, verbose_name=gettext_lazy("location")
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("facility")
|
verbose_name = gettext_lazy("facility")
|
||||||
verbose_name_plural = _("facilities")
|
verbose_name_plural = gettext_lazy("facilities")
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.name}: {self.city}, {self.address}"
|
return f"{self.name}: {self.city}, {self.address}"
|
||||||
|
|||||||
@@ -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: 2022-09-10 07:27+0300\n"
|
"POT-Creation-Date: 2022-09-10 14:48+0300\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,26 +19,35 @@ 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"
|
||||||
#: facilities/apps.py:8 facilities/models.py:16
|
|
||||||
|
#: facilities/apps.py:8 facilities/models.py:18
|
||||||
msgid "facilities"
|
msgid "facilities"
|
||||||
msgstr "заведения"
|
msgstr "заведения"
|
||||||
|
|
||||||
|
#: facilities/forms.py:14
|
||||||
|
msgid "Latitude"
|
||||||
|
msgstr "Широта"
|
||||||
|
|
||||||
|
#: facilities/forms.py:20
|
||||||
|
msgid "Longitude"
|
||||||
|
msgstr "Долгота"
|
||||||
|
|
||||||
#: facilities/models.py:7
|
#: facilities/models.py:7
|
||||||
msgid "name"
|
msgid "name"
|
||||||
msgstr "название"
|
msgstr "название"
|
||||||
|
|
||||||
#: facilities/models.py:8
|
#: facilities/models.py:9
|
||||||
msgid "address"
|
msgid "address"
|
||||||
msgstr "адрес"
|
msgstr "адрес"
|
||||||
|
|
||||||
#: facilities/models.py:9
|
#: facilities/models.py:11
|
||||||
msgid "city"
|
msgid "city"
|
||||||
msgstr "город"
|
msgstr "город"
|
||||||
|
|
||||||
#: facilities/models.py:11
|
#: facilities/models.py:13
|
||||||
msgid "location"
|
msgid "location"
|
||||||
msgstr "местоположение"
|
msgstr "местоположение"
|
||||||
|
|
||||||
#: facilities/models.py:15
|
#: facilities/models.py:17
|
||||||
msgid "facility"
|
msgid "facility"
|
||||||
msgstr "заведение"
|
msgstr "заведение"
|
||||||
|
|||||||
Reference in New Issue
Block a user