diff --git a/core/locale/cs_CZ/LC_MESSAGES/django.mo b/core/locale/cs_CZ/LC_MESSAGES/django.mo index 7b3dceb8..608769b1 100644 Binary files a/core/locale/cs_CZ/LC_MESSAGES/django.mo and b/core/locale/cs_CZ/LC_MESSAGES/django.mo differ diff --git a/core/locale/cs_CZ/LC_MESSAGES/django.po b/core/locale/cs_CZ/LC_MESSAGES/django.po index 9720b73b..a3dd3530 100644 --- a/core/locale/cs_CZ/LC_MESSAGES/django.po +++ b/core/locale/cs_CZ/LC_MESSAGES/django.po @@ -615,10 +615,8 @@ msgstr "Automatické dokončování zadávání adresy" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +"Řetězec dotazu na nezpracovaná data, doplňte prosím data z koncového bodu " +"geo-IP" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/da_DK/LC_MESSAGES/django.mo b/core/locale/da_DK/LC_MESSAGES/django.mo index 1a2603b5..6513d29e 100644 Binary files a/core/locale/da_DK/LC_MESSAGES/django.mo and b/core/locale/da_DK/LC_MESSAGES/django.mo differ diff --git a/core/locale/da_DK/LC_MESSAGES/django.po b/core/locale/da_DK/LC_MESSAGES/django.po index ddc0f711..4babf2c5 100644 --- a/core/locale/da_DK/LC_MESSAGES/django.po +++ b/core/locale/da_DK/LC_MESSAGES/django.po @@ -621,11 +621,7 @@ msgstr "Automatisk udfyldning af adresseinput" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" -msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +msgstr "Rå dataforespørgselsstreng, tilføj venligst data fra geo-IP-slutpunkt" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/en_GB/LC_MESSAGES/django.mo b/core/locale/en_GB/LC_MESSAGES/django.mo index d947478f..ee037fdf 100644 Binary files a/core/locale/en_GB/LC_MESSAGES/django.mo and b/core/locale/en_GB/LC_MESSAGES/django.mo differ diff --git a/core/locale/en_GB/LC_MESSAGES/django.po b/core/locale/en_GB/LC_MESSAGES/django.po index a220a857..ec4d7e07 100644 --- a/core/locale/en_GB/LC_MESSAGES/django.po +++ b/core/locale/en_GB/LC_MESSAGES/django.po @@ -603,11 +603,7 @@ msgstr "Autocomplete address input" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" -msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +msgstr "Raw data query string, please append with data from geo-IP endpoint" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/en_US/LC_MESSAGES/django.mo b/core/locale/en_US/LC_MESSAGES/django.mo index 07945630..209c2f17 100644 Binary files a/core/locale/en_US/LC_MESSAGES/django.mo and b/core/locale/en_US/LC_MESSAGES/django.mo differ diff --git a/core/locale/en_US/LC_MESSAGES/django.po b/core/locale/en_US/LC_MESSAGES/django.po index 8c9a1341..c21ba266 100644 --- a/core/locale/en_US/LC_MESSAGES/django.po +++ b/core/locale/en_US/LC_MESSAGES/django.po @@ -598,11 +598,7 @@ msgstr "Autocomplete address input" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" -msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +msgstr "Raw data query string, please append with data from geo-IP endpoint" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/es_ES/LC_MESSAGES/django.mo b/core/locale/es_ES/LC_MESSAGES/django.mo index 55164da3..4e70cb9e 100644 Binary files a/core/locale/es_ES/LC_MESSAGES/django.mo and b/core/locale/es_ES/LC_MESSAGES/django.mo differ diff --git a/core/locale/es_ES/LC_MESSAGES/django.po b/core/locale/es_ES/LC_MESSAGES/django.po index ce04b674..70cf90da 100644 --- a/core/locale/es_ES/LC_MESSAGES/django.po +++ b/core/locale/es_ES/LC_MESSAGES/django.po @@ -626,10 +626,8 @@ msgstr "Autocompletar direcciones" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +"Cadena de consulta de datos sin procesar, adjunte los datos del punto final " +"geo-IP" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/fr_FR/LC_MESSAGES/django.mo b/core/locale/fr_FR/LC_MESSAGES/django.mo index 2428a523..e9d8957f 100644 Binary files a/core/locale/fr_FR/LC_MESSAGES/django.mo and b/core/locale/fr_FR/LC_MESSAGES/django.mo differ diff --git a/core/locale/fr_FR/LC_MESSAGES/django.po b/core/locale/fr_FR/LC_MESSAGES/django.po index ea3efe5a..ae15aa02 100644 --- a/core/locale/fr_FR/LC_MESSAGES/django.po +++ b/core/locale/fr_FR/LC_MESSAGES/django.po @@ -630,10 +630,8 @@ msgstr "Saisie automatique des adresses" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +"Chaîne de requête de données brutes, à compléter avec les données du point " +"d'extrémité géo-IP" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/it_IT/LC_MESSAGES/django.mo b/core/locale/it_IT/LC_MESSAGES/django.mo index 76dab337..5e29509b 100644 Binary files a/core/locale/it_IT/LC_MESSAGES/django.mo and b/core/locale/it_IT/LC_MESSAGES/django.mo differ diff --git a/core/locale/it_IT/LC_MESSAGES/django.po b/core/locale/it_IT/LC_MESSAGES/django.po index 802212d8..352cc2dc 100644 --- a/core/locale/it_IT/LC_MESSAGES/django.po +++ b/core/locale/it_IT/LC_MESSAGES/django.po @@ -632,10 +632,7 @@ msgstr "Inserimento automatico dell'indirizzo" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +"Stringa di query dei dati grezzi, da aggiungere ai dati dell'endpoint geo-IP" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/nl_NL/LC_MESSAGES/django.mo b/core/locale/nl_NL/LC_MESSAGES/django.mo index 4d5fdc08..710fbbdc 100644 Binary files a/core/locale/nl_NL/LC_MESSAGES/django.mo and b/core/locale/nl_NL/LC_MESSAGES/django.mo differ diff --git a/core/locale/nl_NL/LC_MESSAGES/django.po b/core/locale/nl_NL/LC_MESSAGES/django.po index 09f4a61b..a5f6b935 100644 --- a/core/locale/nl_NL/LC_MESSAGES/django.po +++ b/core/locale/nl_NL/LC_MESSAGES/django.po @@ -631,10 +631,8 @@ msgstr "Automatische adresinvoer" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +"Ruwe gegevensquerystring, gelieve aan te vullen met gegevens van geo-IP " +"eindpunt" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/pl_PL/LC_MESSAGES/django.mo b/core/locale/pl_PL/LC_MESSAGES/django.mo index 24e19b6f..f932adc6 100644 Binary files a/core/locale/pl_PL/LC_MESSAGES/django.mo and b/core/locale/pl_PL/LC_MESSAGES/django.mo differ diff --git a/core/locale/pl_PL/LC_MESSAGES/django.po b/core/locale/pl_PL/LC_MESSAGES/django.po index 2ca7b0f6..e2965c15 100644 --- a/core/locale/pl_PL/LC_MESSAGES/django.po +++ b/core/locale/pl_PL/LC_MESSAGES/django.po @@ -625,10 +625,8 @@ msgstr "Wprowadzanie adresu w trybie autouzupełniania" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +"Ciąg zapytania danych nieprzetworzonych, należy dołączyć dane z punktu " +"końcowego geo-IP" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/pt_BR/LC_MESSAGES/django.mo b/core/locale/pt_BR/LC_MESSAGES/django.mo index 8f286ffe..1c340886 100644 Binary files a/core/locale/pt_BR/LC_MESSAGES/django.mo and b/core/locale/pt_BR/LC_MESSAGES/django.mo differ diff --git a/core/locale/pt_BR/LC_MESSAGES/django.po b/core/locale/pt_BR/LC_MESSAGES/django.po index 69fec0c1..fcb88ad0 100644 --- a/core/locale/pt_BR/LC_MESSAGES/django.po +++ b/core/locale/pt_BR/LC_MESSAGES/django.po @@ -618,10 +618,8 @@ msgstr "Entrada de endereço com preenchimento automático" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +"Cadeia de consulta de dados brutos, anexe os dados do ponto de extremidade " +"de IP geográfico" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/ru_RU/LC_MESSAGES/django.mo b/core/locale/ru_RU/LC_MESSAGES/django.mo index 208d1e0a..a3ff4d50 100644 Binary files a/core/locale/ru_RU/LC_MESSAGES/django.mo and b/core/locale/ru_RU/LC_MESSAGES/django.mo differ diff --git a/core/locale/ru_RU/LC_MESSAGES/django.po b/core/locale/ru_RU/LC_MESSAGES/django.po index b2b42dd5..5ade21f8 100644 --- a/core/locale/ru_RU/LC_MESSAGES/django.po +++ b/core/locale/ru_RU/LC_MESSAGES/django.po @@ -628,10 +628,8 @@ msgstr "Автозаполнение ввода адреса" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +"Строка запроса сырых данных, пожалуйста, дополните ее данными с конечной " +"точки geo-IP" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/locale/zh_Hans/LC_MESSAGES/django.mo b/core/locale/zh_Hans/LC_MESSAGES/django.mo index 06599269..4ac39e3e 100644 Binary files a/core/locale/zh_Hans/LC_MESSAGES/django.mo and b/core/locale/zh_Hans/LC_MESSAGES/django.mo differ diff --git a/core/locale/zh_Hans/LC_MESSAGES/django.po b/core/locale/zh_Hans/LC_MESSAGES/django.po index 9fa2e28a..45cb607c 100644 --- a/core/locale/zh_Hans/LC_MESSAGES/django.po +++ b/core/locale/zh_Hans/LC_MESSAGES/django.po @@ -583,11 +583,7 @@ msgstr "自动完成地址输入" #: core/docs/drf/viewsets.py:495 msgid "raw data query string, please append with data from geo-IP endpoint" -msgstr "" -"docker compose exec app poetry run python manage.py deepl_translate -l en-gb" -" -l ar-ar -l cs-cz -l da-dk -l de-de -l en-us -l es-es -l fr-fr -l hi-in -l " -"it-it -l ja-jp -l kk-kz -l nl-nl -l pl-pl -l pt-br -l ro-ro -l ru-ru -l zh-" -"hans -a core -a geo -a payments -a vibes_auth -a blog" +msgstr "原始数据查询字符串,请附加来自地理 IP 端点的数据" #: core/docs/drf/viewsets.py:501 msgid "limit the results amount, 1 < limit < 10, default: 5" diff --git a/core/viewsets.py b/core/viewsets.py index af3a123a..1682d7be 100644 --- a/core/viewsets.py +++ b/core/viewsets.py @@ -51,6 +51,7 @@ from core.serializers import ( AddressAutocompleteInputSerializer, AddressCreateSerializer, AddressSerializer, + AddressSuggestionSerializer, AddWishlistProductSerializer, AttributeDetailSerializer, AttributeGroupDetailSerializer, @@ -549,6 +550,18 @@ class AddressViewSet(EvibesViewSet): return AddressAutocompleteInputSerializer return AddressSerializer + @action(detail=False, methods=["post"]) + def create(self, request): + serializer = AddressCreateSerializer(data=request.data) + serializer.is_valid(raise_exception=True) + + serializer = AddressSerializer(serializer.create(serializer.validated_data)) + + return Response( + status=status.HTTP_201_CREATED, + data=serializer.data, + ) + @action(detail=False, methods=["get"], url_path="autocomplete") def autocomplete(self, request): serializer = AddressAutocompleteInputSerializer(data=request.query_params) @@ -559,14 +572,17 @@ class AddressViewSet(EvibesViewSet): try: suggestions = fetch_address_suggestions(query=q, limit=limit) + serializer = AddressSuggestionSerializer(suggestions, many=True) + return Response( + serializer.data, + status=status.HTTP_200_OK, + ) except Exception as e: return Response( {"detail": _(f"Geocoding error: {e}")}, status=status.HTTP_502_BAD_GATEWAY, ) - return Response(suggestions, status=status.HTTP_200_OK) - class ProductTagViewSet(EvibesViewSet): queryset = ProductTag.objects.all()