From 4ae8f09430ecda42756c6c3402b05f30fe3ce258 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Fri, 31 May 2024 11:40:16 +0300 Subject: [PATCH] 1.0.9 add title for news create_route_for_customer, create_route_for_mover --- ArticlesApp/views.py | 4 ++-- AuthApp/views.py | 18 +++++++++--------- locale/en/LC_MESSAGES/django.po | 9 +++++---- .../blocks/profile/b_subscribe_current.html | 10 +++++----- templates/pages/p_main.html | 2 -- templates/pages/profile/p_user_profile.html | 17 ++++++++++++----- templates/tb_base.html | 9 +++++++++ templates/widgets/w_route_info.html | 1 + 8 files changed, 43 insertions(+), 27 deletions(-) diff --git a/ArticlesApp/views.py b/ArticlesApp/views.py index 8099c19..d9851f3 100644 --- a/ArticlesApp/views.py +++ b/ArticlesApp/views.py @@ -85,8 +85,8 @@ def ArticlesPageView(request, year=None): Dict = get_articles(art_kwargs=kwargs) Dict.update({ 'page': { - 'title': _('Страница списка новостей'), - 'description': _('Все новости сайта tripwb.com'), + 'title': _('Новости сервиса доставки посылок | TWB'), + 'description': _('Обновления, полезные статьи и свежие новости от TWB ✓ Актуальные новости в мире доставок по всему СНГ ➡️ Следите за нашими новостями'), 'keywords': _('Все новости сайта tripwb.com'), } }) diff --git a/AuthApp/views.py b/AuthApp/views.py index 6a499b8..f3a4ccc 100644 --- a/AuthApp/views.py +++ b/AuthApp/views.py @@ -62,15 +62,15 @@ def profile_page_View(request, page_name, id=None): request.user.user_profile.save(update_fields=['mailing_on']) del request.session['mailingSubscribeRequired'] - title = _('Личный кабинет пользователя') + ' ' + request.user.first_name + ' ' + request.user.last_name - - Dict.update({ - 'page': { - 'title': title, - 'description': title, - 'keywords': title, - } - }) + # title = _('Личный кабинет пользователя') + ' ' + request.user.first_name + ' ' + request.user.last_name + # + # Dict.update({ + # 'page': { + # 'title': title, + # 'description': title, + # 'keywords': title, + # } + # }) # if request.GET and 'mobile' in request.GET and request.GET['mobile'] == 'true': # Dict.update({ diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 609c6d0..bc5fe7f 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -39,12 +39,13 @@ msgid "Статьи" msgstr "Articles" #: ArticlesApp/views.py:88 -msgid "Страница списка новостей" -msgstr "News list page" +msgid "Новости сервиса доставки посылок | TWB" +msgstr "Parcel Delivery Service News | TWB" #: ArticlesApp/views.py:89 ArticlesApp/views.py:90 -msgid "Все новости сайта tripwb.com" -msgstr "All website news on tripwb.com" +msgid "Обновления, полезные статьи и свежие новости от TWB ✓ Актуальные новости в мире доставок по всему СНГ ➡️ Следите за нашими новостями" +msgstr "Updates, useful articles, and fresh news from TWB ✓ Current news in the world of deliveries throughout the CIS ➡️ Stay tuned for our updates" + #: AuthApp/admin.py:52 msgid "Дополнительно" diff --git a/templates/blocks/profile/b_subscribe_current.html b/templates/blocks/profile/b_subscribe_current.html index 86d54d1..004b0f3 100644 --- a/templates/blocks/profile/b_subscribe_current.html +++ b/templates/blocks/profile/b_subscribe_current.html @@ -18,12 +18,12 @@
- +{# #}
-
- -
-
+{#
#} +{# #} +{#
#} +{#
#}
diff --git a/templates/pages/p_main.html b/templates/pages/p_main.html index 18f4440..293a220 100644 --- a/templates/pages/p_main.html +++ b/templates/pages/p_main.html @@ -3,8 +3,6 @@ {% load i18n %} {% block meta %} - - diff --git a/templates/pages/profile/p_user_profile.html b/templates/pages/profile/p_user_profile.html index ae85025..c877d36 100644 --- a/templates/pages/profile/p_user_profile.html +++ b/templates/pages/profile/p_user_profile.html @@ -1,5 +1,14 @@ {% extends 'tb_base.html' %} {% load static %} +{% load i18n %} + +{% block title %} + {% if page_name == 'create_route_for_customer' %} + {% trans 'Отправить посылку в другие города| TWB' %} + {% elif page_name == 'create_route_for_mover' %} + {% trans 'Перевезти посылку в другие города | TWB' %} + {% endif %} +{% endblock %} {% block meta %} @@ -7,11 +16,9 @@ - + 123 {# #} - - {% include "connect_ws_js.html" %} @@ -19,10 +26,10 @@ - - {% endblock %} + + {% block content %} {% include 'blocks/b_user_profile.html' %} diff --git a/templates/tb_base.html b/templates/tb_base.html index cf56b9a..15ab4f3 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -13,6 +13,15 @@ {% webpush_header %} + + + {% if page.title %} + {{ page.title }} + {% else %} + {% block title %}{% endblock %} + {% endif %} + + {% include "inter/meta_names.html" %} {# #} diff --git a/templates/widgets/w_route_info.html b/templates/widgets/w_route_info.html index 538b7e4..0ded74b 100644 --- a/templates/widgets/w_route_info.html +++ b/templates/widgets/w_route_info.html @@ -4,6 +4,7 @@ {% load i18n %} +
{#
#}