From 67a4b65c99b23401cf08fe530247fb4b36a6e51c Mon Sep 17 00:00:00 2001 From: Rob DiVincenzo Date: Tue, 19 Mar 2024 14:59:18 -0400 Subject: [PATCH] Revert "[PNI] Improved tags for SEO (#12046)" (#12076) This reverts commit 95c8f886382725ef0564b93630699f1e4b9c7d61. --- .../templates/pages/buyersguide/base.html | 12 ++---------- .../pagemodels/buyersguide/homepage.py | 14 +++++++------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/network-api/networkapi/templates/pages/buyersguide/base.html b/network-api/networkapi/templates/pages/buyersguide/base.html index b40da393508..def39a4650e 100644 --- a/network-api/networkapi/templates/pages/buyersguide/base.html +++ b/network-api/networkapi/templates/pages/buyersguide/base.html @@ -6,16 +6,8 @@ {% block page_title %} {% environment_prefix %} - {# if routable page #} - {% if pageTitle %} - {{ pageTitle }} - {# if custom seo_title for a wagtail page #} - {% elif page.seo_title %} - {{ page.seo_title }} - {# default to page.title #} - {% else %} - {{ page.title }} | {% blocktrans context "“*Privacy Not Included can be localized. This is a reference to the “*batteries not included” mention on toys." %}*Privacy Not Included{% endblocktrans %} - {% endif %} + {% if pageTitle %}{{ pageTitle }} + {% else %}{% blocktrans context "“*Privacy Not Included” can be localized. This is a reference to the “*batteries not included” mention on toys." %}*Privacy Not Included | Shop smart and safe{% endblocktrans %} | Mozilla Foundation{% endif %} {% endblock %} {# TODO: consider using a different ga_identifier? #} diff --git a/network-api/networkapi/wagtailpages/pagemodels/buyersguide/homepage.py b/network-api/networkapi/wagtailpages/pagemodels/buyersguide/homepage.py index 040af71d100..e8d02d0e166 100644 --- a/network-api/networkapi/wagtailpages/pagemodels/buyersguide/homepage.py +++ b/network-api/networkapi/wagtailpages/pagemodels/buyersguide/homepage.py @@ -185,7 +185,7 @@ def about_page(self, request): context["pagetype"] = "about" context["pageTitle"] = pgettext( "*Privacy Not Included can be localized.", - "How to use *Privacy Not Included | Mozilla Foundation", + "How to use *Privacy Not Included", ) return render(request, "pages/buyersguide/about/how_to_use.html", context) @@ -195,7 +195,7 @@ def about_why_page(self, request): context["pagetype"] = "about" context["pageTitle"] = pgettext( "*Privacy Not Included can be localized.", - "Why we made *Privacy Not Included | Mozilla Foundation", + "Why we made *Privacy Not Included", ) return render(request, "pages/buyersguide/about/why_we_made.html", context) @@ -208,7 +208,7 @@ def about_press_page(self, request): + " | " + pgettext( "This can be localized. This is a reference to the “*batteries not included” mention on toys.", - "*Privacy Not Included | Mozilla Foundation", + "*Privacy Not Included", ) ) return render(request, "pages/buyersguide/about/press.html", context) @@ -222,7 +222,7 @@ def about_contact_page(self, request): + " | " + pgettext( "This can be localized. This is a reference to the “*batteries not included” mention on toys.", - "*Privacy Not Included | Mozilla Foundation", + "*Privacy Not Included", ) ) return render(request, "pages/buyersguide/about/contact.html", context) @@ -236,7 +236,7 @@ def about_methodology_page(self, request): + " | " + pgettext( "This can be localized. This is a reference to the “*batteries not included” mention on toys.", - "*Privacy Not Included | Mozilla Foundation", + "*Privacy Not Included", ) ) return render(request, "pages/buyersguide/about/methodology.html", context) @@ -250,7 +250,7 @@ def about_contest(self, request): + " | " + pgettext( "This can be localized. This is a reference to the “*batteries not included” mention on toys.", - "*Privacy Not Included | Mozilla Foundation", + "*Privacy Not Included", ) ) return render(request, "pages/buyersguide/contest.html", context) @@ -309,7 +309,7 @@ def categories_page(self, request, slug): context["category"] = slug context["current_category"] = category context["products"] = products - context["pageTitle"] = f'{category.name} | {gettext("Privacy & Security Guide")}' f" | Mozilla Foundation" + context["pageTitle"] = f'{category.name} | {gettext("Privacy & security guide")}' f" | Mozilla Foundation" context["template_cache_key_fragment"] = f"{category.slug}_{request.LANGUAGE_CODE}" # Checking if category has custom metadata, if so, update the share image and description.