From bc4a9ff72250ffdb0929379fc9387de3ed6be46d Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 5 Jan 2017 14:08:16 -0800 Subject: [PATCH] lint: Enforce no lines longer than 120 characters in help docs. This requires some somewhat messy changes to the all-streams macro. --- .../zerver/help/add-or-invite-someone-to-a-stream.md | 2 +- .../zerver/help/change-the-stream-description.md | 2 +- .../zerver/help/change-who-can-join-a-stream.md | 4 ++-- templates/zerver/help/change-your-language.md | 8 ++++++-- templates/zerver/help/include/all-streams.md | 3 ++- templates/zerver/help/mute-a-topic.md | 3 ++- .../zerver/help/remove-someone-from-a-stream.md | 2 +- templates/zerver/help/rename-a-stream.md | 2 +- templates/zerver/help/unsubscribe-from-a-stream.md | 12 +++++++----- templates/zerver/help/view-an-image-at-full-size.md | 3 ++- tools/lint-all | 5 ++++- 11 files changed, 29 insertions(+), 17 deletions(-) diff --git a/templates/zerver/help/add-or-invite-someone-to-a-stream.md b/templates/zerver/help/add-or-invite-someone-to-a-stream.md index dedc0c76f5..fad57b1b5e 100644 --- a/templates/zerver/help/add-or-invite-someone-to-a-stream.md +++ b/templates/zerver/help/add-or-invite-someone-to-a-stream.md @@ -14,7 +14,7 @@ subscribed to. {!filter-streams.md!} !!! tip "" - {!all-streams.md!} + {!all-streams.md!} 1. Click on the stream that you want to add someone to; {!stream-settings.md!} diff --git a/templates/zerver/help/change-the-stream-description.md b/templates/zerver/help/change-the-stream-description.md index c8d3cfc575..c209bbcbba 100644 --- a/templates/zerver/help/change-the-stream-description.md +++ b/templates/zerver/help/change-the-stream-description.md @@ -7,7 +7,7 @@ description of any stream in your organization. {!filter-streams.md!} !!! tip "" - {!all-streams.md!} + {!all-streams.md!} 3. Click on the stream that you want to change the description of; {!stream-settings.md!} diff --git a/templates/zerver/help/change-who-can-join-a-stream.md b/templates/zerver/help/change-who-can-join-a-stream.md index b3d9f6bc9c..b5d43536c3 100644 --- a/templates/zerver/help/change-who-can-join-a-stream.md +++ b/templates/zerver/help/change-who-can-join-a-stream.md @@ -12,7 +12,7 @@ remain subscribed to the stream after you change the stream's accesibility. {!filter-streams.md!} !!! tip "" - {!all-streams.md!} + {!all-streams.md!} 4. Click on the stream that you want to make private; {!stream-settings.md!} @@ -34,7 +34,7 @@ has been made private. {!filter-streams.md!} !!! tip "" - {!all-streams.md!} + {!all-streams.md!} 4. Click on the stream that you want to make public; {!stream-settings.md!} diff --git a/templates/zerver/help/change-your-language.md b/templates/zerver/help/change-your-language.md index 484a74e700..b0d83fb047 100644 --- a/templates/zerver/help/change-your-language.md +++ b/templates/zerver/help/change-your-language.md @@ -27,8 +27,12 @@ translation support. Select your desired language from the window. displayed in the language of your choice after you reload the page. !!! tip "" - You can help translate parts of Zulip by signing up for an account at **[Transifex](https://www.transifex.com/zulip/zulip/)**. + You can help translate parts of Zulip by signing up for an account + at **[Transifex](https://www.transifex.com/zulip/zulip/)**. !!! tip "" + If your entire organization speaks a language other than English, an administrator can - [set the default language for new users joining the organization](change-the-default-language-for-your-organization). + [set the default language for new users joining the organization][change-org-lang] + +[change-org-lang]: change-the-default-language-for-your-organization diff --git a/templates/zerver/help/include/all-streams.md b/templates/zerver/help/include/all-streams.md index 44b60e2a4a..c8aad80029 100644 --- a/templates/zerver/help/include/all-streams.md +++ b/templates/zerver/help/include/all-streams.md @@ -1 +1,2 @@ -If you wish to see streams that you aren't subscribed to, click on the **All Streams** tab; the tab will turn gray upon doing so. + If you wish to see streams that you aren't subscribed to, click on the + **All Streams** tab; the tab will turn gray upon doing so. diff --git a/templates/zerver/help/mute-a-topic.md b/templates/zerver/help/mute-a-topic.md index 952a10498d..7e5eea383f 100644 --- a/templates/zerver/help/mute-a-topic.md +++ b/templates/zerver/help/mute-a-topic.md @@ -34,7 +34,8 @@ wish to mute in the **Home** view. {!message-actions.md!} {!down-chevron.md!} -2. Select the **Mute the topic (topic name)** option from the dropdown to mute the topic that the selected message belongs to. +2. Select the **Mute the topic (topic name)** option from the dropdown + to mute the topic that the selected message belongs to. 4. Upon clicking **Mute the topic (topic name)**, a tooltip titled **Topic Muted** will appear, and any messages belonging to the topic will disappear from your view, diff --git a/templates/zerver/help/remove-someone-from-a-stream.md b/templates/zerver/help/remove-someone-from-a-stream.md index 077799683b..5e3426ac7f 100644 --- a/templates/zerver/help/remove-someone-from-a-stream.md +++ b/templates/zerver/help/remove-someone-from-a-stream.md @@ -7,7 +7,7 @@ manage your Zulip team. {!filter-streams.md!} !!! tip "" - {!all-streams.md!} + {!all-streams.md!} {!stream-settings-scroll.md!} **Stream membership** section. This section shows all users that are subscribed to a particular stream. diff --git a/templates/zerver/help/rename-a-stream.md b/templates/zerver/help/rename-a-stream.md index 7159986166..c18ad02a77 100644 --- a/templates/zerver/help/rename-a-stream.md +++ b/templates/zerver/help/rename-a-stream.md @@ -7,7 +7,7 @@ streams by following the following steps. {!filter-streams.md!} !!! tip "" - {!all-streams.md!} + {!all-streams.md!} 3. After selecting a stream, {!stream-settings.md!} diff --git a/templates/zerver/help/unsubscribe-from-a-stream.md b/templates/zerver/help/unsubscribe-from-a-stream.md index afc85057ab..dcf7016c36 100644 --- a/templates/zerver/help/unsubscribe-from-a-stream.md +++ b/templates/zerver/help/unsubscribe-from-a-stream.md @@ -1,10 +1,11 @@ # Unsubscribe from a stream -If you want to stop receiving messages from a particular stream in Zulip, you can choose to unsubscribe from that stream. +If you want to stop receiving messages from a particular stream in +Zulip, you can choose to unsubscribe from that stream. -There are two major ways to unsubscribe from a stream: unsubscribing from a -stream through the [Subscriptions](/#subscriptions) page and unsubscribing from -a stream through the stream sidebar. +There are two major ways to unsubscribe from a stream: unsubscribing +from a stream through the [Subscriptions](/#subscriptions) page and +unsubscribing from a stream through the stream sidebar. ## Unsubscribing from a stream through the Subscriptions page @@ -20,7 +21,8 @@ confirming the success of your unsubscribing from the stream. ## Unsubscribing from a stream through the stream sidebar -If you want to quickly unsubscribe from a single stream, you can do so through the stream sidebar. +If you want to quickly unsubscribe from a single stream, you can do so +through the stream sidebar. {!stream-actions.md!} diff --git a/templates/zerver/help/view-an-image-at-full-size.md b/templates/zerver/help/view-an-image-at-full-size.md index 0bb22654f5..e1dcc29b24 100644 --- a/templates/zerver/help/view-an-image-at-full-size.md +++ b/templates/zerver/help/view-an-image-at-full-size.md @@ -10,6 +10,7 @@ Your screen will look like this: ![full-size](/static/images/help/full-size.png) -From here, you can also open the image in a new tab or download it. These options can be seen in the top right of your screen. +From here, you can also open the image in a new tab or download +it. These options can be seen in the top right of your screen. Click the **X** in the top right to return to your Zulip chat. diff --git a/tools/lint-all b/tools/lint-all index 90cfc4a053..92483aed10 100755 --- a/tools/lint-all +++ b/tools/lint-all @@ -436,7 +436,10 @@ def build_custom_checkers(by_lang): failed = True for fn in by_lang['md']: - if custom_check_file(fn, markdown_rules): + max_length = None + if '/help/' in fn: + max_length = 120 + if custom_check_file(fn, markdown_rules, max_length=max_length): failed = True for fn in by_lang['txt'] + by_lang['text']: