Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
integrations: Use category for page title.
Lauryn Menard7da80ea79663
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.pyindex ced116b5503..fae0cd7bf9f 100644--- a/zerver/lib/integrations.py+++ b/zerver/lib/integrations.py@@ -30,21 +30,16 @@ list. For example, to add a new incoming webhook integration, declare aIncomingWebhookIntegration in the INCOMING_WEBHOOK_INTEGRATIONS list. All*_INTEGRATIONS lists are automatically aggregated into the INTEGRATIONS dict.-To add a new integration category, add to either the CATEGORIES or-META_CATEGORY dicts below. The META_CATEGORY dict is for categories-that do not describe types of tools (e.g., bots or frameworks).+To add a new integration category, add it to the CATEGORIES dict below.Over time, we expect this registry to grow additional conveniencefeatures for writing and configuring integrations efficiently."""-META_CATEGORY: dict[str, StrPromise] = {- "meta-integration": gettext_lazy("Integration frameworks"),- "bots": gettext_lazy("Interactive bots"),-}CATEGORIES: dict[str, StrPromise] = {- **META_CATEGORY,+ "meta-integration": gettext_lazy("Integration frameworks"),+ "bots": gettext_lazy("Interactive bots"),"video-calling": gettext_lazy("Video calling"),"continuous-integration": gettext_lazy("Continuous integration"),"customer-support": gettext_lazy("Customer support"),diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.pyindex 1cdba578947..f047117aa25 100644--- a/zerver/tests/test_docs.py+++ b/zerver/tests/test_docs.py@@ -15,7 +15,7 @@ from corporate.models.customers import Customerfrom corporate.models.plans import CustomerPlanfrom zerver.actions.realm_settings import do_set_realm_propertyfrom zerver.context_processors import get_apps_page_url-from zerver.lib.integrations import BOT_INTEGRATIONS, CATEGORIES, INTEGRATIONS, META_CATEGORY+from zerver.lib.integrations import BOT_INTEGRATIONS, CATEGORIES, INTEGRATIONSfrom zerver.lib.test_classes import ZulipTestCasefrom zerver.lib.test_helpers import HostRequestMockfrom zerver.lib.url_redirects import INTEGRATION_CATEGORY_SLUGS@@ -542,12 +542,8 @@ class DocPageTest(ZulipTestCase):# Test category pagesfor category in CATEGORIES:url = f"/integrations/category/{category}"- if category in META_CATEGORY:- title = f"<title>{CATEGORIES[category]} | Zulip integrations</title>"- og_title = f'<meta property="og:title" content="{CATEGORIES[category]} | Zulip integrations" />'- else:- title = f"<title>{CATEGORIES[category]} tools | Zulip integrations</title>"- og_title = f'<meta property="og:title" content="{CATEGORIES[category]} tools | Zulip integrations" />'+ title = f"<title>{CATEGORIES[category]} | Zulip integrations</title>"+ og_title = f'<meta property="og:title" content="{CATEGORIES[category]} | Zulip integrations" />'self._test(url, [title, og_title, og_description, get_canonical_url(url)])# Test integrations index pagediff --git a/zerver/views/documentation.py b/zerver/views/documentation.pyindex 41fa96ac9e8..448e1fab5b1 100644--- a/zerver/views/documentation.py+++ b/zerver/views/documentation.py@@ -23,7 +23,6 @@ from zerver.lib.html_to_text import get_content_descriptionfrom zerver.lib.integrations import (CATEGORIES,INTEGRATIONS,- META_CATEGORY,HubotIntegration,IncomingWebhookIntegration,Integration,@@ -347,10 +346,7 @@ def add_integrations_open_graph_context(context: dict[str, Any], request: HttpReelif path_name in CATEGORIES:category = CATEGORIES[path_name]- if path_name in META_CATEGORY:- context["PAGE_TITLE"] = f"{category} | Zulip integrations"- else:- context["PAGE_TITLE"] = f"{category} tools | Zulip integrations"+ context["PAGE_TITLE"] = f"{category} | Zulip integrations"context["PAGE_DESCRIPTION"] = descriptionelif path_name == "integrations":