Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
help-relative-links: Update relative help links for channel rename.
Lauryn Menard5acd059c3891
diff --git a/help/add-or-remove-users-from-a-channel.md b/help/add-or-remove-users-from-a-channel.mdindex 3c61457642c..dd4d08fe5d4 100644--- a/help/add-or-remove-users-from-a-channel.md+++ b/help/add-or-remove-users-from-a-channel.md@@ -19,7 +19,7 @@ channel][add-users] or [remove other users from a channel][remove-users].{tab|desktop-web}-{relative|stream|all}+{relative|channel|all}1. Select a channel.@@ -117,7 +117,7 @@ subscribe the user.{tab|desktop-web}-{relative|stream|all}+{relative|channel|all}1. Select a channel.diff --git a/help/archive-a-channel.md b/help/archive-a-channel.mdindex 71e64b276b1..f6231d08bb9 100644--- a/help/archive-a-channel.md+++ b/help/archive-a-channel.md@@ -19,7 +19,7 @@ than archiving them.{tab|desktop-web}-{relative|stream|all}+{relative|channel|all}1. Select a channel.diff --git a/help/browse-and-subscribe-to-channels.md b/help/browse-and-subscribe-to-channels.mdindex b9345c771fb..836c7e76930 100644--- a/help/browse-and-subscribe-to-channels.md+++ b/help/browse-and-subscribe-to-channels.md@@ -4,7 +4,7 @@{tab|desktop-web}-{relative|stream|all}+{relative|channel|all}1. Scroll through the list of channels. You can use the **search box** near thetop of the menu to filter the list by channel name or description.diff --git a/help/change-the-channel-description.md b/help/change-the-channel-description.mdindex 98b6bfc6c77..39da2085081 100644--- a/help/change-the-channel-description.md+++ b/help/change-the-channel-description.md@@ -15,7 +15,7 @@ disabled. Use Markdown formatting to include a link to a website, Zulip{tab|desktop-web}-{relative|stream|all}+{relative|channel|all}1. Select a channel.diff --git a/help/change-the-color-of-a-channel.md b/help/change-the-color-of-a-channel.mdindex e18004fa06f..37e9cbbc154 100644--- a/help/change-the-color-of-a-channel.md+++ b/help/change-the-color-of-a-channel.md@@ -23,7 +23,7 @@ channel. Changing a channel's color does not change it for anyone else.{start_tabs}-{relative|gear|stream-settings}+{relative|gear|channel-settings}1. Select a channel.diff --git a/help/change-the-privacy-of-a-channel.md b/help/change-the-privacy-of-a-channel.mdindex cad51aacc6c..5301422ac07 100644--- a/help/change-the-privacy-of-a-channel.md+++ b/help/change-the-privacy-of-a-channel.md@@ -15,7 +15,7 @@ public.{tab|desktop-web}-{relative|stream|all}+{relative|channel|all}1. Select a channel.diff --git a/help/channel-posting-policy.md b/help/channel-posting-policy.mdindex 23ddca23c30..bdb4332d545 100644--- a/help/channel-posting-policy.md+++ b/help/channel-posting-policy.md@@ -9,7 +9,7 @@ certain users can send messages.{start_tabs}-{relative|stream|all}+{relative|channel|all}1. Select a channel.diff --git a/help/configure-who-can-invite-to-channels.md b/help/configure-who-can-invite-to-channels.mdindex cc4cf53f952..9b2052ae0fe 100644--- a/help/configure-who-can-invite-to-channels.md+++ b/help/configure-who-can-invite-to-channels.md@@ -24,7 +24,7 @@ subscribed to the channel to configure these settings.{start_tabs}-{relative|stream|all}+{relative|channel|all}1. Select a channel.diff --git a/help/getting-your-organization-started-with-zulip.md b/help/getting-your-organization-started-with-zulip.mdindex 8ea937c4eb5..b21b36dc3b3 100644--- a/help/getting-your-organization-started-with-zulip.md+++ b/help/getting-your-organization-started-with-zulip.md@@ -57,7 +57,7 @@ us know!{start_tabs}-{relative|stream|all}+{relative|channel|all}1. Click **Create stream** on the right.diff --git a/help/include/create-a-channel-instructions.md b/help/include/create-a-channel-instructions.mdindex dd764cd18f9..c94b4be8127 100644--- a/help/include/create-a-channel-instructions.md+++ b/help/include/create-a-channel-instructions.md@@ -2,7 +2,7 @@{tab|desktop-web}-{relative|gear|stream-settings}+{relative|gear|channel-settings}1. Click **Create channel** on the right, or click the **plus**(<i class="fa fa-plus"></i>) icon in the upper right.diff --git a/help/manage-user-channel-subscriptions.md b/help/manage-user-channel-subscriptions.mdindex e8b543cf674..9cadb2df881 100644--- a/help/manage-user-channel-subscriptions.md+++ b/help/manage-user-channel-subscriptions.md@@ -25,7 +25,7 @@ other users to a channel][configure-invites].{tab|via-stream-settings}-{relative|stream|all}+{relative|channel|all}1. Select a channel.@@ -61,7 +61,7 @@ channel](/help/unsubscribe-from-a-channel).{tab|via-stream-settings}-{relative|stream|all}+{relative|channel|all}1. Select a channel.diff --git a/help/message-a-channel-by-email.md b/help/message-a-channel-by-email.mdindex fea72a22873..37f940c002d 100644--- a/help/message-a-channel-by-email.md+++ b/help/message-a-channel-by-email.md@@ -24,7 +24,7 @@ API](/api/send-message).{start_tabs}-{relative|gear|stream-settings}+{relative|gear|channel-settings}1. Select a channel.diff --git a/help/message-retention-policy.md b/help/message-retention-policy.mdindex 991eb1d1e75..087f7baa5c5 100644--- a/help/message-retention-policy.md+++ b/help/message-retention-policy.md@@ -40,7 +40,7 @@ Standard hosting.{start_tabs}-{relative|stream|all}+{relative|channel|all}1. Select a channel.diff --git a/help/mute-a-channel.md b/help/mute-a-channel.mdindex 8050ffbebf6..f2e3ebffe75 100644--- a/help/mute-a-channel.md+++ b/help/mute-a-channel.md@@ -49,7 +49,7 @@{tab|desktop-web}-{relative|gear|stream-settings}+{relative|gear|channel-settings}1. Select a channel.diff --git a/help/pin-a-channel.md b/help/pin-a-channel.mdindex cbf088c76fe..a17da174064 100644--- a/help/pin-a-channel.md+++ b/help/pin-a-channel.md@@ -50,7 +50,7 @@ which is especially handy if you are subscribed to a large number of channels.{tab|desktop-web}-{relative|gear|stream-settings}+{relative|gear|channel-settings}1. Select a channel.diff --git a/help/rename-a-channel.md b/help/rename-a-channel.mdindex 30f71041288..a9caf8c74af 100644--- a/help/rename-a-channel.md+++ b/help/rename-a-channel.md@@ -6,7 +6,7 @@{tab|desktop-web}-{relative|stream|all}+{relative|channel|all}1. Select a channel.diff --git a/help/setting-up-zulip-for-a-class.md b/help/setting-up-zulip-for-a-class.mdindex cb6b93d1c13..50379f47b74 100644--- a/help/setting-up-zulip-for-a-class.md+++ b/help/setting-up-zulip-for-a-class.md@@ -213,7 +213,7 @@ how to assign roles and permissions for a class.{start_tabs}-{relative|stream|all}+{relative|channel|all}1. Click **Create stream** on the right.diff --git a/help/unsubscribe-from-a-channel.md b/help/unsubscribe-from-a-channel.mdindex 7028070a1bc..530101866d2 100644--- a/help/unsubscribe-from-a-channel.md+++ b/help/unsubscribe-from-a-channel.md@@ -28,7 +28,7 @@ You can always unsubscribe from any channel in Zulip.{tab|desktop-web}-{relative|gear|stream-settings}+{relative|gear|channel-settings}1. Click the **checkmark**(<img src="/static/images/help/desktop-web-check-icon.svg" alt="checkmark" class="help-center-icon"/>)diff --git a/help/view-channel-subscribers.md b/help/view-channel-subscribers.mdindex 314c12579c7..5bf8f6f2d52 100644--- a/help/view-channel-subscribers.md+++ b/help/view-channel-subscribers.md@@ -12,7 +12,7 @@ unsubscribe other users to channels.{tab|via-stream-settings}-{relative|stream|all}+{relative|channel|all}1. Select a channel.diff --git a/zerver/lib/markdown/help_relative_links.py b/zerver/lib/markdown/help_relative_links.pyindex 711c4dee390..32d5ab5ccb4 100644--- a/zerver/lib/markdown/help_relative_links.py+++ b/zerver/lib/markdown/help_relative_links.py@@ -19,8 +19,8 @@ gear_info = {# key is from REGEXP: `{relative|gear|key}`# name is what the item is called in the gear menu: `Select **name**.`# link is used for relative links: `Select [name](link).`- "stream-settings": [- '<i class="zulip-icon zulip-icon-hash"></i> Stream settings',+ "channel-settings": [+ '<i class="zulip-icon zulip-icon-hash"></i> Channel settings',"/#channels/subscribed",],"settings": [@@ -97,26 +97,26 @@ def help_handle_match(key: str) -> str:return help_instructions.format(item=item)-stream_info = {- "all": ["All streams", "/#channels/all"],+channel_info = {+ "all": ["All channels", "/#channels/all"],}-stream_all_instructions = """+channel_all_instructions = """1. Click on the **gear** (<i class="zulip-icon zulip-icon-gear"></i>) icon inthe upper right corner of the web or desktop app.-1. Select <i class="zulip-icon zulip-icon-hash"></i> **Stream settings**.+1. Select <i class="zulip-icon zulip-icon-hash"></i> **Channel settings**.1. Click {item} in the upper left."""-def stream_handle_match(key: str) -> str:+def channel_handle_match(key: str) -> str:if relative_help_links:- item = f"[{stream_info[key][0]}]({stream_info[key][1]})"+ item = f"[{channel_info[key][0]}]({channel_info[key][1]})"else:- item = f"**{stream_info[key][0]}**"- return stream_all_instructions.format(item=item)+ item = f"**{channel_info[key][0]}**"+ return channel_all_instructions.format(item=item)group_info = {@@ -197,7 +197,7 @@ def message_handle_match(key: str) -> str:LINK_TYPE_HANDLERS = {"gear": gear_handle_match,- "stream": stream_handle_match,+ "channel": channel_handle_match,"message": message_handle_match,"help": help_handle_match,"group": group_handle_match,diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.pyindex f7346a993e0..15cb2e96d80 100644--- a/zerver/tests/test_docs.py+++ b/zerver/tests/test_docs.py@@ -426,7 +426,7 @@ class HelpTest(ZulipTestCase):def test_help_relative_links_for_stream(self) -> None:result = self.client_get("/help/message-a-channel-by-email")self.assertIn(- '<a href="/#channels/subscribed"><i class="zulip-icon zulip-icon-hash"></i> Stream settings</a>',+ '<a href="/#channels/subscribed"><i class="zulip-icon zulip-icon-hash"></i> Channel settings</a>',str(result.content),)self.assertEqual(result.status_code, 200)@@ -435,7 +435,7 @@ class HelpTest(ZulipTestCase):result = self.client_get("/help/message-a-channel-by-email", subdomain="")self.assertEqual(result.status_code, 200)self.assertIn(- '<strong><i class="zulip-icon zulip-icon-hash"></i> Stream settings</strong>',+ '<strong><i class="zulip-icon zulip-icon-hash"></i> Channel settings</strong>',str(result.content),)self.assertNotIn("/#channels", str(result.content))