mirror of https://github.com/zulip/zulip.git
help-relative-links: Update relative help links for channel rename.
This commit is contained in:
parent
14ede84921
commit
5acd059c38
|
@ -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.
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ than archiving them.
|
|||
|
||||
{tab|desktop-web}
|
||||
|
||||
{relative|stream|all}
|
||||
{relative|channel|all}
|
||||
|
||||
1. Select a channel.
|
||||
|
||||
|
|
|
@ -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 the
|
||||
top of the menu to filter the list by channel name or description.
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ public.
|
|||
|
||||
{tab|desktop-web}
|
||||
|
||||
{relative|stream|all}
|
||||
{relative|channel|all}
|
||||
|
||||
1. Select a channel.
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ certain users can send messages.
|
|||
|
||||
{start_tabs}
|
||||
|
||||
{relative|stream|all}
|
||||
{relative|channel|all}
|
||||
|
||||
1. Select a channel.
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ subscribed to the channel to configure these settings.
|
|||
|
||||
{start_tabs}
|
||||
|
||||
{relative|stream|all}
|
||||
{relative|channel|all}
|
||||
|
||||
1. Select a channel.
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ us know!
|
|||
|
||||
{start_tabs}
|
||||
|
||||
{relative|stream|all}
|
||||
{relative|channel|all}
|
||||
|
||||
1. Click **Create stream** on the right.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ API](/api/send-message).
|
|||
|
||||
{start_tabs}
|
||||
|
||||
{relative|gear|stream-settings}
|
||||
{relative|gear|channel-settings}
|
||||
|
||||
1. Select a channel.
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ Standard hosting.
|
|||
|
||||
{start_tabs}
|
||||
|
||||
{relative|stream|all}
|
||||
{relative|channel|all}
|
||||
|
||||
1. Select a channel.
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
{tab|desktop-web}
|
||||
|
||||
{relative|gear|stream-settings}
|
||||
{relative|gear|channel-settings}
|
||||
|
||||
1. Select a channel.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
{tab|desktop-web}
|
||||
|
||||
{relative|stream|all}
|
||||
{relative|channel|all}
|
||||
|
||||
1. Select a channel.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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"/>)
|
||||
|
|
|
@ -12,7 +12,7 @@ unsubscribe other users to channels.
|
|||
|
||||
{tab|via-stream-settings}
|
||||
|
||||
{relative|stream|all}
|
||||
{relative|channel|all}
|
||||
|
||||
1. Select a channel.
|
||||
|
||||
|
|
|
@ -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 in
|
||||
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.
|
||||
"""
|
||||
|
||||
|
||||
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,
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue