help-relative-links: Update relative help links for channel rename.

This commit is contained in:
Lauryn Menard 2024-05-02 17:46:14 +02:00 committed by Tim Abbott
parent 14ede84921
commit 5acd059c38
21 changed files with 34 additions and 34 deletions

View File

@ -19,7 +19,7 @@ channel][add-users] or [remove other users from a channel][remove-users].
{tab|desktop-web} {tab|desktop-web}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.
@ -117,7 +117,7 @@ subscribe the user.
{tab|desktop-web} {tab|desktop-web}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.

View File

@ -19,7 +19,7 @@ than archiving them.
{tab|desktop-web} {tab|desktop-web}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.

View File

@ -4,7 +4,7 @@
{tab|desktop-web} {tab|desktop-web}
{relative|stream|all} {relative|channel|all}
1. Scroll through the list of channels. You can use the **search box** near the 1. Scroll through the list of channels. You can use the **search box** near the
top of the menu to filter the list by channel name or description. top of the menu to filter the list by channel name or description.

View File

@ -15,7 +15,7 @@ disabled. Use Markdown formatting to include a link to a website, Zulip
{tab|desktop-web} {tab|desktop-web}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.

View File

@ -23,7 +23,7 @@ channel. Changing a channel's color does not change it for anyone else.
{start_tabs} {start_tabs}
{relative|gear|stream-settings} {relative|gear|channel-settings}
1. Select a channel. 1. Select a channel.

View File

@ -15,7 +15,7 @@ public.
{tab|desktop-web} {tab|desktop-web}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.

View File

@ -9,7 +9,7 @@ certain users can send messages.
{start_tabs} {start_tabs}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.

View File

@ -24,7 +24,7 @@ subscribed to the channel to configure these settings.
{start_tabs} {start_tabs}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.

View File

@ -57,7 +57,7 @@ us know!
{start_tabs} {start_tabs}
{relative|stream|all} {relative|channel|all}
1. Click **Create stream** on the right. 1. Click **Create stream** on the right.

View File

@ -2,7 +2,7 @@
{tab|desktop-web} {tab|desktop-web}
{relative|gear|stream-settings} {relative|gear|channel-settings}
1. Click **Create channel** on the right, or click the **plus** 1. Click **Create channel** on the right, or click the **plus**
(<i class="fa fa-plus"></i>) icon in the upper right. (<i class="fa fa-plus"></i>) icon in the upper right.

View File

@ -25,7 +25,7 @@ other users to a channel][configure-invites].
{tab|via-stream-settings} {tab|via-stream-settings}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.
@ -61,7 +61,7 @@ channel](/help/unsubscribe-from-a-channel).
{tab|via-stream-settings} {tab|via-stream-settings}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.

View File

@ -24,7 +24,7 @@ API](/api/send-message).
{start_tabs} {start_tabs}
{relative|gear|stream-settings} {relative|gear|channel-settings}
1. Select a channel. 1. Select a channel.

View File

@ -40,7 +40,7 @@ Standard hosting.
{start_tabs} {start_tabs}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.

View File

@ -49,7 +49,7 @@
{tab|desktop-web} {tab|desktop-web}
{relative|gear|stream-settings} {relative|gear|channel-settings}
1. Select a channel. 1. Select a channel.

View File

@ -50,7 +50,7 @@ which is especially handy if you are subscribed to a large number of channels.
{tab|desktop-web} {tab|desktop-web}
{relative|gear|stream-settings} {relative|gear|channel-settings}
1. Select a channel. 1. Select a channel.

View File

@ -6,7 +6,7 @@
{tab|desktop-web} {tab|desktop-web}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.

View File

@ -213,7 +213,7 @@ how to assign roles and permissions for a class.
{start_tabs} {start_tabs}
{relative|stream|all} {relative|channel|all}
1. Click **Create stream** on the right. 1. Click **Create stream** on the right.

View File

@ -28,7 +28,7 @@ You can always unsubscribe from any channel in Zulip.
{tab|desktop-web} {tab|desktop-web}
{relative|gear|stream-settings} {relative|gear|channel-settings}
1. Click the **checkmark** 1. Click the **checkmark**
(<img src="/static/images/help/desktop-web-check-icon.svg" alt="checkmark" class="help-center-icon"/>) (<img src="/static/images/help/desktop-web-check-icon.svg" alt="checkmark" class="help-center-icon"/>)

View File

@ -12,7 +12,7 @@ unsubscribe other users to channels.
{tab|via-stream-settings} {tab|via-stream-settings}
{relative|stream|all} {relative|channel|all}
1. Select a channel. 1. Select a channel.

View File

@ -19,8 +19,8 @@ gear_info = {
# key is from REGEXP: `{relative|gear|key}` # key is from REGEXP: `{relative|gear|key}`
# name is what the item is called in the gear menu: `Select **name**.` # name is what the item is called in the gear menu: `Select **name**.`
# link is used for relative links: `Select [name](link).` # link is used for relative links: `Select [name](link).`
"stream-settings": [ "channel-settings": [
'<i class="zulip-icon zulip-icon-hash"></i> Stream settings', '<i class="zulip-icon zulip-icon-hash"></i> Channel settings',
"/#channels/subscribed", "/#channels/subscribed",
], ],
"settings": [ "settings": [
@ -97,26 +97,26 @@ def help_handle_match(key: str) -> str:
return help_instructions.format(item=item) return help_instructions.format(item=item)
stream_info = { channel_info = {
"all": ["All streams", "/#channels/all"], "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 in 1. Click on the **gear** (<i class="zulip-icon zulip-icon-gear"></i>) icon in
the upper right corner of the web or desktop app. the 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. 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: 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: else:
item = f"**{stream_info[key][0]}**" item = f"**{channel_info[key][0]}**"
return stream_all_instructions.format(item=item) return channel_all_instructions.format(item=item)
group_info = { group_info = {
@ -197,7 +197,7 @@ def message_handle_match(key: str) -> str:
LINK_TYPE_HANDLERS = { LINK_TYPE_HANDLERS = {
"gear": gear_handle_match, "gear": gear_handle_match,
"stream": stream_handle_match, "channel": channel_handle_match,
"message": message_handle_match, "message": message_handle_match,
"help": help_handle_match, "help": help_handle_match,
"group": group_handle_match, "group": group_handle_match,

View File

@ -426,7 +426,7 @@ class HelpTest(ZulipTestCase):
def test_help_relative_links_for_stream(self) -> None: def test_help_relative_links_for_stream(self) -> None:
result = self.client_get("/help/message-a-channel-by-email") result = self.client_get("/help/message-a-channel-by-email")
self.assertIn( 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), str(result.content),
) )
self.assertEqual(result.status_code, 200) self.assertEqual(result.status_code, 200)
@ -435,7 +435,7 @@ class HelpTest(ZulipTestCase):
result = self.client_get("/help/message-a-channel-by-email", subdomain="") result = self.client_get("/help/message-a-channel-by-email", subdomain="")
self.assertEqual(result.status_code, 200) self.assertEqual(result.status_code, 200)
self.assertIn( 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), str(result.content),
) )
self.assertNotIn("/#channels", str(result.content)) self.assertNotIn("/#channels", str(result.content))