Skip to content

armgit / zulip

Public Imported from GitHub
0

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.py
index 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 a
IncomingWebhookIntegration 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 convenience
features 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.py
index 1cdba578947..f047117aa25 100644
--- a/zerver/tests/test_docs.py
+++ b/zerver/tests/test_docs.py
@@ -15,7 +15,7 @@ from corporate.models.customers import Customer
from corporate.models.plans import CustomerPlan
from zerver.actions.realm_settings import do_set_realm_property
from 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, INTEGRATIONS
from zerver.lib.test_classes import ZulipTestCase
from zerver.lib.test_helpers import HostRequestMock
from zerver.lib.url_redirects import INTEGRATION_CATEGORY_SLUGS
@@ -542,12 +542,8 @@ class DocPageTest(ZulipTestCase):
# Test category pages
for 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 page
diff --git a/zerver/views/documentation.py b/zerver/views/documentation.py
index 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_description
from 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: HttpRe
elif 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"] = description
elif path_name == "integrations":