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.

docs: Fix capitalization mistakes.

Anders Kaseorg544bbd5398a7
diff --git a/.gitignore b/.gitignore
index 81008750bcf..36363701f04 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,7 +75,7 @@ zulip.kdev4
*.sublime-workspace
.vscode/
*.DS_Store
-# .cache/ is generated by VSCode's test runner
+# .cache/ is generated by Visual Studio Code's test runner
.cache/
.eslintcache
diff --git a/docs/contributing/gsoc-ideas.md b/docs/contributing/gsoc-ideas.md
index 6ad5904b108..109807ef373 100644
--- a/docs/contributing/gsoc-ideas.md
+++ b/docs/contributing/gsoc-ideas.md
@@ -222,7 +222,7 @@ skills needed, and try to emphasize where strong skills with
particular tools are likely to be important for a given project.
For all of our projects, an important skill to develop is a good
-command of Git; read [our Git Guide](../git/overview.md) in full to
+command of Git; read [our Git guide](../git/overview.md) in full to
learn how to use it well. Of particular importance is mastering using
Git rebase so that you can construct commits that are clearly correct
and explain why they are correct. We highly recommend investing in
diff --git a/docs/development/remote.md b/docs/development/remote.md
index a7ee9f4b718..c392e389d0b 100644
--- a/docs/development/remote.md
+++ b/docs/development/remote.md
@@ -133,7 +133,7 @@ don't have a favorite, here are some suggestions:
* [sublime](https://www.sublimetext.com/)
* [PyCharm](https://www.jetbrains.com/pycharm/)
-Next, follow our [Git and GitHub Guide](../git/index.md) to clone and configure
+Next, follow our [Git and GitHub guide](../git/index.md) to clone and configure
your fork of zulip on your local computer.
Once you have cloned your code locally, you can get to work.
@@ -145,7 +145,7 @@ is to **push them to GitHub** and then **fetch and merge** them from
the remote server.
For more detailed instructions about how to do this, see our [Git & GitHub
-Guide][rtd-git-guide]. In brief, the steps are as follows.
+guide][rtd-git-guide]. In brief, the steps are as follows.
On your **local computer**:
@@ -184,7 +184,7 @@ you prefer for development in general.
If you use [TextMate](https://macromates.com), Atom, VS Code, or a
similar GUI editor, tools like
-[VSCode Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) and
+[Visual Studio Code Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) and
[rmate](https://github.com/textmate/rmate) that are designed to
integrate that editor with remote development over SSH allow you to
develop remotely from the comfort of your local machine.
@@ -264,7 +264,7 @@ Now your workspace should look similar this:
Next, read the following to learn more about developing for Zulip:
-* [Git & GitHub Guide][rtd-git-guide]
+* [Git & GitHub guide][rtd-git-guide]
* [Using the development environment][rtd-using-dev-env]
* [Testing][rtd-testing]
diff --git a/docs/development/request-remote.md b/docs/development/request-remote.md
index e81f0c0a6c6..169c69e53b3 100644
--- a/docs/development/request-remote.md
+++ b/docs/development/request-remote.md
@@ -11,7 +11,7 @@ development environment already set up.
The machines (droplets) are being generously provided by
[DigitalOcean](https://www.digitalocean.com/). Thank you DigitalOcean!
-## Step 1: Join GitHub and create SSH Keys
+## Step 1: Join GitHub and create SSH keys
To contribute to Zulip and to use a remote Zulip developer instance, you'll
need a GitHub account. If you don't already have one, sign up
@@ -72,7 +72,7 @@ Once you've confirmed you can connect to your remote server, take a look at:
* [developing remotely](../development/remote.md) for tips on using the remote dev
instance, and
-* our [Git & GitHub Guide](../git/index.md) to learn how to use Git with Zulip.
+* our [Git & GitHub guide](../git/index.md) to learn how to use Git with Zulip.
Next, read the following to learn more about developing for Zulip:
diff --git a/docs/development/setup-vagrant.md b/docs/development/setup-vagrant.md
index 850a6577bf6..43f40872559 100644
--- a/docs/development/setup-vagrant.md
+++ b/docs/development/setup-vagrant.md
@@ -308,7 +308,7 @@ provisioning if your Internet connection is unreliable. To retry, you
can use `vagrant provision` (`vagrant up` will just boot the guest
without provisioning after the first time). Other common issues are
documented in the
-[Troubleshooting and Common Errors](#troubleshooting-and-common-errors)
+[Troubleshooting and common errors](#troubleshooting-and-common-errors)
section. If that doesn't help, please visit
[#provision help](https://chat.zulip.org/#narrow/stream/21-provision-help)
in the [Zulip development community server](../contributing/chat-zulip-org.md) for
@@ -432,7 +432,7 @@ running Git commands in Terminal (macOS/Ubuntu) or Git BASH (Windows) in the
directory where you cloned Zulip on your main machine.
If you're new to working with Git/GitHub, check out our [Git & GitHub
-Guide][rtd-git-guide].
+guide][rtd-git-guide].
#### Maintaining the development environment
@@ -533,7 +533,7 @@ $ ./tools/run-dev.py
Next, read the following to learn more about developing for Zulip:
-* [Git & GitHub Guide][rtd-git-guide]
+* [Git & GitHub guide][rtd-git-guide]
* [Using the development environment][rtd-using-dev-env]
* [Testing][rtd-testing] (and [Configuring CI][ci] to
run the full test suite against any branches you push to your fork,
diff --git a/docs/documentation/overview.md b/docs/documentation/overview.md
index a33c864265c..39bc3b7ed8b 100644
--- a/docs/documentation/overview.md
+++ b/docs/documentation/overview.md
@@ -31,7 +31,7 @@ These three systems are documented in detail.
What you are reading right now is part of the collection of
documentation targeted at developers and people running their own
Zulip servers. These docs are written in
-[Commonmark Markdown](https://commonmark.org/) with a small bit of rST.
+[CommonMark Markdown](https://commonmark.org/) with a small bit of rST.
We've chosen Markdown because it is
[easy to write](https://commonmark.org/help/). The source for Zulip's
developer documentation is at `docs/` in the Zulip Git repository, and
diff --git a/docs/git/fixing-commits.md b/docs/git/fixing-commits.md
index 40a2880e848..a2c789ddbf9 100644
--- a/docs/git/fixing-commits.md
+++ b/docs/git/fixing-commits.md
@@ -4,7 +4,7 @@ This is mostly from
## Fixing the last commit
### Changing the last commit message
-1. `git commit --amend -m "New Message"`
+1. `git commit --amend -m "New message"`
### Changing the last commit
1. Make your changes to the files
diff --git a/docs/production/deployment.md b/docs/production/deployment.md
index 5e490f5bed2..915b2a4446f 100644
--- a/docs/production/deployment.md
+++ b/docs/production/deployment.md
@@ -45,7 +45,7 @@ extremely reliable for years, whereas the Docker image is new and has
rough edges, so we recommend the normal installer unless you have a
specific reason to prefer Docker.
-## Advanced Installer Options
+## Advanced installer options
The Zulip installer supports the following advanced installer options
as well as those mentioned in the
diff --git a/docs/production/giphy-gif-integration.md b/docs/production/giphy-gif-integration.md
index eea293985c1..c19736105f4 100644
--- a/docs/production/giphy-gif-integration.md
+++ b/docs/production/giphy-gif-integration.md
@@ -11,7 +11,7 @@ To enable this integration, you need to get a production API key from
1. [Create a GIPHY account](https://giphy.com/join).
-1. Create a GIPHY API Key by clicking “Create an App” on the
+1. Create a GIPHY API key by clicking “Create an App” on the
[Developer Dashboard][giphy-dashboard].
1. Choose **SDK** as product type and click **Next Step**.
diff --git a/docs/production/maintain-secure-upgrade.md b/docs/production/maintain-secure-upgrade.md
index c10cb6ab9ee..b0b3a65a4d6 100644
--- a/docs/production/maintain-secure-upgrade.md
+++ b/docs/production/maintain-secure-upgrade.md
@@ -12,7 +12,7 @@ Moved to [Troubleshooting](../production/troubleshooting.html#monitoring).
### Securing your Zulip server
-Moved to [Security Model](../production/security-model.md).
+Moved to [Security model](../production/security-model.md).
### Upgrading
diff --git a/docs/subsystems/events-system.md b/docs/subsystems/events-system.md
index 46692322079..6f4c1b62f71 100644
--- a/docs/subsystems/events-system.md
+++ b/docs/subsystems/events-system.md
@@ -98,7 +98,7 @@ client. This approach is reasonably efficient and works everywhere
(unlike websockets, which have a decreasing but nonzero level of
client compatibility problems).
-For each connected client, the **Event Queue Server** maintains an
+For each connected client, the **event queue server** maintains an
**event queue**, which contains any events that are to be delivered to
that client which have not yet been acknowledged by that client.
Ignoring the subtle details around error handling, the protocol is
@@ -156,15 +156,15 @@ requesting events; its handler for this case should just restart the
client / reload the browser so that it refetches initial data the same
way it would on startup. Since clients have to implement their
startup process anyway, this approach adds minimal technical
-complexity to clients. A nice side effect is that if the Event Queue
-Server (which stores queues in memory) were to crash and lose
+complexity to clients. A nice side effect is that if the event queue
+server (which stores queues in memory) were to crash and lose
its data, clients would recover, just as if they had lost Internet
access briefly (there is some DoS risk to manage, though).
Note that the garbage-collection system has hooks that are important
for the implementation of [notifications](../subsystems/notifications.md).
-(The Event Queue Server is designed to save any event queues to disk
+(The event queue server is designed to save any event queues to disk
and reload them when the server is restarted, and catches exceptions
carefully, so such incidents are very rare, but it's nice to have a
design that handles them without leaving broken out-of-date clients
diff --git a/docs/subsystems/html-css.md b/docs/subsystems/html-css.md
index 8d16a036650..98f20e5f75b 100644
--- a/docs/subsystems/html-css.md
+++ b/docs/subsystems/html-css.md
@@ -227,7 +227,7 @@ A few useful notes are:
* Zulip installs static assets in production in
`/home/zulip/prod-static`. When a new version is deployed, before the
server is restarted, files are copied into that directory.
-* We use the VFL (Versioned File Layout) strategy, where each file in
+* We use the VFL (versioned file layout) strategy, where each file in
the codebase (e.g. `favicon.ico`) gets a new name
(e.g. `favicon.c55d45ae8c58.ico`) that contains a hash in it. Each
deployment, has a manifest file
diff --git a/docs/subsystems/notifications.md b/docs/subsystems/notifications.md
index b37a00c6993..480bce01c79 100644
--- a/docs/subsystems/notifications.md
+++ b/docs/subsystems/notifications.md
@@ -11,10 +11,10 @@ the details of the email/mobile push notifications code path.
Here we name a few corner cases worth understanding in designing this
sort of notifications system:
-* The **Idle Desktop Problem**: We don't want the presence of a
+* The **idle desktop problem**: We don't want the presence of a
desktop computer at the office to eat all notifications because the
user has an "online" client that they may not have used in 3 days.
-* The **Hard Disconnect Problem**: A client can lose its connection to
+* The **hard disconnect problem**: A client can lose its connection to
the Internet (or be suspended, or whatever) at any time, and this
happens routinely. We want to ensure that races where a user closes
their laptop shortly after a notifiable message is sent does not
@@ -57,10 +57,10 @@ as follows:
checks are implemented.
* Users in `presence_idle_user_ids` are always considered idle:
the variable name means "users who are idle because of
- presence". This is how we solve the Idle Desktop Problem; users
+ presence". This is how we solve the idle desktop problem; users
with an idle desktop are treated the same as users who aren't
logged in for this check.
- * However, that check does not handle the Hard Disconnect Problem:
+ * However, that check does not handle the hard disconnect problem:
if a user was present 1 minute before a message was sent, and then
closed their laptop, the user will not be in
`presence_idle_user_ids`, and so without an additional mechanism,
@@ -75,7 +75,7 @@ as follows:
* The `receiver_is_off_zulip` check is effectively repeated when
event queues are garbage-collected (in `missedmessage_hook`) by
looking for whether the queue being garbage-collectee was the only
- one; this second check solves the Hard Disconnect Problem, resulting in
+ one; this second check solves the hard disconnect problem, resulting in
notifications for these hard-disconnect cases usually coming 10
minutes late.
* The message-edit code path has parallel logic in
@@ -124,8 +124,8 @@ as follows:
`push_notifications.py` code that actually sends the
notification. This logic is somewhat complicated by having to track
the number of unread push notifications to display on the mobile
- apps' badges, as well as using the [Mobile Push Notifications
- Service](../production/mobile-push-notifications.md) for self-hosted
+ apps' badges, as well as using the [mobile push notifications
+ service](../production/mobile-push-notifications.md) for self-hosted
systems.
The following important constraints are worth understanding about the
diff --git a/docs/testing/continuous-integration.md b/docs/testing/continuous-integration.md
index 0fd34d2c31a..be11fa3a60e 100644
--- a/docs/testing/continuous-integration.md
+++ b/docs/testing/continuous-integration.md
@@ -76,12 +76,12 @@ The remaining details in this section are primarily relevant for doing
development on our CI system and/or provisioning process.
The first key of the job section is `docker`. The docker key specifies
-the image GitHub Action should get from [Docker Hub][docker-hub] for running
-the job. Once GitHub Action fetches the image from Docker Hub, it will spin
+the image GitHub Actions should get from [Docker Hub][docker-hub] for running
+the job. Once GitHub Actions fetches the image from Docker Hub, it will spin
up a docker container. See [images](#images) section to know more about
-the images we use in GitHub Action for testing.
+the images we use in GitHub Actions for testing.
-After booting the container from the configured image, GitHub Action will
+After booting the container from the configured image, GitHub Actions will
create the directory mentioned in `working_directory` and all the
steps are be run from here.
@@ -92,7 +92,7 @@ are defined in the `aliases` section at the top of the file.
### Images
-GitHub Action tests are run in containers that are spun off from the images
+GitHub Actions tests are run in containers that are spun off from the images
maintained by Zulip team. The Dockerfiles for the various images can be
generated by running `./tools/ci/generate-dockerfiles`. This command
will generate the Dockerfiles of the three Ubuntu releases in
@@ -106,7 +106,7 @@ generated Dockerfiles.
#### Caching
-An important element of making GitHub Action perform effectively is caching
+An important element of making GitHub Actions perform effectively is caching
between jobs the various caches that live under `/srv/` in a Zulip
development or production environment. In particular, we cache the
following:
@@ -114,7 +114,7 @@ following:
* Python virtualenvs
* node_modules directories
-This has a huge impact on the performance of running tests in GitHub Action
+This has a huge impact on the performance of running tests in GitHub Actions
CI; without these caches, the average test time would be several times
longer.
diff --git a/docs/translating/internationalization.md b/docs/translating/internationalization.md
index 3d95b458318..08c79902257 100644
--- a/docs/translating/internationalization.md
+++ b/docs/translating/internationalization.md
@@ -63,8 +63,8 @@ to understand when implementing an internationalized application:
find your string.
There's a lot of other interesting differences that are important for
-i18n (e.g. Zulip has a "Full Name" field rather than "First Name" and
-"Last Name" because different cultures order the surnames and given
+i18n (e.g. Zulip has a "full name" field rather than "first name" and
+"last name" because different cultures order the surnames and given
names differently), but the above issues are likely to be relevant to
most people working on Zulip.
@@ -175,8 +175,8 @@ ensure this, the error message passed to `json_error` and
function, e.g.:
```
-json_error(_('English Text'))
-JsonableError(_('English Text'))
+json_error(_('English text'))
+JsonableError(_('English text'))
```
If you're declaring a user-facing string at top level or in a class, you need to
@@ -215,7 +215,7 @@ To mark a string translatable in JavaScript files, pass it to the
`intl.formatMessage` function, which we alias to `$t` in `intl.js`:
```js
-$t({defaultMessage: "English Text"})
+$t({defaultMessage: "English text"})
```
The string to be translated must be a constant literal string, but
@@ -258,14 +258,14 @@ For translations in Handlebars templates we also use FormatJS, through two
Handlebars [helpers][] that Zulip registers. The syntax for simple strings is:
```
-{{t 'English Text' }}
+{{t 'English text' }}
```
If you are passing a translated string to a Handlebars partial, you can use:
```
{{> template_name
- variable_name=(t 'English Text')
+ variable_name=(t 'English text')
}}
```
diff --git a/docs/tutorials/life-of-a-request.md b/docs/tutorials/life-of-a-request.md
index eb4d57efac9..f09c88d7ca8 100644
--- a/docs/tutorials/life-of-a-request.md
+++ b/docs/tutorials/life-of-a-request.md
@@ -198,7 +198,7 @@ return `json_error` in the case of an error, which gives a JSON string:
`{'result': 'error', 'msg': <some error message>}`
in a
-[HTTP Response](https://docs.djangoproject.com/en/1.8/ref/request-response/)
+[HTTP response](https://docs.djangoproject.com/en/1.8/ref/request-response/)
with a content type of 'application/json'.
To pass back data from the server to the calling client, in the event of
diff --git a/frontend_tests/node_tests/copy_and_paste.js b/frontend_tests/node_tests/copy_and_paste.js
index dd911de5562..bdd7b4e424d 100644
--- a/frontend_tests/node_tests/copy_and_paste.js
+++ b/frontend_tests/node_tests/copy_and_paste.js
@@ -79,17 +79,17 @@ run_test("paste_handler", () => {
assert.equal(copy_and_paste.paste_handler_converter(input), "*This text is italic*");
input =
- '<div class="preview-content"><div class="comment"><div class="comment-body markdown-body js-preview-body" style="min-height: 131px;"><p>Test List:</p><ul><li>Item 1</li><li>Item 2</li></ul></div></div></div>';
+ '<div class="preview-content"><div class="comment"><div class="comment-body markdown-body js-preview-body" style="min-height: 131px;"><p>Test list:</p><ul><li>Item 1</li><li>Item 2</li></ul></div></div></div>';
assert.equal(
copy_and_paste.paste_handler_converter(input),
- "Test List:\n* Item 1\n* Item 2",
+ "Test list:\n* Item 1\n* Item 2",
);
input =
- '<div class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90za3z66zs0z65zz65zq8z75zlaz81zcz66zj6g2mz78zz76zmz66z22z75zfcz69zz66z ace-ltr focused-line" dir="auto" id="editor-3-ace-line-41"><span>Test List:</span></div><div class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90za3z66zs0z65zz65zq8z75zlaz81zcz66zj6g2mz78zz76zmz66z22z75zfcz69zz66z line-list-type-bullet ace-ltr" dir="auto" id="editor-3-ace-line-42"><ul class="listtype-bullet listindent1 list-bullet1"><li><span class="ace-line-pocket-zws" data-faketext="" data-contentcollector-ignore-space-at="end"></span><span class="ace-line-pocket" data-faketext="" contenteditable="false"></span><span class="ace-line-pocket-zws" data-faketext="" data-contentcollector-ignore-space-at="start"></span><span>Item 1</span></li></ul></div><div class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90za3z66zs0z65zz65zq8z75zlaz81zcz66zj6g2mz78zz76zmz66z22z75zfcz69zz66z line-list-type-bullet ace-ltr" dir="auto" id="editor-3-ace-line-43"><ul class="listtype-bullet listindent1 list-bullet1"><li><span class="ace-line-pocket-zws" data-faketext="" data-contentcollector-ignore-space-at="end"></span><span class="ace-line-pocket" data-faketext="" contenteditable="false"></span><span class="ace-line-pocket-zws" data-faketext="" data-contentcollector-ignore-space-at="start"></span><span>Item 2</span></li></ul></div>';
+ '<div class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90za3z66zs0z65zz65zq8z75zlaz81zcz66zj6g2mz78zz76zmz66z22z75zfcz69zz66z ace-ltr focused-line" dir="auto" id="editor-3-ace-line-41"><span>Test list:</span></div><div class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90za3z66zs0z65zz65zq8z75zlaz81zcz66zj6g2mz78zz76zmz66z22z75zfcz69zz66z line-list-type-bullet ace-ltr" dir="auto" id="editor-3-ace-line-42"><ul class="listtype-bullet listindent1 list-bullet1"><li><span class="ace-line-pocket-zws" data-faketext="" data-contentcollector-ignore-space-at="end"></span><span class="ace-line-pocket" data-faketext="" contenteditable="false"></span><span class="ace-line-pocket-zws" data-faketext="" data-contentcollector-ignore-space-at="start"></span><span>Item 1</span></li></ul></div><div class="ace-line gutter-author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90za3z66zs0z65zz65zq8z75zlaz81zcz66zj6g2mz78zz76zmz66z22z75zfcz69zz66z line-list-type-bullet ace-ltr" dir="auto" id="editor-3-ace-line-43"><ul class="listtype-bullet listindent1 list-bullet1"><li><span class="ace-line-pocket-zws" data-faketext="" data-contentcollector-ignore-space-at="end"></span><span class="ace-line-pocket" data-faketext="" contenteditable="false"></span><span class="ace-line-pocket-zws" data-faketext="" data-contentcollector-ignore-space-at="start"></span><span>Item 2</span></li></ul></div>';
assert.equal(
copy_and_paste.paste_handler_converter(input),
- "Test List:\n* Item 1\n* Item 2",
+ "Test list:\n* Item 1\n* Item 2",
);
let data = "<p>text</p>";
diff --git a/frontend_tests/node_tests/drafts.js b/frontend_tests/node_tests/drafts.js
index 7ba24fd78fb..d93d15b1560 100644
--- a/frontend_tests/node_tests/drafts.js
+++ b/frontend_tests/node_tests/drafts.js
@@ -59,13 +59,13 @@ const draft_1 = {
stream: "stream",
topic: "topic",
type: "stream",
- content: "Test Stream Message",
+ content: "Test stream message",
};
const draft_2 = {
private_message_recipient: "[email protected]",
reply_to: "[email protected]",
type: "private",
- content: "Test Private Message",
+ content: "Test private message",
};
const short_msg = {
stream: "stream",
@@ -185,14 +185,14 @@ test("remove_old_drafts", () => {
stream: "stream",
subject: "topic",
type: "stream",
- content: "Test Stream Message",
+ content: "Test stream message",
updatedAt: Date.now(),
};
const draft_4 = {
private_message_recipient: "[email protected]",
reply_to: "[email protected]",
type: "private",
- content: "Test Private Message",
+ content: "Test private message",
updatedAt: new Date().setDate(-30),
};
const draft_model = drafts.draft_model;
@@ -220,35 +220,35 @@ test("format_drafts", (override) => {
stream: "stream",
topic: "topic",
type: "stream",
- content: "Test Stream Message",
+ content: "Test stream message",
updatedAt: feb12().getTime(),
};
const draft_2 = {
private_message_recipient: "[email protected]",
reply_to: "[email protected]",
type: "private",
- content: "Test Private Message",
+ content: "Test private message",
updatedAt: date(-1),
};
const draft_3 = {
stream: "stream 2",
subject: "topic",
type: "stream",
- content: "Test Stream Message 2",
+ content: "Test stream message 2",
updatedAt: date(-10),
};
const draft_4 = {
private_message_recipient: "[email protected]",
reply_to: "[email protected]",
type: "private",
- content: "Test Private Message 2",
+ content: "Test private message 2",
updatedAt: date(-5),
};
const draft_5 = {
private_message_recipient: "[email protected]",
reply_to: "[email protected]",
type: "private",
- content: "Test Private Message 3",
+ content: "Test private message 3",
updatedAt: date(-2),
};
@@ -260,28 +260,28 @@ test("format_drafts", (override) => {
stream_color: "#FFFFFF",
dark_background: "",
topic: "topic",
- raw_content: "Test Stream Message",
+ raw_content: "Test stream message",
time_stamp: "7:55 AM",
},
{
draft_id: "id2",
is_stream: false,
recipients: "[email protected]",
- raw_content: "Test Private Message",
+ raw_content: "Test private message",
time_stamp: "Jan 30",
},
{
draft_id: "id5",
is_stream: false,
recipients: "[email protected]",
- raw_content: "Test Private Message 3",
+ raw_content: "Test private message 3",
time_stamp: "Jan 29",
},
{
draft_id: "id4",
is_stream: false,
recipients: "[email protected]",
- raw_content: "Test Private Message 2",
+ raw_content: "Test private message 2",
time_stamp: "Jan 26",
},
{
@@ -291,7 +291,7 @@ test("format_drafts", (override) => {
stream_color: "#FFFFFF",
dark_background: "",
topic: "topic",
- raw_content: "Test Stream Message 2",
+ raw_content: "Test stream message 2",
time_stamp: "Jan 21",
},
];
diff --git a/frontend_tests/node_tests/filter.js b/frontend_tests/node_tests/filter.js
index a1f8f452318..522df928e62 100644
--- a/frontend_tests/node_tests/filter.js
+++ b/frontend_tests/node_tests/filter.js
@@ -1125,7 +1125,7 @@ test("describe", () => {
});
test("can_bucket_by", () => {
- let terms = [{operator: "stream", operand: "My Stream"}];
+ let terms = [{operator: "stream", operand: "My stream"}];
let filter = new Filter(terms);
assert.equal(filter.can_bucket_by("stream"), true);
assert.equal(filter.can_bucket_by("stream", "topic"), false);
@@ -1133,8 +1133,8 @@ test("can_bucket_by", () => {
terms = [
// try a non-orthodox ordering
- {operator: "topic", operand: "My Topic"},
- {operator: "stream", operand: "My Stream"},
+ {operator: "topic", operand: "My topic"},
+ {operator: "stream", operand: "My stream"},
];
filter = new Filter(terms);
assert.equal(filter.can_bucket_by("stream"), true);
@@ -1142,8 +1142,8 @@ test("can_bucket_by", () => {
assert.equal(filter.can_bucket_by("pm-with"), false);
terms = [
- {operator: "stream", operand: "My Stream", negated: true},
- {operator: "topic", operand: "My Topic"},
+ {operator: "stream", operand: "My stream", negated: true},
+ {operator: "topic", operand: "My topic"},
];
filter = new Filter(terms);
assert.equal(filter.can_bucket_by("stream"), false);
diff --git a/frontend_tests/node_tests/fold_dict.js b/frontend_tests/node_tests/fold_dict.js
index f65baa4cd3d..8e333191961 100644
--- a/frontend_tests/node_tests/fold_dict.js
+++ b/frontend_tests/node_tests/fold_dict.js
@@ -54,8 +54,8 @@ run_test("case insensitivity", () => {
assert.deepEqual(Array.from(d.keys()), []);
assert(!d.has("foo"));
- d.set("fOO", "Hello World");
- assert.equal(d.get("foo"), "Hello World");
+ d.set("fOO", "Hello world");
+ assert.equal(d.get("foo"), "Hello world");
assert(d.has("foo"));
assert(d.has("FOO"));
assert(!d.has("not_a_key"));
diff --git a/frontend_tests/node_tests/markdown.js b/frontend_tests/node_tests/markdown.js
index 80434ba65ed..3695fdaebb0 100644
--- a/frontend_tests/node_tests/markdown.js
+++ b/frontend_tests/node_tests/markdown.js
@@ -128,7 +128,7 @@ const backend = {
const edgecase_group = {
name: "Bobby <h1>Tables</h1>",
id: 3,
- description: "HTML Syntax to check for Markdown edge cases.",
+ description: "HTML syntax to check for Markdown edge cases.",
members: [],
};
diff --git a/frontend_tests/node_tests/message_list_view.js b/frontend_tests/node_tests/message_list_view.js
index ee0dc9e1576..971bdf1b1a7 100644
--- a/frontend_tests/node_tests/message_list_view.js
+++ b/frontend_tests/node_tests/message_list_view.js
@@ -226,8 +226,8 @@ run_test("merge_message_groups", () => {
id: _.uniqueId("test_message_"),
status_message: false,
type: "stream",
- stream: "Test Stream 1",
- topic: "Test Subject 1",
+ stream: "Test stream 1",
+ topic: "Test subject 1",
sender_email: "[email protected]",
timestamp: (next_timestamp += 1),
...message,
@@ -431,7 +431,7 @@ run_test("merge_message_groups", () => {
const message1 = build_message_context();
const message_group1 = build_message_group([message1]);
- const message2 = build_message_context({topic: "Test Subject 2"});
+ const message2 = build_message_context({topic: "Test subject 2"});
const message_group2 = build_message_group([message2]);
const list = build_list([message_group1]);
@@ -449,7 +449,7 @@ run_test("merge_message_groups", () => {
const message1 = build_message_context({timestamp: 900000});
const message_group1 = build_message_group([message1]);
- const message2 = build_message_context({topic: "Test Subject 2", timestamp: 1000});
+ const message2 = build_message_context({topic: "Test subject 2", timestamp: 1000});
const message_group2 = build_message_group([message2]);
const list = build_list([message_group1]);
diff --git a/frontend_tests/node_tests/narrow_unread.js b/frontend_tests/node_tests/narrow_unread.js
index e347e079a53..9ac2e613962 100644
--- a/frontend_tests/node_tests/narrow_unread.js
+++ b/frontend_tests/node_tests/narrow_unread.js
@@ -49,7 +49,7 @@ run_test("get_unread_ids", () => {
let terms;
const sub = {
- name: "My Stream",
+ name: "My stream",
stream_id: 55,
};
diff --git a/frontend_tests/node_tests/reactions.js b/frontend_tests/node_tests/reactions.js
index 9b86d16f636..1f863a06037 100644
--- a/frontend_tests/node_tests/reactions.js
+++ b/frontend_tests/node_tests/reactions.js
@@ -284,8 +284,8 @@ test("sending", (override) => {
// similarly, we only exercise the failure codepath
// Since this path calls blueslip.warn, we need to handle it.
- blueslip.expect("warn", "XHR Error Message.");
- channel.xhr_error_message = () => "XHR Error Message.";
+ blueslip.expect("warn", "XHR error message.");
+ channel.xhr_error_message = () => "XHR error message.";
args.error();
}
emoji_name = "alien"; // not set yet
diff --git a/frontend_tests/node_tests/recent_topics.js b/frontend_tests/node_tests/recent_topics.js
index d19af187107..a315a9c4a34 100644
--- a/frontend_tests/node_tests/recent_topics.js
+++ b/frontend_tests/node_tests/recent_topics.js
@@ -25,7 +25,7 @@ const stream4 = 4;
const stream5 = 5; // Deleted stream
// Topics in the stream, all unread except topic1 & stream1.
-const topic1 = "topic-1"; // No Other sender & read.
+const topic1 = "topic-1"; // No other sender & read.
const topic2 = "topic-2"; // Other sender
const topic3 = "topic-3"; // User not present
const topic4 = "topic-4"; // User not present
@@ -786,31 +786,31 @@ test("test_topic_edit", (override) => {
test("test_search", () => {
rt.clear_for_tests();
- assert.equal(rt.topic_in_search_results("t", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("T", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("to", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("top", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("ToP", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("Topi", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("tOpi", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("toPic", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("Topic", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("topic", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("recent", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("RECENT", "general", "Recent Topic"), true);
+ assert.equal(rt.topic_in_search_results("t", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("T", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("to", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("top", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("ToP", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("Topi", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("tOpi", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("toPic", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("Topic", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("topic", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("recent", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("RECENT", "general", "Recent topic"), true);
// match in any order of words
- assert.equal(rt.topic_in_search_results("topic recent", "general", "Recent Topic"), true);
+ assert.equal(rt.topic_in_search_results("topic recent", "general", "Recent topic"), true);
// Matches any sequence of words.
- assert.equal(rt.topic_in_search_results("o", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("nt to", "general", "Recent Topic"), true);
- assert.equal(rt.topic_in_search_results("z", "general", "Recent Topic"), false);
+ assert.equal(rt.topic_in_search_results("o", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("nt to", "general", "Recent topic"), true);
+ assert.equal(rt.topic_in_search_results("z", "general", "Recent topic"), false);
- assert.equal(rt.topic_in_search_results("?", "general", "Recent Topic"), false);
+ assert.equal(rt.topic_in_search_results("?", "general", "Recent topic"), false);
// Test special character match
- assert.equal(rt.topic_in_search_results(".*+?^${}()[]\\", "general", "Recent Topic"), false);
+ assert.equal(rt.topic_in_search_results(".*+?^${}()[]\\", "general", "Recent topic"), false);
assert.equal(rt.topic_in_search_results("?", "general", "not-at-start?"), true);
assert.equal(rt.topic_in_search_results("?", "general", "?"), true);
diff --git a/frontend_tests/node_tests/rendered_markdown.js b/frontend_tests/node_tests/rendered_markdown.js
index 12576df8dae..0d22d4c89b0 100644
--- a/frontend_tests/node_tests/rendered_markdown.js
+++ b/frontend_tests/node_tests/rendered_markdown.js
@@ -254,7 +254,7 @@ run_test("spoiler-header", () => {
$content.set_find_results("div.spoiler-header", $array([$header]));
// Test that the show/hide button gets added to a spoiler header.
- const label = "My Spoiler Header";
+ const label = "My spoiler header";
const toggle_button_html =
'<span class="spoiler-button" aria-expanded="false"><span class="spoiler-arrow"></span></span>';
$header.html(label);
diff --git a/frontend_tests/node_tests/settings_profile_fields.js b/frontend_tests/node_tests/settings_profile_fields.js
index 75899e10bc6..e23fdca64b4 100644
--- a/frontend_tests/node_tests/settings_profile_fields.js
+++ b/frontend_tests/node_tests/settings_profile_fields.js
@@ -16,7 +16,7 @@ const SHORT_TEXT_ID = 1;
const SELECT_ID = 3;
const EXTERNAL_ACCOUNT_ID = 7;
-const SHORT_TEXT_NAME = "Short Text";
+const SHORT_TEXT_NAME = "Short text";
const SELECT_NAME = "Select";
const EXTERNAL_ACCOUNT_NAME = "External account";
diff --git a/frontend_tests/node_tests/typeahead_helper.js b/frontend_tests/node_tests/typeahead_helper.js
index ae76d016f21..d1997daf795 100644
--- a/frontend_tests/node_tests/typeahead_helper.js
+++ b/frontend_tests/node_tests/typeahead_helper.js
@@ -224,7 +224,7 @@ test("sort_streams", (override) => {
{
stream_id: 304,
name: "Derp",
- description: "Always Derping",
+ description: "Always derping",
subscribed: false,
},
{
@@ -344,24 +344,24 @@ test("sort_recipients", () => {
recent_senders.process_message_for_senders({
sender_id: 7,
stream_id: 1,
- topic: "Dev Topic",
+ topic: "Dev topic",
id: (next_id += 1),
});
recent_senders.process_message_for_senders({
sender_id: 5,
stream_id: 1,
- topic: "Dev Topic",
+ topic: "Dev topic",
id: (next_id += 1),
});
recent_senders.process_message_for_senders({
sender_id: 6,
stream_id: 1,
- topic: "Dev Topic",
+ topic: "Dev topic",
id: (next_id += 1),
});
// Typeahead for stream message [query, stream-name, topic-name]
- assert.deepEqual(get_typeahead_result("b", "Dev", "Dev Topic"), [
+ assert.deepEqual(get_typeahead_result("b", "Dev", "Dev topic"), [
subscriber_email_3,
subscriber_email_2,
subscriber_email_1,
@@ -374,18 +374,18 @@ test("sort_recipients", () => {
recent_senders.process_message_for_senders({
sender_id: 5,
stream_id: 2,
- topic: "Linux Topic",
+ topic: "Linux topic",
id: (next_id += 1),
});
recent_senders.process_message_for_senders({
sender_id: 7,
stream_id: 2,
- topic: "Linux Topic",
+ topic: "Linux topic",
id: (next_id += 1),
});
// No match
- assert.deepEqual(get_typeahead_result("h", "Linux", "Linux Topic"), [
+ assert.deepEqual(get_typeahead_result("h", "Linux", "Linux topic"), [
@@ -405,7 +405,7 @@ test("sort_recipients all mention", () => {
// Test person email is "all" or "everyone"
const test_objs = matches.concat([all_obj]);
- const results = th.sort_recipients(test_objs, "a", "Linux", "Linux Topic");
+ const results = th.sort_recipients(test_objs, "a", "Linux", "Linux topic");
assertSameEmails(results, [all_obj, a_bot, a_user, b_user_1, b_user_2, b_user_3, b_bot, zman]);
});
@@ -433,7 +433,7 @@ test("sort_recipients pm counts", () => {
const linux_sub = stream_data.get_sub("Linux");
peer_data.add_subscriber(linux_sub.stream_id, b_user_3.user_id);
- assert.deepEqual(get_typeahead_result("b", "Linux", "Linux Topic"), [
+ assert.deepEqual(get_typeahead_result("b", "Linux", "Linux topic"), [
@@ -482,7 +482,7 @@ test("sort_recipients dup alls", () => {
// full_name starts with same character but emails are 'all'
const test_objs = [all_obj, a_user, all_obj];
- const recipients = th.sort_recipients(test_objs, "a", "Linux", "Linux Topic");
+ const recipients = th.sort_recipients(test_objs, "a", "Linux", "Linux topic");
const expected = [all_obj, all_obj, a_user];
assertSameEmails(recipients, expected);
@@ -491,7 +491,7 @@ test("sort_recipients dup alls", () => {
test("sort_recipients subscribers", () => {
// b_user_2 is a subscriber and b_user_1 is not.
const small_matches = [b_user_2, b_user_1];
- const recipients = th.sort_recipients(small_matches, "b", "Dev", "Dev Topic");
+ const recipients = th.sort_recipients(small_matches, "b", "Dev", "Dev topic");
const recipients_email = recipients.map((person) => person.email);
const expected = ["[email protected]", "[email protected]"];
assert.deepEqual(recipients_email, expected);
@@ -501,7 +501,7 @@ test("sort_recipients pm partners", () => {
// b_user_3 is a pm partner and b_user_2 is not and
// both are not subscribered to the stream Linux.
const small_matches = [b_user_3, b_user_2];
- const recipients = th.sort_recipients(small_matches, "b", "Linux", "Linux Topic");
+ const recipients = th.sort_recipients(small_matches, "b", "Linux", "Linux topic");
const recipients_email = recipients.map((person) => person.email);
const expected = ["[email protected]", "[email protected]"];
assert.deepEqual(recipients_email, expected);
@@ -629,7 +629,7 @@ test("render_stream", () => {
const stream = {
description: "This is a short description.",
stream_id: 42,
- name: "Short Description",
+ name: "Short description",
};
stub_templates((template_name, args) => {
@@ -649,7 +649,7 @@ test("render_stream w/long description", () => {
const stream = {
description: "This is a very very very very very long description.",
stream_id: 43,
- name: "Long Description",
+ name: "Long description",
};
stub_templates((template_name, args) => {
diff --git a/frontend_tests/node_tests/unread.js b/frontend_tests/node_tests/unread.js
index 09fa4a1d065..07fdc416be0 100644
--- a/frontend_tests/node_tests/unread.js
+++ b/frontend_tests/node_tests/unread.js
@@ -249,7 +249,7 @@ test("num_unread_for_topic", (override) => {
override(sub_store, "get", (arg) => {
if (arg === stream_id) {
- return {name: "Some Stream"};
+ return {name: "Some stream"};
}
throw new Error(`Unknown stream ${arg}`);
});
diff --git a/frontend_tests/node_tests/upload.js b/frontend_tests/node_tests/upload.js
index 58fc9969382..a21a82bc481 100644
--- a/frontend_tests/node_tests/upload.js
+++ b/frontend_tests/node_tests/upload.js
@@ -614,7 +614,7 @@ test("uppy_events", (override) => {
state = {
type: "error",
- details: "Some Error",
+ details: "Some error",
message: "Some error message",
};
const on_info_visible_callback = callbacks["info-visible"];
diff --git a/frontend_tests/node_tests/zjquery.js b/frontend_tests/node_tests/zjquery.js
index f9d1e0c0f56..cef8a8db976 100644
--- a/frontend_tests/node_tests/zjquery.js
+++ b/frontend_tests/node_tests/zjquery.js
@@ -62,8 +62,8 @@ run_test("basics", () => {
widget.html("<b>hello</b>");
assert.equal(widget.html(), "<b>hello</b>");
- widget.prop("title", "My Widget");
- assert.equal(widget.prop("title"), "My Widget");
+ widget.prop("title", "My widget");
+ assert.equal(widget.prop("title"), "My widget");
widget.val("42");
assert.equal(widget.val(), "42");
diff --git a/frontend_tests/puppeteer_tests/drafts.ts b/frontend_tests/puppeteer_tests/drafts.ts
index e55e398b93a..44882e29779 100644
--- a/frontend_tests/puppeteer_tests/drafts.ts
+++ b/frontend_tests/puppeteer_tests/drafts.ts
@@ -37,7 +37,7 @@ async function test_empty_drafts(page: Page): Promise<void> {
}
async function create_stream_message_draft(page: Page): Promise<void> {
- console.log("Creating Stream Message Draft");
+ console.log("Creating stream message draft");
await page.keyboard.press("KeyC");
await page.waitForSelector("#stream-message", {visible: true});
await common.fill_form(page, "form#send_message_form", {
@@ -116,7 +116,7 @@ async function test_previously_created_drafts_rendered(page: Page): Promise<void
}
async function test_restore_message_draft(page: Page): Promise<void> {
- console.log("Restoring Stream Message Draft");
+ console.log("Restoring stream message draft");
await page.click("#drafts_table .message_row:not(.private-message) .restore-draft");
await wait_for_drafts_to_dissapear(page);
await page.waitForSelector("#stream-message", {visible: true});
@@ -137,7 +137,7 @@ async function edit_stream_message_draft(page: Page): Promise<void> {
await common.fill_form(page, "form#send_message_form", {
stream_message_recipient_stream: "all",
stream_message_recipient_topic: "tests",
- content: "Updated Stream Message",
+ content: "Updated stream message",
});
await page.click("#compose_close");
}
@@ -166,7 +166,7 @@ async function test_edited_draft_message(page: Page): Promise<void> {
page,
".draft-row:nth-last-child(2) .rendered_markdown.restore-draft",
),
- "Updated Stream Message",
+ "Updated stream message",
);
}
diff --git a/frontend_tests/puppeteer_tests/settings.ts b/frontend_tests/puppeteer_tests/settings.ts
index d399c9dd43e..f2406f35847 100644
--- a/frontend_tests/puppeteer_tests/settings.ts
+++ b/frontend_tests/puppeteer_tests/settings.ts
@@ -82,7 +82,7 @@ async function test_get_api_key(page: Page): Promise<void> {
});
// When typing the password in Firefox, it shows "Not Secure" warning
- // which was hiding the Get API Key button.
+ // which was hiding the Get API key button.
// You can see the screenshot of it in https://github.com/zulip/zulip/pull/17136.
// Focusing on it will remove the warning.
await page.focus(get_api_key_button_selector);
diff --git a/puppet/zulip_ops/manifests/profile/base.pp b/puppet/zulip_ops/manifests/profile/base.pp
index 63388600718..f10fc0edd12 100644
--- a/puppet/zulip_ops/manifests/profile/base.pp
+++ b/puppet/zulip_ops/manifests/profile/base.pp
@@ -8,7 +8,7 @@ class zulip_ops::profile::base {
'mosh',
# package management
'aptitude',
- # SSL Certificates
+ # SSL certificates
'certbot',
# Security
'iptables-persistent',
diff --git a/static/js/message_fetch.js b/static/js/message_fetch.js
index b7cd0f49f5c..86bb7711cfb 100644
--- a/static/js/message_fetch.js
+++ b/static/js/message_fetch.js
@@ -456,11 +456,11 @@ export function initialize(home_view_loaded) {
// more performant (i.e. avoids this unnecessary extra fetch the
// results of which are basically discarded) and better represents
// more than a few hundred messages' history, but this strategy
- // allows "Recent Topics" to always show current data (with gaps)
+ // allows "Recent topics" to always show current data (with gaps)
// on page load; the data will be complete once the algorithm
// above catches up to present.
//
- // (Users will see a weird artifact where Recent Topics has a gap
+ // (Users will see a weird artifact where Recent topics has a gap
// between E.g. 6 days ago and 37 days ago while the catchup
// process runs, so this strategy still results in problematic
// visual artifacts shortly after page load; just more forgiveable
diff --git a/static/js/narrow.js b/static/js/narrow.js
index c0c18f03f0e..45ba5b364d5 100644
--- a/static/js/narrow.js
+++ b/static/js/narrow.js
@@ -828,7 +828,7 @@ export function deactivate(coming_from_recent_topics = false) {
message_lists.home in it.
*/
search.clear_search_form();
- // Both All messages and Recent Topics have `undefined` filter.
+ // Both All messages and Recent topics have `undefined` filter.
// Return if already in the All message narrow.
if (narrow_state.filter() === undefined && !coming_from_recent_topics) {
return;
diff --git a/static/js/portico/integrations_dev_panel.js b/static/js/portico/integrations_dev_panel.js
index 5c02c99a4d7..d16dda2e02b 100644
--- a/static/js/portico/integrations_dev_panel.js
+++ b/static/js/portico/integrations_dev_panel.js
@@ -4,7 +4,7 @@ import * as channel from "../channel";
// Main JavaScript file for the integrations development panel at
// /devtools/integrations.
-// Data Segment: We lazy load the requested fixtures from the backend
+// Data segment: We lazy load the requested fixtures from the backend
// as and when required and then cache them here.
const loaded_fixtures = new Map();
@@ -106,9 +106,9 @@ function set_results(response) {
for (const response of responses) {
if (response.fixture_name !== undefined) {
data += "Fixture: " + response.fixture_name;
- data += "\nStatus Code: " + response.status_code;
+ data += "\nStatus code: " + response.status_code;
} else {
- data += "Status Code: " + response.status_code;
+ data += "Status code: " + response.status_code;
}
data += "\nResponse: " + response.message + "\n\n";
}
@@ -184,7 +184,7 @@ function update_url() {
return;
}
-// API Callers: These methods handle communicating with the Python backend API.
+// API callers: These methods handle communicating with the Python backend API.
function handle_unsuccessful_response(response) {
try {
const status_code = response.statusCode().status;
@@ -337,7 +337,7 @@ $(() => {
]);
$("#stream_name")[0].value = "Denmark";
- $("#topic_name")[0].value = "Integrations Testing";
+ $("#topic_name")[0].value = "Integrations testing";
const potential_default_bot = $("#bot_name")[0][1];
if (potential_default_bot !== undefined) {
diff --git a/static/js/settings_profile_fields.js b/static/js/settings_profile_fields.js
index ee2480cfd60..4635c8491c6 100644
--- a/static/js/settings_profile_fields.js
+++ b/static/js/settings_profile_fields.js
@@ -114,7 +114,7 @@ function create_choice_row(container) {
function clear_form_data() {
$("#profile_field_name").val("").closest(".control-group").show();
$("#profile_field_hint").val("").closest(".control-group").show();
- // Set default type "Short Text" in field type dropdown
+ // Set default type "Short text" in field type dropdown
$("#profile_field_type").val(field_types.SHORT_TEXT.id);
// Clear data from select field form
$("#profile_field_choices").html("");
diff --git a/static/shared/js/fenced_code.js b/static/shared/js/fenced_code.js
index 5c2fb5ab52f..91a6fcc0dd2 100644
--- a/static/shared/js/fenced_code.js
+++ b/static/shared/js/fenced_code.js
@@ -9,7 +9,7 @@ import _ from "lodash";
// See backend fenced_code.py:71 for associated regexp
const fencestr =
- "^(~{3,}|`{3,})" + // Opening Fence
+ "^(~{3,}|`{3,})" + // Opening fence
"[ ]*" + // Spaces
"(" +
"\\{?\\.?" +
diff --git a/static/styles/portico/markdown.css b/static/styles/portico/markdown.css
index 45822b116f2..62e33d24a34 100644
--- a/static/styles/portico/markdown.css
+++ b/static/styles/portico/markdown.css
@@ -256,7 +256,7 @@
.keyboard_tip::before {
display: inline;
- content: "\f11c Keyboard Shortcut: ";
+ content: "\f11c Keyboard shortcut: ";
font-family: FontAwesome, "Source Sans 3", sans-serif;
font-weight: 600;
}
diff --git a/static/templates/settings/playground_settings_admin.hbs b/static/templates/settings/playground_settings_admin.hbs
index 48f4e6644be..58a240b6778 100644
--- a/static/templates/settings/playground_settings_admin.hbs
+++ b/static/templates/settings/playground_settings_admin.hbs
@@ -13,7 +13,7 @@
<p>
{{#tr}}
For example, to configure code playgrounds for languages like Python or JavaScript, you could specify the <i>Language</i>
- and <i>URL Prefix</i> fields as:
+ and <i>URL prefix</i> fields as:
{{/tr}}
</p>
<ul>
diff --git a/templates/zerver/api/incoming-webhooks-walkthrough.md b/templates/zerver/api/incoming-webhooks-walkthrough.md
index 330381c577a..a9a1da5734d 100644
--- a/templates/zerver/api/incoming-webhooks-walkthrough.md
+++ b/templates/zerver/api/incoming-webhooks-walkthrough.md
@@ -219,7 +219,7 @@ These configuration options are declared as follows:
```
WebhookIntegration('helloworld', ['misc'], display_name='Hello World',
- config_options=[('HelloWorld API Key', 'hw_api_key', check_string)])
+ config_options=[('HelloWorld API key', 'hw_api_key', check_string)])
```
`config_options` is a list describing the parameters the user should
@@ -251,7 +251,7 @@ After running the above command, you should see something similar to:
{"msg":"","result":"success"}
```
-### Management Command: send_webhook_fixture_message
+### Management command: send_webhook_fixture_message
Using `manage.py` from within the Zulip development environment:
@@ -471,7 +471,7 @@ request:
https://zulip.readthedocs.io/en/latest/contributing/code-style.html) and take a look
through your code to double-check that you've followed Zulip's guidelines.
3. Take a look at your Git history to ensure your commits have been clear and
- logical (see [Version Control](
+ logical (see [Version control](
https://zulip.readthedocs.io/en/latest/contributing/version-control.html) for tips). If not,
consider revising them with `git rebase --interactive`. For most incoming webhooks,
you'll want to squash your changes into a single commit and include a good,
@@ -519,7 +519,7 @@ def test_unknown_action_no_data(self) -> None:
result = self.client_post(self.url, 'unknown_action', **post_params)
# check that we got the expected error message
- self.assert_json_error(result, "Unknown WordPress webhook action: WordPress Action")
+ self.assert_json_error(result, "Unknown WordPress webhook action: WordPress action")
```
In a normal test, `check_webhook` would handle all the setup
@@ -572,17 +572,17 @@ attribute `TOPIC` as a keyword argument to `build_webhook_url`, like so:
class QuerytestHookTests(WebhookTestCase):
STREAM_NAME = 'querytest'
- TOPIC = "Default Topic"
+ TOPIC = "Default topic"
URL_TEMPLATE = "/api/v1/external/querytest?api_key={api_key}&stream={stream}"
FIXTURE_DIR_NAME = 'querytest'
def test_querytest_test_one(self) -> None:
# construct the URL used for this test
- self.TOPIC = "Query Test"
+ self.TOPIC = "Query test"
self.url = self.build_webhook_url(topic=self.TOPIC)
# define the expected message contents
- expected_topic = "Query Test"
+ expected_topic = "Query test"
expected_message = "This is a test of custom query parameters."
self.check_webhook('test_one', expected_topic, expected_message,
diff --git a/templates/zerver/api/rest-error-handling.md b/templates/zerver/api/rest-error-handling.md
index 7ea76c52500..eeedd0b7b1b 100644
--- a/templates/zerver/api/rest-error-handling.md
+++ b/templates/zerver/api/rest-error-handling.md
@@ -1,4 +1,4 @@
-# Error Handling
+# Error handling
Zulip's API will always return a JSON format response.
The HTTP status code indicates whether the request was successful
diff --git a/templates/zerver/api/sidebar_index.md b/templates/zerver/api/sidebar_index.md
index 6a89ff2856c..62412c78b2f 100644
--- a/templates/zerver/api/sidebar_index.md
+++ b/templates/zerver/api/sidebar_index.md
@@ -19,7 +19,7 @@
* [API keys](/api/api-keys)
* [Configuring the Python bindings](/api/configuring-python-bindings)
* [Error handling](/api/rest-error-handling)
-* [Client Libraries](/api/client-libraries)
+* [Client libraries](/api/client-libraries)
* [Changelog](/api/changelog)
{!rest-endpoints.md!}
diff --git a/templates/zerver/api/update-message-flags.md b/templates/zerver/api/update-message-flags.md
index b416a0bc3c1..7e52a9ded4f 100644
--- a/templates/zerver/api/update-message-flags.md
+++ b/templates/zerver/api/update-message-flags.md
@@ -25,7 +25,7 @@ More examples and documentation can be found [here](https://github.com/zulip/zul
{generate_api_arguments_table|zulip.yaml|/messages/flags:post}
-## Available Flags
+## Available flags
<div>
<table>
<thead>
diff --git a/templates/zerver/api/writing-bots.md b/templates/zerver/api/writing-bots.md
index 8cc9ba00d33..a13371c955a 100644
--- a/templates/zerver/api/writing-bots.md
+++ b/templates/zerver/api/writing-bots.md
@@ -126,9 +126,9 @@ Response: 12.0 meter = 13.12336 yard
> zulip-terminal -b ~/followup.conf followup
-Enter your message: "Task Completed"
+Enter your message: "Task completed"
Response: stream: followup topic: [email protected]
- from [email protected]: Task Completed
+ from [email protected]: Task completed
```
diff --git a/templates/zerver/app/navbar.html b/templates/zerver/app/navbar.html
index dd8ca1d8a78..0fc12c140e4 100644
--- a/templates/zerver/app/navbar.html
+++ b/templates/zerver/app/navbar.html
@@ -56,7 +56,7 @@
<ul class="dropdown-menu" role="menu" aria-labelledby="settings-dropdown">
{#
It is quite ingrained in our frontend code that your Home
- view is a Bootstrap Nav tab, even though we don't show the tab
+ view is a Bootstrap nav tab, even though we don't show the tab
anymore
#}
<li class="invisible" style="display:none;" role="presentation"><a href="#message_feed_container" data-toggle="tab"></a></li>
diff --git a/templates/zerver/compare.html b/templates/zerver/compare.html
index a324ff4dc57..dd07f90377a 100644
--- a/templates/zerver/compare.html
+++ b/templates/zerver/compare.html
@@ -70,7 +70,7 @@
<td>Free and open source</td>
<td class="yes"></td>
<td class="no"></td>
- <td>Open Core *</td>
+ <td>Open core *</td>
<td class="no"></td>
</tr>
</tbody>
diff --git a/templates/zerver/development/integrations_dev_panel.html b/templates/zerver/development/integrations_dev_panel.html
index b5f7cbd8ac4..1b2c3dba9db 100644
--- a/templates/zerver/development/integrations_dev_panel.html
+++ b/templates/zerver/development/integrations_dev_panel.html
@@ -70,14 +70,14 @@
<br />
<div class="row2">
- <label for="URL"><b>URL</b> (Automatically Generated)</label>
+ <label for="URL"><b>URL</b> (automatically generated)</label>
<input id="URL" type="text" />
</div>
<br />
<div class="row3">
- <label for="custom_http_headers"><b>Custom HTTP Headers</b></label>
+ <label for="custom_http_headers"><b>Custom HTTP headers</b></label>
<textarea id="custom_http_headers"></textarea>
</div>
@@ -86,12 +86,12 @@
<div class="row4">
<div class="col1">
<div class="inline">
- <label for="fixture_body"><b>Fixture Body</b></label>
+ <label for="fixture_body"><b>Fixture body</b></label>
<span id="results_notice"></span>
</div>
<textarea id="fixture_body"></textarea>
<div class="buttons">
- <button id="send_all_fixtures_button">Send All</button>
+ <button id="send_all_fixtures_button">Send all</button>
<button id="send_fixture_button">Send!</button>
</div>
</div>
diff --git a/templates/zerver/digest_base.html b/templates/zerver/digest_base.html
index 5081ca7b4ac..f91c290bb3f 100644
--- a/templates/zerver/digest_base.html
+++ b/templates/zerver/digest_base.html
@@ -9,7 +9,7 @@
<div class="digest-container">
<div class="digest-email-container">
<div class="portico-page" id="digest-page-title">
- <h1> Zulip Digest </h1>
+ <h1> Zulip digest </h1>
</div>
<div class="digest-email-html">
{% include 'zerver/emails/compiled/digest.html' %}
diff --git a/templates/zerver/email.html b/templates/zerver/email.html
index 14b98127516..69ebcb88d9a 100644
--- a/templates/zerver/email.html
+++ b/templates/zerver/email.html
@@ -3,7 +3,7 @@
{% endif %}
<h4>From: {{ from_email }}</h4>
{% if reply_to %}
-<h4>Reply To:
+<h4>Reply to:
{% for email in reply_to %}
{{ email }}&nbsp;
{% endfor %}
diff --git a/templates/zerver/features.html b/templates/zerver/features.html
index ecb8697f638..ce76c1022b6 100644
--- a/templates/zerver/features.html
+++ b/templates/zerver/features.html
@@ -1,7 +1,7 @@
{% extends "zerver/portico.html" %}
{% set entrypoint = "landing-page" %}
-{% set OPEN_GRAPH_TITLE = 'Zulip Features' %}
+{% set OPEN_GRAPH_TITLE = 'Zulip features' %}
{% set OPEN_GRAPH_DESCRIPTION = 'First class threading on top of everything you could want from real-time chat.' %}
{% block portico_content %}
diff --git a/templates/zerver/for/companies.md b/templates/zerver/for/companies.md
index dda1cea3193..7e225368b97 100644
--- a/templates/zerver/for/companies.md
+++ b/templates/zerver/for/companies.md
@@ -53,7 +53,7 @@ Zulip teams are still snappy at thousands of users.
### Hundreds of integrations.
-Get events from GitHub, Stripe, Travis CI, JIRA, and
+Get events from GitHub, Stripe, Travis CI, Jira, and
[hundreds of other tools](/integrations) right in Zulip. Use topics to give
each issue or decision its own place for discussion. Link to tickets in
external sites with
diff --git a/templates/zerver/for/open-source.md b/templates/zerver/for/open-source.md
index f895191f2f9..74798a460cf 100644
--- a/templates/zerver/for/open-source.md
+++ b/templates/zerver/for/open-source.md
@@ -157,7 +157,7 @@ your organization.
### Hundreds of integrations.
-Get events from GitHub, Travis CI, JIRA, and
+Get events from GitHub, Travis CI, Jira, and
[hundreds of other tools](/integrations) right in Zulip. Topics give each
issue its own place for discussion.
diff --git a/templates/zerver/for/research.md b/templates/zerver/for/research.md
index 70829fef29e..b6ba6a5f5f0 100644
--- a/templates/zerver/for/research.md
+++ b/templates/zerver/for/research.md
@@ -5,7 +5,7 @@ describes academic research better than any of our other use cases.
Zulip has long been popular with individual research groups, but
during the pandemic has started being used for large distributed
communities focused around research topics like category theory or the
-Lean Theorem Prover. We enthusiastically provide free hosting for
+Lean theorem prover. We enthusiastically provide free hosting for
both use cases.
If you haven’t read [why Zulip](/why-zulip), read that first. The
@@ -162,12 +162,12 @@ hosting to your own servers.
### Free and open source.
-Unlike many modern "open source" applications that are actually Open
-Core, Zulip is 100% Free and Open Source software. All code,
+Unlike many modern "open source" applications that are actually open
+core, Zulip is 100% free and open source software. All code,
including for the [server](https://github.com/zulip/zulip),
[desktop](https://github.com/zulip/zulip-desktop),
[mobile](https://github.com/zulip/zulip-mobile), and beta
-[terminal](https://github.com/zulip/zulip-terminal) apps is available
+[terminal](https://github.com/zulip/zulip-terminal) apps, is available
under the Apache 2 license.
### Created by former academics
diff --git a/templates/zerver/gitlab-error.md b/templates/zerver/gitlab-error.md
index 5c91e0b62a1..ea4a121d9ca 100644
--- a/templates/zerver/gitlab-error.md
+++ b/templates/zerver/gitlab-error.md
@@ -3,7 +3,7 @@ properly configured. To configure, please check the following:
* You have added `{{ root_domain_uri }}/complete/gitlab/` as the callback
URL in the OAuth application in GitLab. You can register OAuth apps at
-[GitLab Applications](https://gitlab.com/profile/applications).
+[GitLab applications](https://gitlab.com/profile/applications).
* You have set `{{ client_id_key_name }}` in `{{ settings_path }}` and
`social_auth_gitlab_secret` in `{{ secrets_path }}` with the values
diff --git a/templates/zerver/hello.html b/templates/zerver/hello.html
index a3172d8266a..00409f07322 100644
--- a/templates/zerver/hello.html
+++ b/templates/zerver/hello.html
@@ -425,8 +425,8 @@
</a>
<a href="/integrations/doc/jira">
<div class="group">
- <img class="integration-logo" src="/static/images/integrations/logos/jira.svg" alt="{{ _('JIRA logo') }}" />
- <h3 class="integration-name">JIRA</h3>
+ <img class="integration-logo" src="/static/images/integrations/logos/jira.svg" alt="{{ _('Jira logo') }}" />
+ <h3 class="integration-name">Jira</h3>
<p class="integration-description">Monitor project bugs and issues</p>
</div>
</a>
diff --git a/templates/zerver/help/change-default-view.md b/templates/zerver/help/change-default-view.md
index cb6f72deba2..a5abcd2f60b 100644
--- a/templates/zerver/help/change-default-view.md
+++ b/templates/zerver/help/change-default-view.md
@@ -14,7 +14,7 @@ configure a different view as the default.
{settings_tab|display-settings}
-2. Under **Display Settings**, click on the **Default view** dropdown.
+2. Under **Display settings**, click on the **Default view** dropdown.
3. Select a view.
diff --git a/templates/zerver/help/change-your-language.md b/templates/zerver/help/change-your-language.md
index f68585b2712..a7194644183 100644
--- a/templates/zerver/help/change-your-language.md
+++ b/templates/zerver/help/change-your-language.md
@@ -15,7 +15,7 @@ If your entire organization speaks a language other than English, an administrat
{settings_tab|display-settings}
-2. Under **Language Settings**, click the button next to **Default language**.
+2. Under **Language settings**, click the button next to **Default language**.
3. Click on a language.
diff --git a/templates/zerver/help/code-blocks.md b/templates/zerver/help/code-blocks.md
index 72de0f52071..68538709b7b 100644
--- a/templates/zerver/help/code-blocks.md
+++ b/templates/zerver/help/code-blocks.md
@@ -91,7 +91,7 @@ prefix**.
{end_tabs}
For example, to configure code playgrounds for languages like Python or
-JavaScript, you could specify the Language and URL Prefix fields as:
+JavaScript, you could specify the language and URL prefix fields as:
* `Python` and `https://replit.com/languages/python3/?code=`
* `JavaScript` and `https://replit.com/languages/javascript/?code=`
@@ -105,7 +105,7 @@ in the speficied code playground.
* You can configure multiple playgrounds for a given language; if you do that,
the user will get to choose which playground to open the code in.
-* The `Language` field is the human-readable Pygments language name for that
+* The **Language** field is the human-readable Pygments language name for that
programming language. The language tag for a code block is internally mapped
to these human-readable Pygments names. E.g: `py3` and `py` are mapped to
`Python`. One can use the typeahead (which appears when you type something
diff --git a/templates/zerver/help/desktop-app-install-guide.md b/templates/zerver/help/desktop-app-install-guide.md
index c8e5c955cda..e99003edf65 100644
--- a/templates/zerver/help/desktop-app-install-guide.md
+++ b/templates/zerver/help/desktop-app-install-guide.md
@@ -51,7 +51,7 @@ to future versions. <!-- TODO fact check -->
{tab|linux}
-#### apt (Ubuntu or Debian 8+)
+#### APT (Ubuntu or Debian 8+)
1. Enter the following commands into a terminal:
@@ -62,7 +62,7 @@ to future versions. <!-- TODO fact check -->
sudo apt update
sudo apt install zulip
- These commands set up the Zulip Desktop apt repository and its signing
+ These commands set up the Zulip Desktop APT repository and its signing
key, and then install the Zulip client.
1. Run Zulip from your app launcher, or with `zulip` from a terminal.
diff --git a/templates/zerver/help/format-your-message-using-markdown.md b/templates/zerver/help/format-your-message-using-markdown.md
index 9cc8db89aac..dda1aed42f2 100644
--- a/templates/zerver/help/format-your-message-using-markdown.md
+++ b/templates/zerver/help/format-your-message-using-markdown.md
@@ -156,7 +156,7 @@ the user interacts with it.
~~~
Normal content in message
-```spoiler Spoiler Header
+```spoiler Spoiler header
Spoiler content. These lines won't be visible until the user expands the spoiler.
```
~~~
@@ -197,7 +197,7 @@ the variant that only contains the user ID).
![Markdown mentions](/static/images/help/markdown-mentions.png)
-## Status Messages
+## Status messages
```
/me is away
diff --git a/templates/zerver/help/roles-and-permissions.md b/templates/zerver/help/roles-and-permissions.md
index 2016f0f0975..7e6f59ab211 100644
--- a/templates/zerver/help/roles-and-permissions.md
+++ b/templates/zerver/help/roles-and-permissions.md
@@ -9,24 +9,24 @@ There are several possible roles in a Zulip organization.
and organization settings. Cannot create or demote organization
owners.
-* **Moderator**: Have the permissions of Full Members; additionally,
- many "Organization permissions" settings allow Moderators to be
+* **Moderator**: Have the permissions of full members; additionally,
+ many "Organization permissions" settings allow moderators to be
given additional privileges or do so by default.
* **Member**: Has access to all public streams. Member is the default
role for most users. [Some organization
settings](/help/restrict-permissions-of-new-members) allow an
- organization to restrict the permissions of **New Members**; Members
- who do not have those restrictions are called **Full Members**.
+ organization to restrict the permissions of **new members**; Members
+ who do not have those restrictions are called **full members**.
* **Guest**: Can only view or access streams they've been added to.
Guest users interact with public streams as though they were private
streams with shared history. Cannot create new streams or invite
other users.
-* **Billing Administrator**: The user who upgrades the organization to
- a paid plan is, in addition to their normal role, a Billing
- Administrator. Can manage billing in addition to the existing
+* **Billing administrator**: The user who upgrades the organization to
+ a paid plan is, in addition to their normal role, a billing
+ administrator. Can manage billing in addition to the existing
privileges. This allows someone from the billing department to
manage billing without needing organization administrator
permissions.
diff --git a/templates/zerver/help/saml-authentication.md b/templates/zerver/help/saml-authentication.md
index 910edd92c8b..b11a5de6c62 100644
--- a/templates/zerver/help/saml-authentication.md
+++ b/templates/zerver/help/saml-authentication.md
@@ -4,7 +4,7 @@ Zulip supports using SAML authentication for single sign-on, both when
self-hosting or on the Zulip Cloud Plus plan.
This page documents details on how to set up SAML authentication with
-Zulip with various common SAML Identity Providers.
+Zulip with various common SAML identity providers.
## Configure SAML with Okta
diff --git a/templates/zerver/integrations/jira-plugin.md b/templates/zerver/integrations/jira-plugin.md
index 2cadec2303d..a08c8ec729a 100644
--- a/templates/zerver/integrations/jira-plugin.md
+++ b/templates/zerver/integrations/jira-plugin.md
@@ -1,7 +1,7 @@
-*If you are running JIRA version 5.2 or greater, or using the hosted
-JIRA provided by Atlassian, we recommend using the
+*If you are running Jira version 5.2 or greater, or using the hosted
+Jira provided by Atlassian, we recommend using the
[web-hook method](./jira) above instead. This plugin supports older
-versions of JIRA.*
+versions of Jira.*
{!create-stream.md!}
@@ -11,9 +11,9 @@ versions of JIRA.*
#### Plugin installation
-The JIRA integration plugin requires two JIRA plugins. Please install
+The Jira integration plugin requires two Jira plugins. Please install
the following plugins using the **Universal Plugin Manager** in your
-JIRA installation:
+Jira installation:
* [Script Runner Plugin][script-runner]
* [SSL Plugin][ssl-plugin]
@@ -24,21 +24,21 @@ JIRA installation:
#### SSL setup
As Zulip is using a StartCOM SSL certificate that is not recognized by
-default in the Java installation shipped with JIRA, you will need to
-tell JIRA about the certificate.
+default in the Java installation shipped with Jira, you will need to
+tell Jira about the certificate.
1. Navigate to **Administration > System > Configure SSL** and in the
**Import SSL Certificates** field, enter `{{ api_url }}`.
2. After clicking **Save Certificates**, follow the on-screen
- instructions and restart JIRA for it to recognize the proper
+ instructions and restart Jira for it to recognize the proper
certificates.
#### Zulip integration
1. Copy the folder `integrations/jira/org/` (from the tarball you
- downloaded above) to your JIRA `classes` folder. For self-contained
- JIRA installations, this will be `atlassian-jira/WEB-INF/classes/`,
+ downloaded above) to your Jira `classes` folder. For self-contained
+ Jira installations, this will be `atlassian-jira/WEB-INF/classes/`,
but this may be different in your deployment.
2. Edit the constants at the top of
@@ -62,10 +62,10 @@ String issueBaseUrl = "https://jira.COMPANY.com/browse/"
5. In the **Name of groovy class** field, enter
`org.zulip.jira.ZulipListener`.
-6. Click **Add Listener**, and JIRA will now notify your Zulip of
- changes to your issues! Updates from JIRA will be sent to the stream
+6. Click **Add Listener**, and Jira will now notify your Zulip of
+ changes to your issues! Updates from Jira will be sent to the stream
you've configured.
{!congrats.md!}
-![JIRA bot message](/static/images/integrations/jira/001.png)
+![Jira bot message](/static/images/integrations/jira/001.png)
diff --git a/templates/zerver/landing_nav.html b/templates/zerver/landing_nav.html
index dfc889ef67e..4ec53a908ef 100644
--- a/templates/zerver/landing_nav.html
+++ b/templates/zerver/landing_nav.html
@@ -56,7 +56,7 @@
{% if find_team_link_disabled %}
{% else %}
<li>
- <a href="/accounts/find/">Find Accounts</a>
+ <a href="/accounts/find/">Find accounts</a>
</li>
{% endif %}
</ul>
diff --git a/templates/zerver/meta_tags.html b/templates/zerver/meta_tags.html
index c56376a03ad..5a12ae3f4db 100644
--- a/templates/zerver/meta_tags.html
+++ b/templates/zerver/meta_tags.html
@@ -1,4 +1,4 @@
-<!-- Google / Search Engine Tags -->
+<!-- Google / search engine tags -->
{% if allow_search_engine_indexing %}
{% if OPEN_GRAPH_DESCRIPTION %}
<meta name="description" content="{{ OPEN_GRAPH_DESCRIPTION }}" />
@@ -9,7 +9,7 @@
<meta name="robots" content="noindex,nofollow" />
{% endif %}
-<!-- Open Graph / Facebook / Twitter Meta Tags -->
+<!-- Open Graph / Facebook / Twitter meta tags -->
<meta property="og:url" content="{{ OPEN_GRAPH_URL }}" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Zulip" />
diff --git a/templates/zerver/security.html b/templates/zerver/security.html
index c1cb3cd3a84..7697d164726 100644
--- a/templates/zerver/security.html
+++ b/templates/zerver/security.html
@@ -2,7 +2,7 @@
{% set entrypoint = "landing-page" %}
{% block title %}
-<title>Zulip Security</title>
+<title>Zulip security</title>
{% endblock %}
{% block customhead %}
@@ -17,7 +17,7 @@
<div class="hero bg-pycon security">
<div class="bg-dimmer"></div>
<div class="content">
- <h1 class="center">Zulip Security</h1>
+ <h1 class="center">Zulip security</h1>
<p></p>
</div>
</div>
diff --git a/tools/ci/production-verify b/tools/ci/production-verify
index 57ddac896f0..bb1197aa88e 100755
--- a/tools/ci/production-verify
+++ b/tools/ci/production-verify
@@ -25,7 +25,7 @@ check_header() {
if ! diff -ur /tmp/http-headers-processed "$success_header_file"; then
set +x
echo
- echo "FAILURE: The HTTP Headers returned from loading the homepage on the server do not match the contents of tools/ci/success-http-headers.template.txt. Typically, this means that the server threw a 500 when trying to load the homepage."
+ echo "FAILURE: The HTTP headers returned from loading the homepage on the server do not match the contents of tools/ci/success-http-headers.template.txt. Typically, this means that the server threw a 500 when trying to load the homepage."
echo "Displaying the contents of the server's error log:"
echo
cat /var/log/zulip/errors.log
diff --git a/tools/documentation_crawler/documentation_crawler/settings.py b/tools/documentation_crawler/documentation_crawler/settings.py
index 3634240cd2d..c3bdcea78f9 100644
--- a/tools/documentation_crawler/documentation_crawler/settings.py
+++ b/tools/documentation_crawler/documentation_crawler/settings.py
@@ -40,7 +40,7 @@ ROBOTSTXT_OBEY = False
# Disable cookies (enabled by default)
# COOKIES_ENABLED = False
-# Disable Telnet Console (enabled by default)
+# Disable telnet console (enabled by default)
# TELNETCONSOLE_ENABLED = False
# Override the default request headers:
diff --git a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py b/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
index 4d07c40f0c7..73afc298974 100644
--- a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
+++ b/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
@@ -13,10 +13,10 @@ from scrapy.utils.url import url_has_any_extension
from twisted.python.failure import Failure
EXCLUDED_DOMAINS = [
- # Returns 429 Rate-Limited Errors
+ # Returns 429 rate-limiting errors
"github.com",
"gist.github.com",
- # Returns 503 Errors
+ # Returns 503 errors
"www.amazon.com",
"gitlab.com",
]
diff --git a/tools/droplets/create.py b/tools/droplets/create.py
index ea52c33d4f5..93ad095ccc0 100644
--- a/tools/droplets/create.py
+++ b/tools/droplets/create.py
@@ -247,7 +247,7 @@ Your remote Zulip dev server has been created!
print(
"See [Developing remotely](https://zulip.readthedocs.io/en/latest/development/remote.html) "
"for tips on using the remote dev instance and "
- "[Git & GitHub Guide](https://zulip.readthedocs.io/en/latest/git/index.html) "
+ "[Git & GitHub guide](https://zulip.readthedocs.io/en/latest/git/index.html) "
"to learn how to use Git with Zulip.\n"
)
print(
diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py
index c5a04e607c4..be4d7559218 100644
--- a/tools/lib/capitalization.py
+++ b/tools/lib/capitalization.py
@@ -29,7 +29,6 @@ IGNORED_PHRASES = [
r"ID",
r"IDs",
r"IP",
- r"JIRA",
r"JSON",
r"Kerberos",
r"LDAP",
diff --git a/tools/lib/pretty_print.py b/tools/lib/pretty_print.py
index 0bc46aeeb31..d1495acf816 100644
--- a/tools/lib/pretty_print.py
+++ b/tools/lib/pretty_print.py
@@ -234,7 +234,7 @@ def validate_indent_html(fn: str, fix: bool) -> int:
# Since we successfully fixed the issues, we exit with status 0
return 0
print(
- "Invalid Indentation detected in file: "
+ "Invalid indentation detected in file: "
f"{fn}\nDiff for the file against expected indented file:",
flush=True,
)
diff --git a/tools/lib/template_parser.py b/tools/lib/template_parser.py
index 31b81e5eaaa..cf558d7f9df 100644
--- a/tools/lib/template_parser.py
+++ b/tools/lib/template_parser.py
@@ -164,7 +164,7 @@ def tokenize(text: str) -> List[Token]:
continue
except TokenizationException as e:
raise FormattedException(
- f'''{e.message} at Line {state.line} Col {state.col}:"{e.line_content}"''',
+ f'''{e.message} at line {state.line} col {state.col}:"{e.line_content}"''',
)
line_span = len(s.split("\n"))
@@ -401,9 +401,9 @@ def get_html_tag(text: str, i: int) -> str:
end += 1
if quote_count % 2 != 0:
if unclosed_end:
- raise TokenizationException("Unbalanced Quotes", text[i:unclosed_end])
+ raise TokenizationException("Unbalanced quotes", text[i:unclosed_end])
else:
- raise TokenizationException("Unbalanced Quotes", text[i : end + 1])
+ raise TokenizationException("Unbalanced quotes", text[i : end + 1])
if end == len(text) or text[end] != ">":
raise TokenizationException('Tag missing ">"', text[i : end + 1])
s = text[i : end + 1]
diff --git a/tools/lint b/tools/lint
index f9353cd1d2b..b38b58319a5 100755
--- a/tools/lint
+++ b/tools/lint
@@ -180,7 +180,7 @@ def run() -> None:
[*semgrep_command, "--lang=python"],
["py"],
fix_arg="--autofix",
- description="Syntactic Grep (semgrep) Code Search Tool (config: ./tools/semgrep.yml)",
+ description="Syntactic grep (semgrep) code search tool (config: ./tools/semgrep.yml)",
)
linter_config.external_linter(
diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py
index 33ed1aa4777..db7642304c4 100644
--- a/tools/linter_lib/custom_check.py
+++ b/tools/linter_lib/custom_check.py
@@ -533,7 +533,7 @@ html_rules: List["Rule"] = [
*prose_style_rules,
{
"pattern": "subject|SUBJECT",
- "exclude": {"templates/zerver/email.html"},
+ "exclude": {"templates/zerver/email.html", "zerver/tests/fixtures/email"},
"exclude_pattern": "email subject",
"description": "avoid subject in templates",
"good_lines": ["topic_name"],
diff --git a/tools/setup/postgresql-init-dev-db b/tools/setup/postgresql-init-dev-db
index b1410cf8549..be51651f54f 100755
--- a/tools/setup/postgresql-init-dev-db
+++ b/tools/setup/postgresql-init-dev-db
@@ -19,7 +19,7 @@ elif [[ "$MODE" == "test" ]]; then
DBNAME=zulip_test
STATUS_FILE_NAME=migration_status_test
else
- echo "Usage Instructions"
+ echo "Usage instructions"
echo "Run with either no arguments (sets up devel db for local deploy--zulip with user zulip)"
echo "or specify 'test'"
exit 1
@@ -52,7 +52,7 @@ DBNAME_BASE=${DBNAME}_base
if ! pg_isready -U "$POSTGRES_USER" -q; then
set +x
echo
- echo 'ERROR: PostgreSQL Server is not running! Ensure the service is enabled.'
+ echo 'ERROR: PostgreSQL server is not running! Ensure the service is enabled.'
# shellcheck disable=SC2016
echo 'ERROR: Try `sudo service postgresql start`?'
echo "ERROR: You can easily test if you fixed it using: pg_isready -U \$POSTGRES_USER"
diff --git a/tools/test-queue-worker-reload b/tools/test-queue-worker-reload
index 3074e4261d7..5d58a8fb89c 100755
--- a/tools/test-queue-worker-reload
+++ b/tools/test-queue-worker-reload
@@ -56,7 +56,7 @@ def check_worker_launch(run_dev: "subprocess.Popen[str]") -> bool:
if __name__ == "__main__":
- print("\nStarting Development Server")
+ print("\nStarting development server")
args = [f"{TOOLS_DIR}/run-dev.py"]
run_dev = subprocess.Popen(
args,
diff --git a/tools/tests/test_template_data/test_template1.html b/tools/tests/test_template_data/test_template1.html
index f59d9cd34a8..ccfce5fe2d4 100644
--- a/tools/tests/test_template_data/test_template1.html
+++ b/tools/tests/test_template_data/test_template1.html
@@ -9,7 +9,7 @@
<body>
<div id="intro">
<p id="intro">
- <span id="hello_{{ message }}">Hello World!!</span>
+ <span id="hello_{{ message }}">Hello world!!</span>
This is a test file for checking correct working of duplicate id detection module.
</p>
</div>
diff --git a/tools/tests/test_template_data/test_template2.html b/tools/tests/test_template_data/test_template2.html
index d47719477e7..ddef1bf4f82 100644
--- a/tools/tests/test_template_data/test_template2.html
+++ b/tools/tests/test_template_data/test_template2.html
@@ -9,7 +9,7 @@
<body>
<div id="below_navbar">
<p id="intro">
- <span id="hello_{{ message }}">Hello World!!</span>
+ <span id="hello_{{ message }}">Hello world!!</span>
This is a test file for checking correct working of duplicate id detection module.
</p>
</div>
diff --git a/tools/tests/test_template_parser.py b/tools/tests/test_template_parser.py
index 6860d04e1f5..09acbd68f39 100644
--- a/tools/tests/test_template_parser.py
+++ b/tools/tests/test_template_parser.py
@@ -106,7 +106,7 @@ class ParserTest(unittest.TestCase):
{{# foo
"""
self._assert_validate_error(
- '''Tag missing "}}" at Line 2 Col 13:"{{# foo
+ '''Tag missing "}}" at line 2 col 13:"{{# foo
"''',
text=my_html,
)
@@ -115,14 +115,14 @@ class ParserTest(unittest.TestCase):
my_html = """
{{# foo }
"""
- self._assert_validate_error('Tag missing "}}" at Line 2 Col 13:"{{# foo }\n"', text=my_html)
+ self._assert_validate_error('Tag missing "}}" at line 2 col 13:"{{# foo }\n"', text=my_html)
def test_validate_incomplete_django_tag_1(self) -> None:
my_html = """
{% foo
"""
self._assert_validate_error(
- '''Tag missing "%}" at Line 2 Col 13:"{% foo
+ '''Tag missing "%}" at line 2 col 13:"{% foo
"''',
text=my_html,
)
@@ -131,14 +131,14 @@ class ParserTest(unittest.TestCase):
my_html = """
{% foo %
"""
- self._assert_validate_error('Tag missing "%}" at Line 2 Col 13:"{% foo %\n"', text=my_html)
+ self._assert_validate_error('Tag missing "%}" at line 2 col 13:"{% foo %\n"', text=my_html)
def test_validate_incomplete_html_tag_1(self) -> None:
my_html = """
<b
"""
self._assert_validate_error(
- '''Tag missing ">" at Line 2 Col 13:"<b
+ '''Tag missing ">" at line 2 col 13:"<b
"''',
text=my_html,
)
@@ -151,12 +151,12 @@ class ParserTest(unittest.TestCase):
<a href=""
"""
self._assert_validate_error(
- '''Tag missing ">" at Line 2 Col 13:"<a href=""
+ '''Tag missing ">" at line 2 col 13:"<a href=""
"''',
text=my_html1,
)
self._assert_validate_error(
- '''Unbalanced Quotes at Line 2 Col 13:"<a href="
+ '''Unbalanced quotes at line 2 col 13:"<a href="
"''',
text=my_html,
)
diff --git a/zerver/data_import/gitter.py b/zerver/data_import/gitter.py
index abefdd68dce..faae72c2a0d 100644
--- a/zerver/data_import/gitter.py
+++ b/zerver/data_import/gitter.py
@@ -257,7 +257,7 @@ def convert_gitter_workspace_messages(
message_json["zerver_message"] = zerver_message
message_json["zerver_usermessage"] = zerver_usermessage
message_filename = os.path.join(output_dir, f"messages-{dump_file_id:06}.json")
- logging.info("Writing Messages to %s\n", message_filename)
+ logging.info("Writing messages to %s\n", message_filename)
write_data_to_file(os.path.join(message_filename), message_json)
low_index = upper_index
diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py
index 486c7055030..293a2f8bfcc 100755
--- a/zerver/data_import/slack.py
+++ b/zerver/data_import/slack.py
@@ -738,7 +738,7 @@ def convert_slack_workspace_messages(
message_json = dict(zerver_message=zerver_message, zerver_usermessage=zerver_usermessage)
message_file = f"/messages-{dump_file_id:06}.json"
- logging.info("Writing Messages to %s\n", output_dir + message_file)
+ logging.info("Writing messages to %s\n", output_dir + message_file)
create_converted_data_files(message_json, output_dir, message_file)
total_reactions += reactions
diff --git a/zerver/data_import/slack_message_conversion.py b/zerver/data_import/slack_message_conversion.py
index 9259d45b8dc..1a7e4d2579a 100644
--- a/zerver/data_import/slack_message_conversion.py
+++ b/zerver/data_import/slack_message_conversion.py
@@ -27,8 +27,8 @@ SLACK_MAILTO_REGEX = r"""
SLACK_USERMENTION_REGEX = r"""
(<@) # Start with '<@'
([a-zA-Z0-9]+) # Here we have the Slack id
- (\|)? # We not always have a Vertical line in mention
- ([a-zA-Z0-9]+)? # If Vertical line is present, this is short name
+ (\|)? # We not always have a vertical line in mention
+ ([a-zA-Z0-9]+)? # If vertical line is present, this is short name
(>) # ends with '>'
"""
# Slack doesn't have mid-word message-formatting like Zulip.
diff --git a/zerver/decorator.py b/zerver/decorator.py
index 71be9357adc..e73f4c6eb40 100644
--- a/zerver/decorator.py
+++ b/zerver/decorator.py
@@ -784,8 +784,8 @@ def client_is_exempt_from_rate_limiting(request: HttpRequest) -> bool:
def internal_notify_view(is_tornado_view: bool) -> Callable[[ViewFuncT], ViewFuncT]:
- # The typing here could be improved by using the Extended Callable types:
- # https://mypy.readthedocs.io/en/latest/kinds_of_types.html#extended-callable-types
+ # The typing here could be improved by using the extended Callable types:
+ # https://mypy.readthedocs.io/en/stable/additional_features.html#extended-callable-types
"""Used for situations where something running on the Zulip server
needs to make a request to the (other) Django/Tornado processes running on
the server."""
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py
index 72dddab7ba4..0bb0af7d1db 100644
--- a/zerver/lib/actions.py
+++ b/zerver/lib/actions.py
@@ -3059,7 +3059,7 @@ def check_message(
check_private_message_policy(realm, sender, user_profiles)
- # API Super-users who set the `forged` flag are allowed to
+ # API super-users who set the `forged` flag are allowed to
# forge messages sent by any user, so we disable the
# `forwarded_mirror_message` security check in that case.
forwarded_mirror_message = mirror_message and not forged
@@ -3651,7 +3651,7 @@ def bulk_add_subs_to_db_with_logging(
sub_ids = [info.sub.id for info in subs_to_activate]
Subscription.objects.filter(id__in=sub_ids).update(active=True)
- # Log Subscription Activities in RealmAuditLog
+ # Log subscription activities in RealmAuditLog
event_time = timezone_now()
event_last_message_id = get_last_message_id()
@@ -3888,7 +3888,7 @@ def bulk_remove_subscriptions(
).update(active=False)
occupied_streams_after = list(get_occupied_streams(our_realm))
- # Log Subscription Activities in RealmAuditLog
+ # Log subscription activities in RealmAuditLog
event_time = timezone_now()
event_last_message_id = get_last_message_id()
all_subscription_logs = [
diff --git a/zerver/lib/cache.py b/zerver/lib/cache.py
index 5f3a8d40117..d7cd8781efb 100644
--- a/zerver/lib/cache.py
+++ b/zerver/lib/cache.py
@@ -375,7 +375,7 @@ CacheItemT = TypeVar("CacheItemT")
# serializable objects, will be the object; if encoded, bytes.
CompressedItemT = TypeVar("CompressedItemT")
-# Required Arguments are as follows:
+# Required arguments are as follows:
# * object_ids: The list of object ids to look up
# * cache_key_function: object_id => cache key
# * query_function: [object_ids] => [objects from database]
diff --git a/zerver/lib/export.py b/zerver/lib/export.py
index cecb698d51e..f9be12ec653 100644
--- a/zerver/lib/export.py
+++ b/zerver/lib/export.py
@@ -1184,7 +1184,7 @@ def write_message_partial_for_query(
# Figure out the name of our shard file.
message_filename = os.path.join(output_dir, f"messages-{dump_file_id:06}.json")
message_filename += ".partial"
- logging.info("Fetched Messages for %s", message_filename)
+ logging.info("Fetched messages for %s", message_filename)
# Clean up our messages.
table_data: TableData = {}
@@ -1538,7 +1538,7 @@ def export_emoji_from_local(realm: Realm, local_dir: Path, output_dir: Path) ->
os.makedirs(os.path.dirname(output_path), exist_ok=True)
shutil.copy2(local_path, output_path)
- # Realm Emoji author is optional.
+ # Realm emoji author is optional.
author = realm_emoji.author
author_id = None
if author:
@@ -1830,7 +1830,7 @@ def export_messages_single_user(
message_chunk.append(item)
message_filename = os.path.join(output_dir, f"messages-{dump_file_id:06}.json")
- logging.info("Fetched Messages for %s", message_filename)
+ logging.info("Fetched messages for %s", message_filename)
output = {"zerver_message": message_chunk}
floatify_datetime_fields(output, "zerver_message")
diff --git a/zerver/lib/external_accounts.py b/zerver/lib/external_accounts.py
index b6bba2f40b0..4945019c1e0 100644
--- a/zerver/lib/external_accounts.py
+++ b/zerver/lib/external_accounts.py
@@ -1,5 +1,5 @@
"""
- This module stores data for "External Account" custom profile field.
+ This module stores data for "external account" custom profile field.
"""
from django.core.exceptions import ValidationError
from django.utils.translation import gettext as _
diff --git a/zerver/lib/import_realm.py b/zerver/lib/import_realm.py
index d9df6f6e0e7..470d8b3f35c 100644
--- a/zerver/lib/import_realm.py
+++ b/zerver/lib/import_realm.py
@@ -864,7 +864,7 @@ def import_uploads(
#
# Because the Python object => JSON conversion process is not fully
# faithful, we have to use a set of fixers (e.g. on DateTime objects
-# and Foreign Keys) to do the import correctly.
+# and foreign keys) to do the import correctly.
def do_import_realm(import_dir: Path, subdomain: str, processes: int = 1) -> Realm:
logging.info("Importing realm dump %s", import_dir)
if not os.path.exists(import_dir):
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py
index 389d2aead85..8b0355f7175 100644
--- a/zerver/lib/integrations.py
+++ b/zerver/lib/integrations.py
@@ -404,9 +404,9 @@ WEBHOOK_INTEGRATIONS: List[WebhookIntegration] = [
),
WebhookIntegration("insping", ["monitoring"], display_name="Insping"),
WebhookIntegration("intercom", ["customer-support"], display_name="Intercom"),
- WebhookIntegration("jira", ["project-management"], display_name="JIRA"),
+ WebhookIntegration("jira", ["project-management"], display_name="Jira"),
WebhookIntegration("jotform", ["misc"], display_name="Jotform"),
- WebhookIntegration("json", ["misc"], display_name="JSON Formatter"),
+ WebhookIntegration("json", ["misc"], display_name="JSON formatter"),
WebhookIntegration("librato", ["monitoring"]),
WebhookIntegration("mention", ["marketing"], display_name="Mention"),
WebhookIntegration("netlify", ["continuous-integration", "deployment"], display_name="Netlify"),
@@ -532,7 +532,7 @@ INTEGRATIONS: Dict[str, Integration] = {
["project-management"],
logo="images/integrations/logos/jira.svg",
secondary_line_text="(locally installed)",
- display_name="JIRA",
+ display_name="Jira",
doc="zerver/integrations/jira-plugin.md",
stream_name="jira",
legacy=True,
@@ -801,7 +801,7 @@ DOC_SCREENSHOT_CONFIG: Dict[str, List[BaseScreenshotConfig]] = {
extra_params={
"ticket_title": "Test ticket",
"ticket_id": "4",
- "message": "Test Message",
+ "message": "Test message",
},
)
],
diff --git a/zerver/lib/send_email.py b/zerver/lib/send_email.py
index f794a19bcac..a5de64c66cb 100644
--- a/zerver/lib/send_email.py
+++ b/zerver/lib/send_email.py
@@ -447,7 +447,7 @@ def send_custom_email(users: List[UserProfile], options: Dict[str, Any]) -> None
Can be used directly with from a management shell with
send_custom_email(user_profile_list, dict(
markdown_template_path="/path/to/markdown/file.md",
- subject="Email Subject",
+ subject="Email subject",
from_name="Sender Name")
)
"""
diff --git a/zerver/lib/soft_deactivation.py b/zerver/lib/soft_deactivation.py
index 4e42b16fce0..616a5d70c39 100644
--- a/zerver/lib/soft_deactivation.py
+++ b/zerver/lib/soft_deactivation.py
@@ -147,7 +147,7 @@ def add_missing_messages(user_profile: UserProfile) -> None:
).values("recipient_id", "recipient__type_id")
)
- # For Stream messages we need to check messages against data from
+ # For stream messages we need to check messages against data from
# RealmAuditLog for visibility to user. So we fetch the subscription logs.
stream_ids = [sub["recipient__type_id"] for sub in all_stream_subs]
events = [
@@ -305,7 +305,7 @@ def reactivate_user_if_soft_deactivated(user_profile: UserProfile) -> Union[User
event_type=RealmAuditLog.USER_SOFT_ACTIVATED,
event_time=timezone_now(),
)
- logger.info("Soft Reactivated user %s", user_profile.id)
+ logger.info("Soft reactivated user %s", user_profile.id)
return user_profile
return None
diff --git a/zerver/lib/webhooks/common.py b/zerver/lib/webhooks/common.py
index 96570a80c63..b2535c204e4 100644
--- a/zerver/lib/webhooks/common.py
+++ b/zerver/lib/webhooks/common.py
@@ -84,7 +84,7 @@ def check_send_webhook_message(
assert user_profile.bot_owner is not None
check_send_private_message(user_profile, request.client, user_profile.bot_owner, body)
else:
- # Some third-party websites (such as Atlassian's JIRA), tend to
+ # Some third-party websites (such as Atlassian's Jira), tend to
# double escape their URLs in a manner that escaped space characters
# (%20) are never properly decoded. We work around that by making sure
# that the URL parameters are decoded on our end.
diff --git a/zerver/lib/webhooks/git.py b/zerver/lib/webhooks/git.py
index 452c01a0657..feb1f01cbb2 100644
--- a/zerver/lib/webhooks/git.py
+++ b/zerver/lib/webhooks/git.py
@@ -240,7 +240,7 @@ def get_issue_event_message(
message=message,
assignee=assignee,
assignees=assignees,
- type="Issue",
+ type="issue",
title=title,
)
diff --git a/zerver/management/commands/soft_deactivate_users.py b/zerver/management/commands/soft_deactivate_users.py
index d130a0a2865..d4e1d6f6484 100644
--- a/zerver/management/commands/soft_deactivate_users.py
+++ b/zerver/management/commands/soft_deactivate_users.py
@@ -76,7 +76,7 @@ class Command(ZulipBaseCommand):
users_to_activate = get_users_from_emails(user_emails, filter_kwargs)
users_activated = do_soft_activate_users(users_to_activate)
- logger.info("Soft Reactivated %d user(s)", len(users_activated))
+ logger.info("Soft reactivated %d user(s)", len(users_activated))
elif deactivate:
if user_emails:
diff --git a/zerver/middleware.py b/zerver/middleware.py
index 06bfd99893e..7d3b19d8b10 100644
--- a/zerver/middleware.py
+++ b/zerver/middleware.py
@@ -475,7 +475,7 @@ class CsrfFailureError(JsonableError):
@staticmethod
def msg_format() -> str:
- return _("CSRF Error: {reason}")
+ return _("CSRF error: {reason}")
def csrf_failure(request: HttpRequest, reason: str = "") -> HttpResponse:
diff --git a/zerver/models.py b/zerver/models.py
index e66fa1b13e5..f2c5659e7d8 100644
--- a/zerver/models.py
+++ b/zerver/models.py
@@ -1692,7 +1692,7 @@ class PreregistrationUser(models.Model):
email: str = models.EmailField()
# If the pre-registration process provides a suggested full name for this user,
- # store it here to use it to prepopulate the Full Name field in the registration form:
+ # store it here to use it to prepopulate the full name field in the registration form:
full_name: Optional[str] = models.CharField(max_length=UserProfile.MAX_NAME_LENGTH, null=True)
full_name_validated: bool = models.BooleanField(default=False)
referred_by: Optional[UserProfile] = models.ForeignKey(
@@ -3502,7 +3502,7 @@ class CustomProfileField(models.Model):
}
FIELD_TYPE_DATA: List[FieldElement] = [
- # Type, Display Name, Validator, Converter, Keyword
+ # Type, display name, validator, converter, keyword
(SHORT_TEXT, gettext_lazy("Short text"), check_short_string, str, "SHORT_TEXT"),
(LONG_TEXT, gettext_lazy("Long text"), check_long_string, str, "LONG_TEXT"),
(DATE, gettext_lazy("Date picker"), check_date, str, "DATE"),
diff --git a/zerver/openapi/python_examples.py b/zerver/openapi/python_examples.py
index 9f25fb37ea3..d703070c6f9 100644
--- a/zerver/openapi/python_examples.py
+++ b/zerver/openapi/python_examples.py
@@ -350,7 +350,7 @@ def reorder_realm_profile_fields(client: Client) -> None:
def create_realm_profile_field(client: Client) -> None:
# {code_example|start}
# Create a custom profile field in the user's organization.
- request = {"name": "Phone", "hint": "Contact No.", "field_type": 1}
+ request = {"name": "Phone", "hint": "Contact no.", "field_type": 1}
result = client.call_endpoint(url="/realm/profile_fields", method="POST", request=request)
# {code_example|end}
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 80774792a8d..00ee91c9c10 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -5489,7 +5489,7 @@ paths:
- $ref: "#/components/schemas/JsonSuccess"
- example: {"msg": "", "result": "success"}
"400":
- description: Bad Request.
+ description: Bad request.
content:
application/json:
schema:
@@ -6824,7 +6824,7 @@ paths:
- $ref: "#/components/schemas/JsonSuccess"
- example: {"msg": "", "result": "success"}
"400":
- description: Bad Request
+ description: Bad request
content:
application/json:
schema:
diff --git a/zerver/tests/fixtures/docs_url_preview_data.json b/zerver/tests/fixtures/docs_url_preview_data.json
index d7b99774ed3..4c4ae68b668 100644
--- a/zerver/tests/fixtures/docs_url_preview_data.json
+++ b/zerver/tests/fixtures/docs_url_preview_data.json
@@ -21,6 +21,6 @@
},
"https://zulip.readthedocs.io/en/latest/translating/translating.html": {
"description": "To make Zulip even better for users around the world, the Zulip UI is\nbeing translated into a number of major languages, including Spanish,\nGerman, Hindi, French, Chinese, Russian, and Japanese, with varying levels of\nprogress. If you speak a language other than English, your help with\ntranslating Zulip would be greatly appreciated!",
- "title": "Translation Guidelines — Zulip 1.7.1+git documentation"
+ "title": "Translation guidelines — Zulip 1.7.1+git documentation"
}
}
diff --git a/zerver/tests/fixtures/email/custom_emails/email_base_headers_test.source.html b/zerver/tests/fixtures/email/custom_emails/email_base_headers_test.source.html
index 82f3569ca34..16eda655121 100644
--- a/zerver/tests/fixtures/email/custom_emails/email_base_headers_test.source.html
+++ b/zerver/tests/fixtures/email/custom_emails/email_base_headers_test.source.html
@@ -1,4 +1,4 @@
From: TestFrom
-Subject: Test Subject
+Subject: Test subject
Test body
diff --git a/zerver/tests/fixtures/email/simple.txt b/zerver/tests/fixtures/email/simple.txt
index b58adb7b81b..754fb91daa3 100644
--- a/zerver/tests/fixtures/email/simple.txt
+++ b/zerver/tests/fixtures/email/simple.txt
@@ -1,6 +1,6 @@
To: {stream_to_address}
From: {sender}
-Subject: Testing Email Mirror
+Subject: Testing email mirror
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
diff --git a/zerver/tests/fixtures/markdown_test_cases.json b/zerver/tests/fixtures/markdown_test_cases.json
index 881431f0b2d..7e1d67e894a 100644
--- a/zerver/tests/fixtures/markdown_test_cases.json
+++ b/zerver/tests/fixtures/markdown_test_cases.json
@@ -112,8 +112,8 @@
},
{
"name": "multiple_blockquote",
- "input": "> Hello World!\n\n> Hello Universe!",
- "expected_output": "<blockquote>\n<p>Hello World!</p>\n</blockquote>\n<blockquote>\n<p>Hello Universe!</p>\n</blockquote>"
+ "input": "> Hello world!\n\n> Hello universe!",
+ "expected_output": "<blockquote>\n<p>Hello world!</p>\n</blockquote>\n<blockquote>\n<p>Hello universe!</p>\n</blockquote>"
},
{
"name": "multiple_blockquote",
@@ -165,28 +165,28 @@
},
{
"name": "hashheading_enabled",
- "input": "# Hello World",
- "expected_output": "<h1>Hello World</h1>"
+ "input": "# Hello world",
+ "expected_output": "<h1>Hello world</h1>"
},
{
"name": "hashheading_needs_spaces",
- "input": "#Hello World",
- "expected_output": "<p>#Hello World</p>"
+ "input": "#Hello world",
+ "expected_output": "<p>#Hello world</p>"
},
{
"name": "hashheading_multiple_spaces",
- "input": "# Hello World",
- "expected_output": "<h1>Hello World</h1>"
+ "input": "# Hello world",
+ "expected_output": "<h1>Hello world</h1>"
},
{
"name": "hashheading_6_levels",
- "input": "###### Hello World",
- "expected_output": "<h6>Hello World</h6>"
+ "input": "###### Hello world",
+ "expected_output": "<h6>Hello world</h6>"
},
{
"name": "hashheading_7_levels",
- "input": "####### Hello World",
- "expected_output": "<p>####### Hello World</p>"
+ "input": "####### Hello world",
+ "expected_output": "<p>####### Hello world</p>"
},
{
"name": "reference_links_disabled",
@@ -255,9 +255,9 @@
},
{
"name": "ulist_hanging_multi",
- "input": "Plain list\n* Alpha\n* Beta\n\nAnd Again:\n* A\n* B\n* C\n\nOnce more for feeling:\n* Q\n* E\n* D",
- "expected_output": "<p>Plain list</p>\n<ul>\n<li>Alpha</li>\n<li>Beta</li>\n</ul>\n<p>And Again:</p>\n<ul>\n<li>A</li>\n<li>B</li>\n<li>C</li>\n</ul>\n<p>Once more for feeling:</p>\n<ul>\n<li>Q</li>\n<li>E</li>\n<li>D</li>\n</ul>",
- "text_content": "Plain list\n\nAlpha\nBeta\n\nAnd Again:\n\nA\nB\nC\n\nOnce more for feeling:\n\nQ\nE\nD\n"
+ "input": "Plain list\n* Alpha\n* Beta\n\nAnd again:\n* A\n* B\n* C\n\nOnce more for feeling:\n* Q\n* E\n* D",
+ "expected_output": "<p>Plain list</p>\n<ul>\n<li>Alpha</li>\n<li>Beta</li>\n</ul>\n<p>And again:</p>\n<ul>\n<li>A</li>\n<li>B</li>\n<li>C</li>\n</ul>\n<p>Once more for feeling:</p>\n<ul>\n<li>Q</li>\n<li>E</li>\n<li>D</li>\n</ul>",
+ "text_content": "Plain list\n\nAlpha\nBeta\n\nAnd again:\n\nA\nB\nC\n\nOnce more for feeling:\n\nQ\nE\nD\n"
},
{
"name": "ulist_hanging_quoted",
@@ -338,8 +338,8 @@
},
{
"name": "emphasis_with_html",
- "input": "*<h1>Hello World</h1>*",
- "expected_output": "<p><em>&lt;h1&gt;Hello World&lt;/h1&gt;</em></p>"
+ "input": "*<h1>Hello world</h1>*",
+ "expected_output": "<p><em>&lt;h1&gt;Hello world&lt;/h1&gt;</em></p>"
},
{
"name": "underscore_strong_disabled",
@@ -366,8 +366,8 @@
},
{
"name": "strong_with_html",
- "input": "**<h1>Hello World</h1>**",
- "expected_output": "<p><strong>&lt;h1&gt;Hello World&lt;/h1&gt;</strong></p>"
+ "input": "**<h1>Hello world</h1>**",
+ "expected_output": "<p><strong>&lt;h1&gt;Hello world&lt;/h1&gt;</strong></p>"
},
{
"name": "numbered_list",
@@ -492,9 +492,9 @@
},
{
"name": "tables",
- "input": "This is a table:\n\nFirst Header | Second Header\n------------- | -------------\nContent Cell | Content Cell\nContent Cell | Content Cell\n",
- "expected_output": "<p>This is a table:</p>\n<table>\n<thead>\n<tr>\n<th>First Header</th>\n<th>Second Header</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Content Cell</td>\n<td>Content Cell</td>\n</tr>\n<tr>\n<td>Content Cell</td>\n<td>Content Cell</td>\n</tr>\n</tbody>\n</table>",
- "text_content": "This is a table:\n\n\n\nFirst Header\nSecond Header\n\n\n\n\nContent Cell\nContent Cell\n\n\nContent Cell\nContent Cell\n\n\n"
+ "input": "This is a table:\n\nFirst header | Second header\n------------- | -------------\nContent cell | Content cell\nContent cell | Content cell\n",
+ "expected_output": "<p>This is a table:</p>\n<table>\n<thead>\n<tr>\n<th>First header</th>\n<th>Second header</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Content cell</td>\n<td>Content cell</td>\n</tr>\n<tr>\n<td>Content cell</td>\n<td>Content cell</td>\n</tr>\n</tbody>\n</table>",
+ "text_content": "This is a table:\n\n\n\nFirst header\nSecond header\n\n\n\n\nContent cell\nContent cell\n\n\nContent cell\nContent cell\n\n\n"
},
{
"name": "multiline_strong",
diff --git a/zerver/tests/test_archive.py b/zerver/tests/test_archive.py
index c4cba3c8b6e..3f6393ac33d 100644
--- a/zerver/tests/test_archive.py
+++ b/zerver/tests/test_archive.py
@@ -18,14 +18,14 @@ class GlobalPublicStreamTest(ZulipTestCase):
self.assert_in_success_response(["This stream does not exist."], result)
def test_non_web_public_stream(self) -> None:
- test_stream = self.make_stream("Test Public Archives")
+ test_stream = self.make_stream("Test public archives")
result = self.client_get(
"/archive/streams/" + str(test_stream.id) + "/topics/notpublicglobalstream",
)
self.assert_in_success_response(["This stream does not exist."], result)
def test_non_existant_topic(self) -> None:
- test_stream = self.make_stream("Test Public Archives")
+ test_stream = self.make_stream("Test public archives")
do_change_stream_web_public(test_stream, True)
result = self.client_get(
"/archive/streams/" + str(test_stream.id) + "/topics/nonexistenttopic",
@@ -33,13 +33,13 @@ class GlobalPublicStreamTest(ZulipTestCase):
self.assert_in_success_response(["This topic does not exist."], result)
def test_web_public_stream_topic(self) -> None:
- test_stream = self.make_stream("Test Public Archives")
+ test_stream = self.make_stream("Test public archives")
do_change_stream_web_public(test_stream, True)
def send_msg_and_get_result(msg: str) -> HttpResponse:
self.send_stream_message(
self.example_user("iago"),
- "Test Public Archives",
+ "Test public archives",
msg,
"TopicGlobal",
)
@@ -47,8 +47,8 @@ class GlobalPublicStreamTest(ZulipTestCase):
"/archive/streams/" + str(test_stream.id) + "/topics/TopicGlobal",
)
- result = send_msg_and_get_result("Test Message 1")
- self.assert_in_success_response(["Test Message 1"], result)
+ result = send_msg_and_get_result("Test message 1")
+ self.assert_in_success_response(["Test message 1"], result)
result = send_msg_and_get_result("/me goes testing.")
self.assert_in_success_response(["goes testing."], result)
@@ -66,7 +66,7 @@ class GlobalPublicStreamTest(ZulipTestCase):
self.assert_length(info.never_subscribed, 0)
# Now add a second public stream
- test_stream = self.make_stream("Test Public Archives")
+ test_stream = self.make_stream("Test public archives")
do_change_stream_web_public(test_stream, True)
public_streams = get_web_public_streams(realm)
self.assert_length(public_streams, 2)
@@ -93,12 +93,12 @@ class WebPublicTopicHistoryTest(ZulipTestCase):
self.assertEqual(history, [])
def test_non_web_public_stream(self) -> None:
- test_stream = self.make_stream("Test Public Archives")
+ test_stream = self.make_stream("Test public archives")
self.send_stream_message(
self.example_user("iago"),
- "Test Public Archives",
- "Test Message",
+ "Test public archives",
+ "Test message",
"TopicGlobal",
)
@@ -110,37 +110,37 @@ class WebPublicTopicHistoryTest(ZulipTestCase):
self.assertEqual(history, [])
def test_web_public_stream(self) -> None:
- test_stream = self.make_stream("Test Public Archives")
+ test_stream = self.make_stream("Test public archives")
do_change_stream_web_public(test_stream, True)
self.send_stream_message(
self.example_user("iago"),
- "Test Public Archives",
- "Test Message 3",
+ "Test public archives",
+ "Test message 3",
topic_name="first_topic",
)
self.send_stream_message(
self.example_user("iago"),
- "Test Public Archives",
- "Test Message",
+ "Test public archives",
+ "Test message",
topic_name="TopicGlobal",
)
self.send_stream_message(
self.example_user("iago"),
- "Test Public Archives",
- "Test Message 2",
+ "Test public archives",
+ "Test message 2",
topic_name="topicglobal",
)
self.send_stream_message(
self.example_user("iago"),
- "Test Public Archives",
- "Test Message 3",
+ "Test public archives",
+ "Test message 3",
topic_name="second_topic",
)
self.send_stream_message(
self.example_user("iago"),
- "Test Public Archives",
- "Test Message 4",
+ "Test public archives",
+ "Test message 4",
topic_name="TopicGlobal",
)
diff --git a/zerver/tests/test_audit_log.py b/zerver/tests/test_audit_log.py
index a32c31166ee..84b99b6de0c 100644
--- a/zerver/tests/test_audit_log.py
+++ b/zerver/tests/test_audit_log.py
@@ -328,7 +328,7 @@ class TestRealmAuditLog(ZulipTestCase):
realm,
"test",
invite_only=False,
- stream_description="Test Description",
+ stream_description="Test description",
acting_user=user,
)[0]
self.assertEqual(
diff --git a/zerver/tests/test_bots.py b/zerver/tests/test_bots.py
index f74e1c3aa44..e65dd9d1a27 100644
--- a/zerver/tests/test_bots.py
+++ b/zerver/tests/test_bots.py
@@ -47,7 +47,7 @@ stripe_sample_config_options = [
"stripe",
["financial"],
display_name="Stripe",
- config_options=[("Stripe API Key", "stripe_api_key", _check_string)],
+ config_options=[("Stripe API key", "stripe_api_key", _check_string)],
),
]
diff --git a/zerver/tests/test_custom_profile_data.py b/zerver/tests/test_custom_profile_data.py
index d3ace5bb427..657a14f3d7e 100644
--- a/zerver/tests/test_custom_profile_data.py
+++ b/zerver/tests/test_custom_profile_data.py
@@ -415,7 +415,7 @@ class UpdateCustomProfileFieldTest(CustomProfileFieldTestCase):
realm = get_realm("zulip")
result = self.client_patch(
"/json/realm/profile_fields/100",
- info={"name": "Phone Number", "field_type": CustomProfileField.SHORT_TEXT},
+ info={"name": "Phone number", "field_type": CustomProfileField.SHORT_TEXT},
)
self.assert_json_error(result, "Field id 100 not found.")
diff --git a/zerver/tests/test_decorators.py b/zerver/tests/test_decorators.py
index 0f6be0d8c51..d1a494ba950 100644
--- a/zerver/tests/test_decorators.py
+++ b/zerver/tests/test_decorators.py
@@ -930,7 +930,7 @@ class ValidatorTestCase(ZulipTestCase):
x = {
"names": ["alice", "bob"],
"city": "Boston",
- "food": ["Lobster Spaghetti"],
+ "food": ["Lobster spaghetti"],
}
check_dict(keys)("x", x) # since _allow_only_listed_keys is False
@@ -943,7 +943,7 @@ class ValidatorTestCase(ZulipTestCase):
x = {
"names": ["alice", "bob"],
"city": "Boston",
- "food": "Lobster Spaghetti",
+ "food": "Lobster spaghetti",
}
with self.assertRaisesRegex(ValidationError, r'x\["food"\] is not a list'):
check_dict_only(keys, optional_keys)("x", x)
diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py
index fed61ef4976..434b1f31c95 100644
--- a/zerver/tests/test_docs.py
+++ b/zerver/tests/test_docs.py
@@ -179,7 +179,7 @@ class DocPageTest(ZulipTestCase):
# Features
url = "/features/"
- title = '<meta property="og:title" content="Zulip Features" />'
+ title = '<meta property="og:title" content="Zulip features" />'
description = '<meta property="og:description" content="First class threading'
self._test(url, title, doc_html_str=True)
self._test(url, description, doc_html_str=True)
diff --git a/zerver/tests/test_email_mirror.py b/zerver/tests/test_email_mirror.py
index cbb428eeb40..e1bfaae0cd9 100644
--- a/zerver/tests/test_email_mirror.py
+++ b/zerver/tests/test_email_mirror.py
@@ -240,9 +240,9 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
stream_to_address = encode_email_address(stream)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestStreamEmailMessages Body")
+ incoming_valid_message.set_content("TestStreamEmailMessages body")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -252,7 +252,7 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
# Hamlet is subscribed to this stream so should see the email message from Othello.
message = most_recent_message(user_profile)
- self.assertEqual(message.content, "TestStreamEmailMessages Body")
+ self.assertEqual(message.content, "TestStreamEmailMessages body")
self.assertEqual(get_display_recipient(message.recipient), stream.name)
self.assertEqual(message.topic_name(), incoming_valid_message["Subject"])
@@ -268,9 +268,9 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
stream_to_address = encode_email_address(stream)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestStreamEmailMessages Body")
+ incoming_valid_message.set_content("TestStreamEmailMessages body")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
# Simulate a mailing list
incoming_valid_message["To"] = "[email protected]"
@@ -282,7 +282,7 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
# Hamlet is subscribed to this stream so should see the email message from Othello.
message = most_recent_message(user_profile)
- self.assertEqual(message.content, "TestStreamEmailMessages Body")
+ self.assertEqual(message.content, "TestStreamEmailMessages body")
self.assertEqual(get_display_recipient(message.recipient), stream.name)
self.assertEqual(message.topic_name(), incoming_valid_message["Subject"])
@@ -295,7 +295,7 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
stream_to_address = encode_email_address(stream)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestStreamEmailMessages Body")
+ incoming_valid_message.set_content("TestStreamEmailMessages body")
incoming_valid_message["Subject"] = ""
incoming_valid_message["From"] = self.example_email("hamlet")
@@ -307,7 +307,7 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
# Hamlet is subscribed to this stream so should see the email message from Othello.
message = most_recent_message(user_profile)
- self.assertEqual(message.content, "TestStreamEmailMessages Body")
+ self.assertEqual(message.content, "TestStreamEmailMessages body")
self.assertEqual(get_display_recipient(message.recipient), stream.name)
self.assertEqual(message.topic_name(), "(no topic)")
@@ -321,9 +321,9 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
stream_to_address = encode_email_address(stream)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestStreamEmailMessages Body")
+ incoming_valid_message.set_content("TestStreamEmailMessages body")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -333,7 +333,7 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
# Hamlet is subscribed to this stream so should see the email message from Othello.
message = most_recent_message(user_profile)
- self.assertEqual(message.content, "TestStreamEmailMessages Body")
+ self.assertEqual(message.content, "TestStreamEmailMessages body")
self.assertEqual(get_display_recipient(message.recipient), stream.name)
self.assertEqual(message.topic_name(), incoming_valid_message["Subject"])
@@ -350,9 +350,9 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
]
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestStreamEmailMessages Body")
+ incoming_valid_message.set_content("TestStreamEmailMessages body")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = ", ".join(stream_to_addresses)
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -362,7 +362,7 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
# Hamlet is subscribed to this stream so should see the email message from Othello.
message = most_recent_message(user_profile)
- self.assertEqual(message.content, "TestStreamEmailMessages Body")
+ self.assertEqual(message.content, "TestStreamEmailMessages body")
self.assertEqual(get_display_recipient(message.recipient), stream.name)
self.assertEqual(message.topic_name(), incoming_valid_message["Subject"])
@@ -378,8 +378,8 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
stream_to_address = "@".join(parts)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestStreamEmailMessages Body")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message.set_content("TestStreamEmailMessages body")
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -389,7 +389,7 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
self.assertEqual(
message.content,
- "From: {}\n{}".format(self.example_email("hamlet"), "TestStreamEmailMessages Body"),
+ "From: {}\n{}".format(self.example_email("hamlet"), "TestStreamEmailMessages body"),
)
self.assertEqual(get_display_recipient(message.recipient), stream.name)
self.assertEqual(message.topic_name(), incoming_valid_message["Subject"])
@@ -406,8 +406,8 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
stream_to_address = "@".join(parts)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestStreamEmailMessages Body")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message.set_content("TestStreamEmailMessages body")
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message[
"From"
] = "Test =?utf-8?b?VXNlcsOzxIXEmQ==?= <[email protected]>"
@@ -420,7 +420,7 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
self.assertEqual(
message.content,
"From: {}\n{}".format(
- "Test Useróąę <hamlet_ę@zulip.com>", "TestStreamEmailMessages Body"
+ "Test Useróąę <hamlet_ę@zulip.com>", "TestStreamEmailMessages body"
),
)
self.assertEqual(get_display_recipient(message.recipient), stream.name)
@@ -443,7 +443,7 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
incoming_valid_message = EmailMessage()
incoming_valid_message.set_content(text)
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -474,7 +474,7 @@ class TestStreamEmailMessagesSuccess(ZulipTestCase):
incoming_valid_message = EmailMessage()
incoming_valid_message.set_content(text)
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -509,7 +509,7 @@ class TestEmailMirrorMessagesWithAttachments(ZulipTestCase):
filename="image.png",
)
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -552,7 +552,7 @@ class TestEmailMirrorMessagesWithAttachments(ZulipTestCase):
filename=utf8_filename,
)
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -633,7 +633,7 @@ class TestEmailMirrorMessagesWithAttachments(ZulipTestCase):
attachment_msg.add_header("Content-Disposition", "attachment", filename="some_attachment")
incoming_valid_message.add_attachment(attachment_msg)
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -664,7 +664,7 @@ class TestEmailMirrorMessagesWithAttachments(ZulipTestCase):
incoming_valid_message.add_alternative(text)
incoming_valid_message.add_alternative(html, subtype="html")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -697,7 +697,7 @@ class TestEmailMirrorMessagesWithAttachments(ZulipTestCase):
incoming_valid_message.add_alternative(text)
incoming_valid_message.add_alternative(html, subtype="html")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_address_prefer_html
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -723,7 +723,7 @@ class TestStreamEmailMessagesEmptyBody(ZulipTestCase):
incoming_valid_message = EmailMessage()
incoming_valid_message.set_content("")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -751,7 +751,7 @@ class TestStreamEmailMessagesEmptyBody(ZulipTestCase):
subtype="png",
)
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -780,7 +780,7 @@ class TestStreamEmailMessagesEmptyBody(ZulipTestCase):
incoming_valid_message = EmailMessage()
incoming_valid_message.set_content("-- \nFooter")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -818,9 +818,9 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
mm_address = create_missed_message_address(user_profile, usermessage.message)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestMissedMessageEmailMessages Body")
+ incoming_valid_message.set_content("TestMissedMessageEmailMessages body")
- incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages subject"
incoming_valid_message["From"] = self.example_email("othello")
incoming_valid_message["To"] = mm_address
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -831,7 +831,7 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
user_profile = self.example_user("hamlet")
message = most_recent_message(user_profile)
- self.assertEqual(message.content, "TestMissedMessageEmailMessages Body")
+ self.assertEqual(message.content, "TestMissedMessageEmailMessages body")
self.assertEqual(message.sender, self.example_user("othello"))
self.assertEqual(message.recipient.type_id, user_profile.id)
self.assertEqual(message.recipient.type, Recipient.PERSONAL)
@@ -863,9 +863,9 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
mm_address = create_missed_message_address(user_profile, usermessage.message)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestMissedHuddleMessageEmailMessages Body")
+ incoming_valid_message.set_content("TestMissedHuddleMessageEmailMessages body")
- incoming_valid_message["Subject"] = "TestMissedHuddleMessageEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestMissedHuddleMessageEmailMessages subject"
incoming_valid_message["From"] = self.example_email("cordelia")
incoming_valid_message["To"] = mm_address
incoming_valid_message["Reply-to"] = self.example_email("cordelia")
@@ -876,7 +876,7 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
user_profile = self.example_user("iago")
message = most_recent_message(user_profile)
- self.assertEqual(message.content, "TestMissedHuddleMessageEmailMessages Body")
+ self.assertEqual(message.content, "TestMissedHuddleMessageEmailMessages body")
self.assertEqual(message.sender, self.example_user("cordelia"))
self.assertEqual(message.recipient.type, Recipient.HUDDLE)
@@ -884,7 +884,7 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
user_profile = self.example_user("othello")
message = most_recent_message(user_profile)
- self.assertEqual(message.content, "TestMissedHuddleMessageEmailMessages Body")
+ self.assertEqual(message.content, "TestMissedHuddleMessageEmailMessages body")
self.assertEqual(message.sender, self.example_user("cordelia"))
self.assertEqual(message.recipient.type, Recipient.HUDDLE)
@@ -915,9 +915,9 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
mm_address = create_missed_message_address(user_profile, usermessage.message)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestMissedMessageEmailMessages Body")
+ incoming_valid_message.set_content("TestMissedMessageEmailMessages body")
- incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages subject"
incoming_valid_message["From"] = user_profile.delivery_email
incoming_valid_message["To"] = mm_address
incoming_valid_message["Reply-to"] = user_profile.delivery_email
@@ -928,7 +928,7 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
user_profile = self.example_user("hamlet")
message = most_recent_message(user_profile)
- self.assertEqual(message.content, "TestMissedMessageEmailMessages Body")
+ self.assertEqual(message.content, "TestMissedMessageEmailMessages body")
self.assertEqual(message.sender, self.example_user("othello"))
self.assertEqual(message.recipient.type, Recipient.STREAM)
self.assertEqual(message.recipient.id, usermessage.message.recipient.id)
@@ -957,9 +957,9 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
mm_address = create_missed_message_address(user_profile, usermessage.message)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestMissedMessageEmailMessages Body")
+ incoming_valid_message.set_content("TestMissedMessageEmailMessages body")
- incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages subject"
incoming_valid_message["From"] = user_profile.delivery_email
incoming_valid_message["To"] = mm_address
incoming_valid_message["Reply-to"] = user_profile.delivery_email
@@ -1001,9 +1001,9 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
usermessage.message.save(update_fields=["subject"])
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestMissedMessageEmailMessages Body")
+ incoming_valid_message.set_content("TestMissedMessageEmailMessages body")
- incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages subject"
incoming_valid_message["From"] = user_profile.delivery_email
incoming_valid_message["To"] = mm_address
incoming_valid_message["Reply-to"] = user_profile.delivery_email
@@ -1015,7 +1015,7 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
message = most_recent_message(user_profile)
self.assertEqual(message.subject, "updated topic")
- self.assertEqual(message.content, "TestMissedMessageEmailMessages Body")
+ self.assertEqual(message.content, "TestMissedMessageEmailMessages body")
self.assertEqual(message.sender, self.example_user("othello"))
self.assertEqual(message.recipient.type, Recipient.STREAM)
self.assertEqual(message.recipient.id, usermessage.message.recipient.id)
@@ -1044,9 +1044,9 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
do_deactivate_user(user_profile, acting_user=None)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestMissedMessageEmailMessages Body")
+ incoming_valid_message.set_content("TestMissedMessageEmailMessages body")
- incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages subject"
incoming_valid_message["From"] = user_profile.delivery_email
incoming_valid_message["To"] = mm_address
incoming_valid_message["Reply-to"] = user_profile.delivery_email
@@ -1081,9 +1081,9 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
do_deactivate_realm(user_profile.realm, acting_user=None)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestMissedMessageEmailMessages Body")
+ incoming_valid_message.set_content("TestMissedMessageEmailMessages body")
- incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages subject"
incoming_valid_message["From"] = user_profile.delivery_email
incoming_valid_message["To"] = mm_address
incoming_valid_message["Reply-to"] = user_profile.delivery_email
@@ -1116,9 +1116,9 @@ class TestMissedMessageEmailMessages(ZulipTestCase):
mm_address = create_missed_message_address(user_profile, message)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestMissedMessageEmailMessages Body")
+ incoming_valid_message.set_content("TestMissedMessageEmailMessages body")
- incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestMissedMessageEmailMessages subject"
incoming_valid_message["From"] = user_profile.delivery_email
incoming_valid_message["To"] = mm_address
incoming_valid_message["Reply-to"] = user_profile.delivery_email
@@ -1189,7 +1189,7 @@ class TestReplyExtraction(ZulipTestCase):
incoming_valid_message = EmailMessage()
incoming_valid_message.set_content(text)
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = user_profile.delivery_email
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = user_profile.delivery_email
@@ -1203,7 +1203,7 @@ class TestReplyExtraction(ZulipTestCase):
# Don't extract if Subject indicates the email has been forwarded into the mirror:
del incoming_valid_message["Subject"]
- incoming_valid_message["Subject"] = "FWD: TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "FWD: TestStreamEmailMessages subject"
process_message(incoming_valid_message)
message = most_recent_message(user_profile)
self.assertEqual(message.content, text)
@@ -1240,7 +1240,7 @@ class TestReplyExtraction(ZulipTestCase):
incoming_valid_message = EmailMessage()
incoming_valid_message.set_content(html, subtype="html")
- incoming_valid_message["Subject"] = "TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "TestStreamEmailMessages subject"
incoming_valid_message["From"] = user_profile.delivery_email
incoming_valid_message["To"] = stream_to_address
incoming_valid_message["Reply-to"] = user_profile.delivery_email
@@ -1254,7 +1254,7 @@ class TestReplyExtraction(ZulipTestCase):
# Don't extract if Subject indicates the email has been forwarded into the mirror:
del incoming_valid_message["Subject"]
- incoming_valid_message["Subject"] = "FWD: TestStreamEmailMessages Subject"
+ incoming_valid_message["Subject"] = "FWD: TestStreamEmailMessages subject"
process_message(incoming_valid_message)
message = most_recent_message(user_profile)
self.assertEqual(message.content, convert_html_to_markdown(html))
@@ -1408,7 +1408,7 @@ class TestStreamEmailMessagesSubjectStripping(ZulipTestCase):
stream = get_stream("Denmark", user_profile.realm)
stream_to_address = encode_email_address(stream)
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("TestStreamEmailMessages Body")
+ incoming_valid_message.set_content("TestStreamEmailMessages body")
incoming_valid_message["Subject"] = "Re: Fwd: Re: Test"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
@@ -1461,8 +1461,8 @@ class TestContentTypeUnspecifiedCharset(ZulipTestCase):
class TestEmailMirrorProcessMessageNoValidRecipient(ZulipTestCase):
def test_process_message_no_valid_recipient(self) -> None:
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("Test Body")
- incoming_valid_message["Subject"] = "Test Subject"
+ incoming_valid_message.set_content("Test body")
+ incoming_valid_message["Subject"] = "Test subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = "address@wrongdomain, address@notzulip"
incoming_valid_message["Reply-to"] = self.example_email("othello")
@@ -1486,8 +1486,8 @@ class TestEmailMirrorLogAndReport(ZulipTestCase):
scrubbed_address = "X" * len(address_parts[0]) + "@" + address_parts[1]
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("Test Body")
- incoming_valid_message["Subject"] = "Test Subject"
+ incoming_valid_message.set_content("Test body")
+ incoming_valid_message["Subject"] = "Test subject"
incoming_valid_message["From"] = self.example_email("hamlet")
incoming_valid_message["To"] = stream_to_address
with self.assertLogs("zerver.lib.email_mirror", "ERROR") as error_log:
@@ -1528,8 +1528,8 @@ class TestEmailMirrorLogAndReport(ZulipTestCase):
def test_log_and_report_no_errorbot(self) -> None:
with self.settings(ERROR_BOT=None):
incoming_valid_message = EmailMessage()
- incoming_valid_message.set_content("Test Body")
- incoming_valid_message["Subject"] = "Test Subject"
+ incoming_valid_message.set_content("Test body")
+ incoming_valid_message["Subject"] = "Test subject"
incoming_valid_message["From"] = self.example_email("hamlet")
with self.assertLogs(logger_name, level="ERROR") as m:
log_and_report(incoming_valid_message, "test error message", None)
diff --git a/zerver/tests/test_email_notifications.py b/zerver/tests/test_email_notifications.py
index 31de73f128f..45eeaf9148f 100644
--- a/zerver/tests/test_email_notifications.py
+++ b/zerver/tests/test_email_notifications.py
@@ -62,7 +62,7 @@ class TestCustomEmails(ZulipTestCase):
)
self.assertEqual(len(mail.outbox), 1)
msg = mail.outbox[0]
- self.assertEqual(msg.subject, "Test Subject")
+ self.assertEqual(msg.subject, "Test subject")
self.assertFalse(msg.reply_to)
self.assertEqual("Test body", msg.body)
diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py
index eb75b8760c3..5d1ffdd9495 100644
--- a/zerver/tests/test_events.py
+++ b/zerver/tests/test_events.py
@@ -1021,7 +1021,7 @@ class NormalActionsTest(BaseAction):
events = self.verify_action(
lambda: do_change_default_stream_group_name(
- self.user_profile.realm, group, "New Group Name"
+ self.user_profile.realm, group, "New group name"
)
)
check_default_stream_groups("events[0]", events[0])
diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py
index 1bea988b923..170f81f8d53 100644
--- a/zerver/tests/test_home.py
+++ b/zerver/tests/test_home.py
@@ -980,7 +980,7 @@ class HomeTest(ZulipTestCase):
# messages before deactivation they remain same way after activation.
long_term_idle_user = self.example_user("hamlet")
self.login_user(long_term_idle_user)
- message = "Test Message 1"
+ message = "Test message 1"
self.send_test_message(message)
with queries_captured() as queries:
self.assertEqual(self.soft_activate_and_get_unread_count(), 1)
@@ -1000,7 +1000,7 @@ class HomeTest(ZulipTestCase):
)
self.login_user(long_term_idle_user)
- message = "Test Message 2"
+ message = "Test message 2"
self.send_test_message(message)
idle_user_msg_list = get_user_messages(long_term_idle_user)
self.assertNotEqual(idle_user_msg_list[-1].content, message)
@@ -1027,7 +1027,7 @@ class HomeTest(ZulipTestCase):
],
)
- message = "Test Message 1"
+ message = "Test message 1"
self.send_test_message(message)
self.login_user(long_term_idle_user)
with queries_captured() as queries:
@@ -1038,7 +1038,7 @@ class HomeTest(ZulipTestCase):
idle_user_msg_list = get_user_messages(long_term_idle_user)
self.assertEqual(idle_user_msg_list[-1].content, message)
- message = "Test Message 2"
+ message = "Test message 2"
self.send_test_message(message)
with queries_captured() as queries:
self.assertEqual(self.soft_activate_and_get_unread_count(), 3)
@@ -1059,7 +1059,7 @@ class HomeTest(ZulipTestCase):
],
)
- message = "Test Message 3"
+ message = "Test message 3"
self.send_test_message(message)
self.login_user(long_term_idle_user)
with queries_captured() as queries:
@@ -1070,7 +1070,7 @@ class HomeTest(ZulipTestCase):
idle_user_msg_list = get_user_messages(long_term_idle_user)
self.assertEqual(idle_user_msg_list[-1].content, message)
- message = "Test Message 4"
+ message = "Test message 4"
self.send_test_message(message)
with queries_captured() as queries:
self.assertEqual(self.soft_activate_and_get_unread_count(), 5)
diff --git a/zerver/tests/test_import_export.py b/zerver/tests/test_import_export.py
index baa74355b0b..2a30abf7805 100644
--- a/zerver/tests/test_import_export.py
+++ b/zerver/tests/test_import_export.py
@@ -558,12 +558,12 @@ class ImportExportTest(ZulipTestCase):
create_stream_if_needed(realm, "Private A", invite_only=True)
self.subscribe(self.example_user("iago"), "Private A")
self.subscribe(self.example_user("othello"), "Private A")
- self.send_stream_message(self.example_user("iago"), "Private A", "Hello Stream A")
+ self.send_stream_message(self.example_user("iago"), "Private A", "Hello stream A")
create_stream_if_needed(realm, "Private B", invite_only=True)
self.subscribe(self.example_user("prospero"), "Private B")
stream_b_message_id = self.send_stream_message(
- self.example_user("prospero"), "Private B", "Hello Stream B"
+ self.example_user("prospero"), "Private B", "Hello stream B"
)
self.subscribe(self.example_user("hamlet"), "Private B")
@@ -571,7 +571,7 @@ class ImportExportTest(ZulipTestCase):
self.subscribe(self.example_user("othello"), "Private C")
self.subscribe(self.example_user("prospero"), "Private C")
stream_c_message_id = self.send_stream_message(
- self.example_user("othello"), "Private C", "Hello Stream C"
+ self.example_user("othello"), "Private C", "Hello stream C"
)
# Create huddles
@@ -676,7 +676,7 @@ class ImportExportTest(ZulipTestCase):
recipient__in=public_stream_recipients
).values_list("id", flat=True)
- # Messages from Private Stream C are not exported since no member gave consent
+ # Messages from Private stream C are not exported since no member gave consent
private_stream_ids = Stream.objects.filter(name__in=["Private A", "Private B"]).values_list(
"id", flat=True
)
diff --git a/zerver/tests/test_integrations_dev_panel.py b/zerver/tests/test_integrations_dev_panel.py
index 9a5491d557c..b3d53c219d2 100644
--- a/zerver/tests/test_integrations_dev_panel.py
+++ b/zerver/tests/test_integrations_dev_panel.py
@@ -39,7 +39,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
def test_check_send_webhook_fixture_message_for_success_without_headers(self) -> None:
bot = get_user("[email protected]", self.zulip_realm)
- url = f"/api/v1/external/airbrake?api_key={bot.api_key}&stream=Denmark&topic=Airbrake Notifications"
+ url = f"/api/v1/external/airbrake?api_key={bot.api_key}&stream=Denmark&topic=Airbrake notifications"
target_url = "/devtools/integrations/check_send_webhook_fixture_message"
with open("zerver/webhooks/airbrake/fixtures/error_message.json") as f:
body = f.read()
@@ -68,11 +68,11 @@ class TestIntegrationsDevPanel(ZulipTestCase):
expected_message = '[ZeroDivisionError](https://zulip.airbrake.io/projects/125209/groups/1705190192091077626): "Error message from logger" occurred.'
self.assertEqual(latest_msg.content, expected_message)
self.assertEqual(Stream.objects.get(id=latest_msg.recipient.type_id).name, "Denmark")
- self.assertEqual(latest_msg.topic_name(), "Airbrake Notifications")
+ self.assertEqual(latest_msg.topic_name(), "Airbrake notifications")
def test_check_send_webhook_fixture_message_for_success_with_headers(self) -> None:
bot = get_user("[email protected]", self.zulip_realm)
- url = f"/api/v1/external/github?api_key={bot.api_key}&stream=Denmark&topic=GitHub Notifications"
+ url = f"/api/v1/external/github?api_key={bot.api_key}&stream=Denmark&topic=GitHub notifications"
target_url = "/devtools/integrations/check_send_webhook_fixture_message"
with open("zerver/webhooks/github/fixtures/ping__organization.json") as f:
body = f.read()
@@ -91,13 +91,13 @@ class TestIntegrationsDevPanel(ZulipTestCase):
expected_message = "GitHub webhook has been successfully configured by eeshangarg."
self.assertEqual(latest_msg.content, expected_message)
self.assertEqual(Stream.objects.get(id=latest_msg.recipient.type_id).name, "Denmark")
- self.assertEqual(latest_msg.topic_name(), "GitHub Notifications")
+ self.assertEqual(latest_msg.topic_name(), "GitHub notifications")
def test_check_send_webhook_fixture_message_for_success_with_headers_and_non_json_fixtures(
self,
) -> None:
bot = get_user("[email protected]", self.zulip_realm)
- url = f"/api/v1/external/wordpress?api_key={bot.api_key}&stream=Denmark&topic=WordPress Notifications"
+ url = f"/api/v1/external/wordpress?api_key={bot.api_key}&stream=Denmark&topic=WordPress notifications"
target_url = "/devtools/integrations/check_send_webhook_fixture_message"
with open("zerver/webhooks/wordpress/fixtures/publish_post_no_data_provided.txt") as f:
body = f.read()
@@ -115,10 +115,10 @@ class TestIntegrationsDevPanel(ZulipTestCase):
self.assertEqual(response.status_code, 200)
latest_msg = Message.objects.latest("id")
- expected_message = "New post published:\n* [New WordPress Post](WordPress Post URL)"
+ expected_message = "New post published:\n* [New WordPress post](WordPress post URL)"
self.assertEqual(latest_msg.content, expected_message)
self.assertEqual(Stream.objects.get(id=latest_msg.recipient.type_id).name, "Denmark")
- self.assertEqual(latest_msg.topic_name(), "WordPress Notifications")
+ self.assertEqual(latest_msg.topic_name(), "WordPress notifications")
def test_get_fixtures_for_nonexistant_integration(self) -> None:
target_url = "/devtools/integrations/somerandomnonexistantintegration/fixtures"
@@ -158,7 +158,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
def test_send_all_webhook_fixture_messages_for_success(self) -> None:
bot = get_user("[email protected]", self.zulip_realm)
- url = f"/api/v1/external/appfollow?api_key={bot.api_key}&stream=Denmark&topic=Appfollow Bulk Notifications"
+ url = f"/api/v1/external/appfollow?api_key={bot.api_key}&stream=Denmark&topic=Appfollow bulk notifications"
target_url = "/devtools/integrations/send_all_webhook_fixture_messages"
data = {
@@ -201,11 +201,11 @@ class TestIntegrationsDevPanel(ZulipTestCase):
self.assertTrue(msg.content in expected_messages)
expected_messages.remove(msg.content)
self.assertEqual(Stream.objects.get(id=msg.recipient.type_id).name, "Denmark")
- self.assertEqual(msg.topic_name(), "Appfollow Bulk Notifications")
+ self.assertEqual(msg.topic_name(), "Appfollow bulk notifications")
def test_send_all_webhook_fixture_messages_for_success_with_non_json_fixtures(self) -> None:
bot = get_user("[email protected]", self.zulip_realm)
- url = f"/api/v1/external/wordpress?api_key={bot.api_key}&stream=Denmark&topic=WordPress Bulk Notifications"
+ url = f"/api/v1/external/wordpress?api_key={bot.api_key}&stream=Denmark&topic=WordPress bulk notifications"
target_url = "/devtools/integrations/send_all_webhook_fixture_messages"
data = {
@@ -218,7 +218,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
expected_responses = [
{
"message": {
- "msg": "Unknown WordPress webhook action: WordPress Action",
+ "msg": "Unknown WordPress webhook action: WordPress action",
"result": "error",
},
"fixture_name": "user_register.txt",
@@ -226,7 +226,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
},
{
"message": {
- "msg": "Unknown WordPress webhook action: WordPress Action",
+ "msg": "Unknown WordPress webhook action: WordPress action",
"result": "error",
},
"fixture_name": "publish_post_no_data_provided.txt",
@@ -234,7 +234,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
},
{
"message": {
- "msg": "Unknown WordPress webhook action: WordPress Action",
+ "msg": "Unknown WordPress webhook action: WordPress action",
"result": "error",
},
"fixture_name": "unknown_action_no_data.txt",
@@ -242,7 +242,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
},
{
"message": {
- "msg": "Unknown WordPress webhook action: WordPress Action",
+ "msg": "Unknown WordPress webhook action: WordPress action",
"result": "error",
},
"fixture_name": "publish_page.txt",
@@ -250,7 +250,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
},
{
"message": {
- "msg": "Unknown WordPress webhook action: WordPress Action",
+ "msg": "Unknown WordPress webhook action: WordPress action",
"result": "error",
},
"fixture_name": "unknown_action_no_hook_provided.txt",
@@ -258,7 +258,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
},
{
"message": {
- "msg": "Unknown WordPress webhook action: WordPress Action",
+ "msg": "Unknown WordPress webhook action: WordPress action",
"result": "error",
},
"fixture_name": "publish_post_type_not_provided.txt",
@@ -266,7 +266,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
},
{
"message": {
- "msg": "Unknown WordPress webhook action: WordPress Action",
+ "msg": "Unknown WordPress webhook action: WordPress action",
"result": "error",
},
"fixture_name": "wp_login.txt",
@@ -274,7 +274,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
},
{
"message": {
- "msg": "Unknown WordPress webhook action: WordPress Action",
+ "msg": "Unknown WordPress webhook action: WordPress action",
"result": "error",
},
"fixture_name": "publish_post.txt",
@@ -301,7 +301,7 @@ class TestIntegrationsDevPanel(ZulipTestCase):
) -> None:
os_path_exists_mock.return_value = False
bot = get_user("[email protected]", self.zulip_realm)
- url = f"/api/v1/external/appfollow?api_key={bot.api_key}&stream=Denmark&topic=Appfollow Bulk Notifications"
+ url = f"/api/v1/external/appfollow?api_key={bot.api_key}&stream=Denmark&topic=Appfollow bulk notifications"
data = {
"url": url,
"custom_headers": "{}",
diff --git a/zerver/tests/test_markdown.py b/zerver/tests/test_markdown.py
index bc1517c137b..4229599ed29 100644
--- a/zerver/tests/test_markdown.py
+++ b/zerver/tests/test_markdown.py
@@ -688,9 +688,9 @@ class MarkdownTest(ZulipTestCase):
converted = render_markdown(msg, content)
self.assertEqual(converted, expected)
- content = "Test 1\n[21136101110_1dde1c1a7e_o.jpg](/user_uploads/{realm_id}/6d/F1PX6u16JA2P-nK45PyxHIYZ/21136101110_1dde1c1a7e_o.jpg) \n\nNext Image\n[IMG_20161116_023910.jpg](/user_uploads/{realm_id}/69/sh7L06e7uH7NaX6d5WFfVYQp/IMG_20161116_023910.jpg) \n\nAnother Screenshot\n[Screenshot-from-2016-06-01-16-22-42.png](/user_uploads/{realm_id}/70/_aZmIEWaN1iUaxwkDjkO7bpj/Screenshot-from-2016-06-01-16-22-42.png)"
+ content = "Test 1\n[21136101110_1dde1c1a7e_o.jpg](/user_uploads/{realm_id}/6d/F1PX6u16JA2P-nK45PyxHIYZ/21136101110_1dde1c1a7e_o.jpg) \n\nNext image\n[IMG_20161116_023910.jpg](/user_uploads/{realm_id}/69/sh7L06e7uH7NaX6d5WFfVYQp/IMG_20161116_023910.jpg) \n\nAnother screenshot\n[Screenshot-from-2016-06-01-16-22-42.png](/user_uploads/{realm_id}/70/_aZmIEWaN1iUaxwkDjkO7bpj/Screenshot-from-2016-06-01-16-22-42.png)"
content = content.format(realm_id=realm.id)
- expected = '<p>Test 1<br>\n<a href="/user_uploads/{realm_id}/6d/F1PX6u16JA2P-nK45PyxHIYZ/21136101110_1dde1c1a7e_o.jpg">21136101110_1dde1c1a7e_o.jpg</a> </p>\n<div class="message_inline_image"><a href="/user_uploads/{realm_id}/6d/F1PX6u16JA2P-nK45PyxHIYZ/21136101110_1dde1c1a7e_o.jpg" title="21136101110_1dde1c1a7e_o.jpg"><img data-src-fullsize="/thumbnail?url=user_uploads%2F{realm_id}%2F6d%2FF1PX6u16JA2P-nK45PyxHIYZ%2F21136101110_1dde1c1a7e_o.jpg&amp;size=full" src="/thumbnail?url=user_uploads%2F{realm_id}%2F6d%2FF1PX6u16JA2P-nK45PyxHIYZ%2F21136101110_1dde1c1a7e_o.jpg&amp;size=thumbnail"></a></div><p>Next Image<br>\n<a href="/user_uploads/{realm_id}/69/sh7L06e7uH7NaX6d5WFfVYQp/IMG_20161116_023910.jpg">IMG_20161116_023910.jpg</a> </p>\n<div class="message_inline_image"><a href="/user_uploads/{realm_id}/69/sh7L06e7uH7NaX6d5WFfVYQp/IMG_20161116_023910.jpg" title="IMG_20161116_023910.jpg"><img data-src-fullsize="/thumbnail?url=user_uploads%2F{realm_id}%2F69%2Fsh7L06e7uH7NaX6d5WFfVYQp%2FIMG_20161116_023910.jpg&amp;size=full" src="/thumbnail?url=user_uploads%2F{realm_id}%2F69%2Fsh7L06e7uH7NaX6d5WFfVYQp%2FIMG_20161116_023910.jpg&amp;size=thumbnail"></a></div><p>Another Screenshot<br>\n<a href="/user_uploads/{realm_id}/70/_aZmIEWaN1iUaxwkDjkO7bpj/Screenshot-from-2016-06-01-16-22-42.png">Screenshot-from-2016-06-01-16-22-42.png</a></p>\n<div class="message_inline_image"><a href="/user_uploads/{realm_id}/70/_aZmIEWaN1iUaxwkDjkO7bpj/Screenshot-from-2016-06-01-16-22-42.png" title="Screenshot-from-2016-06-01-16-22-42.png"><img data-src-fullsize="/thumbnail?url=user_uploads%2F{realm_id}%2F70%2F_aZmIEWaN1iUaxwkDjkO7bpj%2FScreenshot-from-2016-06-01-16-22-42.png&amp;size=full" src="/thumbnail?url=user_uploads%2F{realm_id}%2F70%2F_aZmIEWaN1iUaxwkDjkO7bpj%2FScreenshot-from-2016-06-01-16-22-42.png&amp;size=thumbnail"></a></div>'
+ expected = '<p>Test 1<br>\n<a href="/user_uploads/{realm_id}/6d/F1PX6u16JA2P-nK45PyxHIYZ/21136101110_1dde1c1a7e_o.jpg">21136101110_1dde1c1a7e_o.jpg</a> </p>\n<div class="message_inline_image"><a href="/user_uploads/{realm_id}/6d/F1PX6u16JA2P-nK45PyxHIYZ/21136101110_1dde1c1a7e_o.jpg" title="21136101110_1dde1c1a7e_o.jpg"><img data-src-fullsize="/thumbnail?url=user_uploads%2F{realm_id}%2F6d%2FF1PX6u16JA2P-nK45PyxHIYZ%2F21136101110_1dde1c1a7e_o.jpg&amp;size=full" src="/thumbnail?url=user_uploads%2F{realm_id}%2F6d%2FF1PX6u16JA2P-nK45PyxHIYZ%2F21136101110_1dde1c1a7e_o.jpg&amp;size=thumbnail"></a></div><p>Next image<br>\n<a href="/user_uploads/{realm_id}/69/sh7L06e7uH7NaX6d5WFfVYQp/IMG_20161116_023910.jpg">IMG_20161116_023910.jpg</a> </p>\n<div class="message_inline_image"><a href="/user_uploads/{realm_id}/69/sh7L06e7uH7NaX6d5WFfVYQp/IMG_20161116_023910.jpg" title="IMG_20161116_023910.jpg"><img data-src-fullsize="/thumbnail?url=user_uploads%2F{realm_id}%2F69%2Fsh7L06e7uH7NaX6d5WFfVYQp%2FIMG_20161116_023910.jpg&amp;size=full" src="/thumbnail?url=user_uploads%2F{realm_id}%2F69%2Fsh7L06e7uH7NaX6d5WFfVYQp%2FIMG_20161116_023910.jpg&amp;size=thumbnail"></a></div><p>Another screenshot<br>\n<a href="/user_uploads/{realm_id}/70/_aZmIEWaN1iUaxwkDjkO7bpj/Screenshot-from-2016-06-01-16-22-42.png">Screenshot-from-2016-06-01-16-22-42.png</a></p>\n<div class="message_inline_image"><a href="/user_uploads/{realm_id}/70/_aZmIEWaN1iUaxwkDjkO7bpj/Screenshot-from-2016-06-01-16-22-42.png" title="Screenshot-from-2016-06-01-16-22-42.png"><img data-src-fullsize="/thumbnail?url=user_uploads%2F{realm_id}%2F70%2F_aZmIEWaN1iUaxwkDjkO7bpj%2FScreenshot-from-2016-06-01-16-22-42.png&amp;size=full" src="/thumbnail?url=user_uploads%2F{realm_id}%2F70%2F_aZmIEWaN1iUaxwkDjkO7bpj%2FScreenshot-from-2016-06-01-16-22-42.png&amp;size=thumbnail"></a></div>'
expected = expected.format(realm_id=realm.id)
msg = Message(sender=sender_user_profile, sending_client=get_client("test"))
diff --git a/zerver/tests/test_message_flags.py b/zerver/tests/test_message_flags.py
index b4376615bd5..bbc8e9efcb4 100644
--- a/zerver/tests/test_message_flags.py
+++ b/zerver/tests/test_message_flags.py
@@ -830,12 +830,12 @@ class GetUnreadMsgsTest(ZulipTestCase):
pm1_message_id = self.send_personal_message(sender, user_profile, "hello1")
pm2_message_id = self.send_personal_message(sender, user_profile, "hello2")
- muted_stream = self.subscribe(user_profile, "Muted Stream")
+ muted_stream = self.subscribe(user_profile, "Muted stream")
self.mute_stream(user_profile, muted_stream)
self.mute_topic(user_profile, "Denmark", "muted-topic")
stream_message_id = self.send_stream_message(sender, "Denmark", "hello")
- muted_stream_message_id = self.send_stream_message(sender, "Muted Stream", "hello")
+ muted_stream_message_id = self.send_stream_message(sender, "Muted stream", "hello")
muted_topic_message_id = self.send_stream_message(
sender,
"Denmark",
@@ -886,7 +886,7 @@ class GetUnreadMsgsTest(ZulipTestCase):
unread_stream = result["streams"][2]
self.assertEqual(
- unread_stream["stream_id"], get_stream("Muted Stream", user_profile.realm).id
+ unread_stream["stream_id"], get_stream("Muted stream", user_profile.realm).id
)
self.assertEqual(unread_stream["topic"], "test")
self.assertEqual(unread_stream["unread_message_ids"], [muted_stream_message_id])
diff --git a/zerver/tests/test_message_send.py b/zerver/tests/test_message_send.py
index ae45a202e2c..08dab9adbae 100644
--- a/zerver/tests/test_message_send.py
+++ b/zerver/tests/test_message_send.py
@@ -1675,7 +1675,7 @@ class StreamMessagesTest(ZulipTestCase):
cordelia = self.example_user("cordelia")
hamlet = self.example_user("hamlet")
- stream_name = "Test Stream"
+ stream_name = "Test stream"
self.subscribe(hamlet, stream_name)
@@ -1715,7 +1715,7 @@ class StreamMessagesTest(ZulipTestCase):
hamlet = self.example_user("hamlet")
realm = hamlet.realm
- stream_name = "Test Stream"
+ stream_name = "Test stream"
self.subscribe(hamlet, stream_name)
diff --git a/zerver/tests/test_openapi.py b/zerver/tests/test_openapi.py
index 1624480f0f8..fe7acf76566 100644
--- a/zerver/tests/test_openapi.py
+++ b/zerver/tests/test_openapi.py
@@ -405,7 +405,7 @@ The types for the request parameters in zerver/openapi/zulip.yaml
do not match the types declared in the implementation of {function.__name__}.\n"""
msg += "=" * 65 + "\n"
msg += "{:<10s}{:^30s}{:>10s}\n".format(
- "Parameter", "OpenAPI Type", "Function Declaration Type"
+ "parameter", "OpenAPI type", "function declaration type"
)
msg += "=" * 65 + "\n"
opvtype = None
diff --git a/zerver/tests/test_push_notifications.py b/zerver/tests/test_push_notifications.py
index aa9a1959f6f..09680dfba66 100644
--- a/zerver/tests/test_push_notifications.py
+++ b/zerver/tests/test_push_notifications.py
@@ -717,7 +717,7 @@ class PushNotificationTest(BouncerTestCase):
date_sent=now(),
sending_client=self.sending_client,
)
- message.set_topic_name("Test Topic")
+ message.set_topic_name("Test topic")
message.save()
return message
@@ -1525,7 +1525,7 @@ class TestGetAPNsPayload(PushNotificationTest):
payload = get_message_payload_apns(self.sender, message)
expected = {
"alert": {
- "title": "#Verona > Test Topic",
+ "title": "#Verona > Test topic",
"subtitle": "King Hamlet:",
"body": message.content,
},
@@ -1557,7 +1557,7 @@ class TestGetAPNsPayload(PushNotificationTest):
payload = get_message_payload_apns(user_profile, message)
expected = {
"alert": {
- "title": "#Verona > Test Topic",
+ "title": "#Verona > Test topic",
"subtitle": "King Hamlet mentioned you:",
"body": message.content,
},
@@ -1589,7 +1589,7 @@ class TestGetAPNsPayload(PushNotificationTest):
payload = get_message_payload_apns(user_profile, message)
expected = {
"alert": {
- "title": "#Verona > Test Topic",
+ "title": "#Verona > Test topic",
"subtitle": "King Hamlet mentioned everyone:",
"body": message.content,
},
@@ -1745,7 +1745,7 @@ class TestGetGCMPayload(PushNotificationTest):
"sender_full_name": "King Hamlet",
"sender_avatar_url": absolute_avatar_url(message.sender),
"recipient_type": "stream",
- "topic": "Test Topic",
+ "topic": "Test topic",
"stream": "Denmark",
},
)
@@ -1781,7 +1781,7 @@ class TestGetGCMPayload(PushNotificationTest):
"sender_full_name": "King Hamlet",
"sender_avatar_url": absolute_avatar_url(message.sender),
"recipient_type": "stream",
- "topic": "Test Topic",
+ "topic": "Test topic",
"stream": "Denmark",
},
)
diff --git a/zerver/tests/test_realm.py b/zerver/tests/test_realm.py
index 28fc2f73c98..1c40419f0bf 100644
--- a/zerver/tests/test_realm.py
+++ b/zerver/tests/test_realm.py
@@ -227,7 +227,7 @@ class RealmTest(ZulipTestCase):
rendered_description = get_realm_rendered_description(realm)
text_description = get_realm_text_description(realm)
- realm.description = "New Description"
+ realm.description = "New description"
realm.save(update_fields=["description"])
new_rendered_description = get_realm_rendered_description(realm)
diff --git a/zerver/tests/test_report.py b/zerver/tests/test_report.py
index 06192c95e40..e138fd1f975 100644
--- a/zerver/tests/test_report.py
+++ b/zerver/tests/test_report.py
@@ -211,6 +211,6 @@ class TestReport(ZulipTestCase):
self.assertEqual(
warn_logs.output,
[
- "WARNING:root:CSP Violation in Document(''). Blocked URI(''), Original Policy(''), Violated Directive(''), Effective Directive(''), Disposition(''), Referrer(''), Status Code(''), Script Sample('')"
+ "WARNING:root:CSP violation in document(''). blocked URI(''), original policy(''), violated directive(''), effective directive(''), disposition(''), referrer(''), status code(''), script sample('')"
],
)
diff --git a/zerver/tests/test_soft_deactivation.py b/zerver/tests/test_soft_deactivation.py
index 02fb0f7d44e..f1e4da5a052 100644
--- a/zerver/tests/test_soft_deactivation.py
+++ b/zerver/tests/test_soft_deactivation.py
@@ -137,7 +137,7 @@ class UserSoftDeactivationTests(ZulipTestCase):
log_output = []
for user in users:
- log_output.append(f"INFO:{logger_string}:Soft Reactivated user {user.id}")
+ log_output.append(f"INFO:{logger_string}:Soft reactivated user {user.id}")
self.assertEqual(m.output, log_output)
@@ -332,7 +332,7 @@ class SoftDeactivationMessageTest(ZulipTestCase):
],
)
- message = "Test Message 1"
+ message = "Test message 1"
message_id = self.send_stream_message(sender, stream_name, message, topic_name)
idle_user_msg_list = get_user_messages(long_term_idle_user)
idle_user_msg_count = len(idle_user_msg_list)
@@ -390,7 +390,7 @@ class SoftDeactivationMessageTest(ZulipTestCase):
# Test that add_missing_messages() in simplest case of adding a
# message for which UserMessage row doesn't exist for this user.
- sent_message = send_fake_message("Test Message 1", stream)
+ sent_message = send_fake_message("Test message 1", stream)
idle_user_msg_list = get_user_messages(long_term_idle_user)
idle_user_msg_count = len(idle_user_msg_list)
self.assertNotEqual(idle_user_msg_list[-1], sent_message)
@@ -407,7 +407,7 @@ class SoftDeactivationMessageTest(ZulipTestCase):
# already present in the UserMessage table. This test works on the
# fact that previous test just above this added a message but didn't
# updated the last_active_message_id field for the user.
- sent_message = send_fake_message("Test Message 2", stream)
+ sent_message = send_fake_message("Test message 2", stream)
idle_user_msg_list = get_user_messages(long_term_idle_user)
idle_user_msg_count = len(idle_user_msg_list)
self.assertNotEqual(idle_user_msg_list[-1], sent_message)
@@ -425,12 +425,12 @@ class SoftDeactivationMessageTest(ZulipTestCase):
# Test for a public stream.
sent_message_list = []
- sent_message_list.append(send_fake_message("Test Message 3", stream))
+ sent_message_list.append(send_fake_message("Test message 3", stream))
# Alter subscription to stream.
self.unsubscribe(long_term_idle_user, stream_name)
- send_fake_message("Test Message 4", stream)
+ send_fake_message("Test message 4", stream)
self.subscribe(long_term_idle_user, stream_name)
- sent_message_list.append(send_fake_message("Test Message 5", stream))
+ sent_message_list.append(send_fake_message("Test message 5", stream))
sent_message_list.reverse()
idle_user_msg_list = get_user_messages(long_term_idle_user)
idle_user_msg_count = len(idle_user_msg_list)
@@ -449,16 +449,16 @@ class SoftDeactivationMessageTest(ZulipTestCase):
# Test consecutive subscribe/unsubscribe in a public stream
sent_message_list = []
- sent_message_list.append(send_fake_message("Test Message 6", stream))
+ sent_message_list.append(send_fake_message("Test message 6", stream))
# Unsubscribe from stream and then immediately subscribe back again.
self.unsubscribe(long_term_idle_user, stream_name)
self.subscribe(long_term_idle_user, stream_name)
- sent_message_list.append(send_fake_message("Test Message 7", stream))
+ sent_message_list.append(send_fake_message("Test message 7", stream))
# Again unsubscribe from stream and send a message.
# This will make sure that if initially in a unsubscribed state
# a consecutive subscribe/unsubscribe doesn't misbehave.
self.unsubscribe(long_term_idle_user, stream_name)
- send_fake_message("Test Message 8", stream)
+ send_fake_message("Test message 8", stream)
# Do a subscribe and unsubscribe immediately.
self.subscribe(long_term_idle_user, stream_name)
self.unsubscribe(long_term_idle_user, stream_name)
@@ -484,7 +484,7 @@ class SoftDeactivationMessageTest(ZulipTestCase):
do_soft_activate_users([long_term_idle_user])
self.subscribe(long_term_idle_user, stream_name)
# Send a real message to update last_active_message_id
- sent_message_id = self.send_stream_message(sender, stream_name, "Test Message 9")
+ sent_message_id = self.send_stream_message(sender, stream_name, "Test message 9")
self.unsubscribe(long_term_idle_user, stream_name)
# Soft deactivate and send another message to the unsubscribed stream.
with self.assertLogs(logger_string, level="INFO") as info_logs:
@@ -496,7 +496,7 @@ class SoftDeactivationMessageTest(ZulipTestCase):
f"INFO:{logger_string}:Soft-deactivated batch of 1 users; 0 remain to process",
],
)
- send_fake_message("Test Message 10", stream)
+ send_fake_message("Test message 10", stream)
idle_user_msg_list = get_user_messages(long_term_idle_user)
idle_user_msg_count = len(idle_user_msg_list)
@@ -513,18 +513,18 @@ class SoftDeactivationMessageTest(ZulipTestCase):
# Note: At this point in this test we have long_term_idle_user
# unsubscribed from the 'Denmark' stream.
- # Test for a Private Stream.
+ # Test for a private stream.
stream_name = "Core"
private_stream = self.make_stream("Core", invite_only=True)
self.subscribe(self.example_user("iago"), stream_name)
sent_message_list = []
- send_fake_message("Test Message 11", private_stream)
+ send_fake_message("Test message 11", private_stream)
self.subscribe(self.example_user("hamlet"), stream_name)
- sent_message_list.append(send_fake_message("Test Message 12", private_stream))
+ sent_message_list.append(send_fake_message("Test message 12", private_stream))
self.unsubscribe(long_term_idle_user, stream_name)
- send_fake_message("Test Message 13", private_stream)
+ send_fake_message("Test message 13", private_stream)
self.subscribe(long_term_idle_user, stream_name)
- sent_message_list.append(send_fake_message("Test Message 14", private_stream))
+ sent_message_list.append(send_fake_message("Test message 14", private_stream))
sent_message_list.reverse()
idle_user_msg_list = get_user_messages(long_term_idle_user)
idle_user_msg_count = len(idle_user_msg_list)
@@ -626,7 +626,7 @@ class SoftDeactivationMessageTest(ZulipTestCase):
# doesn't end up creating UserMessage row for deactivated user.
general_user_msg_count = len(get_user_messages(cordelia))
soft_deactivated_user_msg_count = len(get_user_messages(long_term_idle_user))
- message = "Test Message 1"
+ message = "Test message 1"
send_stream_message(message)
assert_last_um_content(long_term_idle_user, message, negate=True)
assert_um_count(long_term_idle_user, soft_deactivated_user_msg_count)
diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py
index cb596941955..5f4c0043a83 100644
--- a/zerver/tests/test_subs.py
+++ b/zerver/tests/test_subs.py
@@ -1959,12 +1959,12 @@ class DefaultStreamTest(ZulipTestCase):
def test_add_and_remove_default_stream(self) -> None:
realm = get_realm("zulip")
- stream = ensure_stream(realm, "Added Stream", acting_user=None)
+ stream = ensure_stream(realm, "Added stream", acting_user=None)
orig_stream_names = self.get_default_stream_names(realm)
do_add_default_stream(stream)
new_stream_names = self.get_default_stream_names(realm)
added_stream_names = new_stream_names - orig_stream_names
- self.assertEqual(added_stream_names, {"Added Stream"})
+ self.assertEqual(added_stream_names, {"Added stream"})
# idempotentcy--2nd call to add_default_stream should be a noop
do_add_default_stream(stream)
self.assertEqual(self.get_default_stream_names(realm), new_stream_names)
diff --git a/zerver/tests/test_user_groups.py b/zerver/tests/test_user_groups.py
index c5e8f98e769..6024e0ff8fc 100644
--- a/zerver/tests/test_user_groups.py
+++ b/zerver/tests/test_user_groups.py
@@ -397,7 +397,7 @@ class UserGroupAPITestCase(ZulipTestCase):
realm = cordelia.realm
group_name = "support"
- stream_name = "Dev Help"
+ stream_name = "Dev help"
content_with_group_mention = "hey @*support* can you help us with this?"
diff --git a/zerver/tests/test_users.py b/zerver/tests/test_users.py
index 210f08e0f20..571a1a01d83 100644
--- a/zerver/tests/test_users.py
+++ b/zerver/tests/test_users.py
@@ -1239,11 +1239,11 @@ class UserProfileTest(ZulipTestCase):
iago = self.example_user("iago")
stream = get_stream("Rome", iago.realm)
- # Invalid User ID.
+ # Invalid user ID.
result = self.client_get(f"/json/users/25/subscriptions/{stream.id}")
self.assert_json_error(result, "No such user")
- # Invalid Stream ID.
+ # Invalid stream ID.
result = self.client_get(f"/json/users/{iago.id}/subscriptions/25")
self.assert_json_error(result, "Invalid stream id")
@@ -1491,7 +1491,7 @@ class RecipientInfoTest(ZulipTestCase):
realm = hamlet.realm
- stream_name = "Test Stream"
+ stream_name = "Test stream"
topic_name = "test topic"
for user in [hamlet, cordelia, othello]:
diff --git a/zerver/views/development/cache.py b/zerver/views/development/cache.py
index 906b8212c46..23e8b0a399c 100644
--- a/zerver/views/development/cache.py
+++ b/zerver/views/development/cache.py
@@ -10,7 +10,7 @@ from zerver.models import clear_client_cache, flush_per_request_caches
ZULIP_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../../")
-# This is used only by the Puppeteer Tests to clear all the cache after each run.
+# This is used only by the Puppeteer tests to clear all the cache after each run.
@csrf_exempt
@require_post
def remove_caches(request: HttpRequest) -> HttpResponse:
diff --git a/zerver/views/registration.py b/zerver/views/registration.py
index 1aa317bfb5c..d68f2e3dd50 100644
--- a/zerver/views/registration.py
+++ b/zerver/views/registration.py
@@ -660,7 +660,7 @@ def accounts_home_from_multiuse_invite(request: HttpRequest, confirmation_key: s
multiuse_object = None
try:
multiuse_object = get_object_from_key(confirmation_key, Confirmation.MULTIUSE_INVITE)
- # Required for oAuth2
+ # Required for OAuth 2
except ConfirmationKeyException as exception:
realm = get_realm_from_request(request)
if realm is None or realm.invite_required:
diff --git a/zerver/views/report.py b/zerver/views/report.py
index 833ecc262ab..a01fe8f5c8c 100644
--- a/zerver/views/report.py
+++ b/zerver/views/report.py
@@ -184,11 +184,11 @@ def report_csp_violations(
return csp_report.get(csp_report_attr, "")
logging.warning(
- "CSP Violation in Document('%s'). "
- "Blocked URI('%s'), Original Policy('%s'), "
- "Violated Directive('%s'), Effective Directive('%s'), "
- "Disposition('%s'), Referrer('%s'), "
- "Status Code('%s'), Script Sample('%s')",
+ "CSP violation in document('%s'). "
+ "blocked URI('%s'), original policy('%s'), "
+ "violated directive('%s'), effective directive('%s'), "
+ "disposition('%s'), referrer('%s'), "
+ "status code('%s'), script sample('%s')",
get_attr("document-uri"),
get_attr("blocked-uri"),
get_attr("original-policy"),
diff --git a/zerver/webhooks/appfollow/view.py b/zerver/webhooks/appfollow/view.py
index 5ce5de2bc2e..b572ea44df3 100644
--- a/zerver/webhooks/appfollow/view.py
+++ b/zerver/webhooks/appfollow/view.py
@@ -32,11 +32,11 @@ def convert_markdown(text: str) -> str:
# Converts Slack-style Markdown to Zulip format
# Implemented mainly for AppFollow messages
# Not ready for general use as some edge-cases not handled
- # Convert Bold
+ # Convert bold
text = re.sub(r"(?:(?<=\s)|(?<=^))\*(.+?\S)\*(?=\s|$)", r"**\1**", text)
- # Convert Italics
+ # Convert italics
text = re.sub(r"\b_(\s*)(.+?)(\s*)_\b", r"\1*\2*\3", text)
- # Convert Strikethrough
+ # Convert strikethrough
text = re.sub(r"(?:(?<=\s)|(?<=^))~(.+?\S)~(?=\s|$)", r"~~\1~~", text)
return text
diff --git a/zerver/webhooks/bitbucket2/tests.py b/zerver/webhooks/bitbucket2/tests.py
index ae7caa4ba5f..f4712a02f62 100644
--- a/zerver/webhooks/bitbucket2/tests.py
+++ b/zerver/webhooks/bitbucket2/tests.py
@@ -5,7 +5,7 @@ from zerver.webhooks.bitbucket2.view import get_user_info
TOPIC = "Repository name"
TOPIC_PR_EVENTS = "Repository name / PR #1 new commit"
-TOPIC_ISSUE_EVENTS = "Repository name / Issue #1 Bug"
+TOPIC_ISSUE_EVENTS = "Repository name / issue #1 Bug"
TOPIC_BRANCH_EVENTS = "Repository name / master"
@@ -91,27 +91,27 @@ class Bitbucket2HookTests(WebhookTestCase):
self.check_webhook("commit_status_changed", TOPIC, expected_message)
def test_bitbucket2_on_issue_created_event(self) -> None:
- expected_message = "Tomasz created [Issue #1](https://bitbucket.org/kolaszek/repository-name/issues/2/bug) (assigned to Tomasz):\n\n~~~ quote\nSuch a bug\n~~~"
+ expected_message = "Tomasz created [issue #1](https://bitbucket.org/kolaszek/repository-name/issues/2/bug) (assigned to Tomasz):\n\n~~~ quote\nSuch a bug\n~~~"
self.check_webhook("issue_created", TOPIC_ISSUE_EVENTS, expected_message)
def test_bitbucket2_on_issue_created_with_custom_topic_in_url(self) -> None:
self.url = self.build_webhook_url(topic="notifications")
expected_topic = "notifications"
- expected_message = "Tomasz created [Issue #1 Bug](https://bitbucket.org/kolaszek/repository-name/issues/2/bug) (assigned to Tomasz):\n\n~~~ quote\nSuch a bug\n~~~"
+ expected_message = "Tomasz created [issue #1 Bug](https://bitbucket.org/kolaszek/repository-name/issues/2/bug) (assigned to Tomasz):\n\n~~~ quote\nSuch a bug\n~~~"
self.check_webhook("issue_created", expected_topic, expected_message)
def test_bitbucket2_on_issue_updated_event(self) -> None:
- expected_message = "Tomasz updated [Issue #1](https://bitbucket.org/kolaszek/repository-name/issues/2/bug)."
+ expected_message = "Tomasz updated [issue #1](https://bitbucket.org/kolaszek/repository-name/issues/2/bug)."
self.check_webhook("issue_updated", TOPIC_ISSUE_EVENTS, expected_message)
def test_bitbucket2_on_issue_commented_event(self) -> None:
- expected_message = "Tomasz [commented](https://bitbucket.org/kolaszek/repository-name/issues/2#comment-28973596) on [Issue #1](https://bitbucket.org/kolaszek/repository-name/issues/2/bug)."
+ expected_message = "Tomasz [commented](https://bitbucket.org/kolaszek/repository-name/issues/2#comment-28973596) on [issue #1](https://bitbucket.org/kolaszek/repository-name/issues/2/bug)."
self.check_webhook("issue_commented", TOPIC_ISSUE_EVENTS, expected_message)
def test_bitbucket2_on_issue_commented_with_custom_topic_in_url(self) -> None:
self.url = self.build_webhook_url(topic="notifications")
expected_topic = "notifications"
- expected_message = "Tomasz [commented](https://bitbucket.org/kolaszek/repository-name/issues/2#comment-28973596) on [Issue #1 Bug](https://bitbucket.org/kolaszek/repository-name/issues/2/bug)."
+ expected_message = "Tomasz [commented](https://bitbucket.org/kolaszek/repository-name/issues/2#comment-28973596) on [issue #1 Bug](https://bitbucket.org/kolaszek/repository-name/issues/2/bug)."
self.check_webhook("issue_commented", expected_topic, expected_message)
def test_bitbucket2_on_pull_request_created_event(self) -> None:
diff --git a/zerver/webhooks/bitbucket2/view.py b/zerver/webhooks/bitbucket2/view.py
index 3f2785608d2..eca1d12f653 100644
--- a/zerver/webhooks/bitbucket2/view.py
+++ b/zerver/webhooks/bitbucket2/view.py
@@ -136,7 +136,7 @@ def get_subject_based_on_type(payload: Dict[str, Any], type: str) -> Any:
if type.startswith("issue"):
return TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE.format(
repo=get_repository_name(payload["repository"]),
- type="Issue",
+ type="issue",
id=payload["issue"]["id"],
title=payload["issue"]["title"],
)
diff --git a/zerver/webhooks/circleci/tests.py b/zerver/webhooks/circleci/tests.py
index 42c214a1175..7e91fd5bfb4 100644
--- a/zerver/webhooks/circleci/tests.py
+++ b/zerver/webhooks/circleci/tests.py
@@ -11,7 +11,7 @@ class CircleCiHookTests(WebhookTestCase):
expected_message = """
Build [#5](https://circleci.com/bb/Hypro999/circleci-test/5) of `build`/`workflow` on branch `unstable` has failed.
- **Commits (3):** [6b5361c166](https://bitbucket.org/Hypro999/circleci-test/commits/6b5361c1661581d975e84b68904ae9bfba75d5e5) ... [eaa88f9eac](https://bitbucket.org/Hypro999/circleci-test/commits/eaa88f9eac0fad86c46a8fe35462fe2c904d84b1)
-- **Pull Request:** https://bitbucket.org/Hypro999/circleci-test/pull-requests/1
+- **Pull request:** https://bitbucket.org/Hypro999/circleci-test/pull-requests/1
- **Author:** Hemanth V. Alluri
""".strip()
self.check_webhook(
diff --git a/zerver/webhooks/circleci/view.py b/zerver/webhooks/circleci/view.py
index da7fd0d062f..6824c086464 100644
--- a/zerver/webhooks/circleci/view.py
+++ b/zerver/webhooks/circleci/view.py
@@ -134,7 +134,7 @@ def get_body(payload: Dict[str, Any]) -> str:
pull_request_info = ""
if len(payload["pull_requests"]) > 0:
pull_request_url = payload["pull_requests"][0]["url"]
- pull_request_info = f"- **Pull Request:** {pull_request_url}"
+ pull_request_info = f"- **Pull request:** {pull_request_url}"
authors_and_committers_info = get_authors_and_committer_info(payload)
body = f"""
diff --git a/zerver/webhooks/delighted/tests.py b/zerver/webhooks/delighted/tests.py
index acb4be835f8..643376ee833 100644
--- a/zerver/webhooks/delighted/tests.py
+++ b/zerver/webhooks/delighted/tests.py
@@ -7,7 +7,7 @@ class DelightedHookTests(WebhookTestCase):
FIXTURE_DIR_NAME = "delighted"
def test_feedback_message_promoter(self) -> None:
- expected_topic = "Survey Response"
+ expected_topic = "Survey response"
expected_message = """
Kudos! You have a new promoter. Score of 9/10 from [email protected]:
@@ -24,7 +24,7 @@ Your service is fast and flawless!
)
def test_feedback_message_non_promoter(self) -> None:
- expected_topic = "Survey Response"
+ expected_topic = "Survey response"
expected_message = (
"Great! You have new feedback.\n"
">Score of 5/10 from [email protected]"
diff --git a/zerver/webhooks/delighted/view.py b/zerver/webhooks/delighted/view.py
index 8c673c1910d..01ccf1d7946 100644
--- a/zerver/webhooks/delighted/view.py
+++ b/zerver/webhooks/delighted/view.py
@@ -46,7 +46,7 @@ def api_delighted_webhook(
BODY_TEMPLATE = body_template(selected_payload["score"])
body = BODY_TEMPLATE.format(**selected_payload)
- topic = "Survey Response"
+ topic = "Survey response"
check_send_webhook_message(request, user_profile, topic, body)
return json_success()
diff --git a/zerver/webhooks/freshping/tests.py b/zerver/webhooks/freshping/tests.py
index e8e92847a45..5a0ce2774a8 100644
--- a/zerver/webhooks/freshping/tests.py
+++ b/zerver/webhooks/freshping/tests.py
@@ -21,7 +21,7 @@ class FreshpingHookTests(WebhookTestCase):
expected_topic = "Test Check"
expected_message = """
https://example.com has just become unreachable.
-Error Code: 521.
+Error code: 521.
""".strip()
self.check_webhook("freshping_check_unreachable", expected_topic, expected_message)
diff --git a/zerver/webhooks/freshping/view.py b/zerver/webhooks/freshping/view.py
index c5a59ecf731..24b287277b0 100644
--- a/zerver/webhooks/freshping/view.py
+++ b/zerver/webhooks/freshping/view.py
@@ -12,7 +12,7 @@ FRESHPING_TOPIC_TEMPLATE = "{check_name}"
FRESHPING_MESSAGE_TEMPLATE_UNREACHABLE = """
{request_url} has just become unreachable.
-Error Code: {http_status_code}.
+Error code: {http_status_code}.
""".strip()
FRESHPING_MESSAGE_TEMPLATE_UP = "{request_url} is back up and no longer unreachable."
diff --git a/zerver/webhooks/gitea/tests.py b/zerver/webhooks/gitea/tests.py
index 5c3b1af92dd..a65f008293d 100644
--- a/zerver/webhooks/gitea/tests.py
+++ b/zerver/webhooks/gitea/tests.py
@@ -55,43 +55,43 @@ class GiteaHookTests(WebhookTestCase):
self.check_webhook("pull_request__assigned", expected_topic, expected_message)
def test_issues_opened(self) -> None:
- expected_topic = "test / Issue #3 Test issue"
- expected_message = """kostekIV opened [Issue #3](https://try.gitea.io/kostekIV/test/issues/3):\n\n~~~ quote\nTest body\n~~~"""
+ expected_topic = "test / issue #3 Test issue"
+ expected_message = """kostekIV opened [issue #3](https://try.gitea.io/kostekIV/test/issues/3):\n\n~~~ quote\nTest body\n~~~"""
self.check_webhook("issues__opened", expected_topic, expected_message)
def test_issues_edited(self) -> None:
- expected_topic = "test / Issue #3 Test issue 2"
- expected_message = """kostekIV edited [Issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest body\n~~~"""
+ expected_topic = "test / issue #3 Test issue 2"
+ expected_message = """kostekIV edited [issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest body\n~~~"""
self.check_webhook("issues__edited", expected_topic, expected_message)
def test_issues_closed(self) -> None:
- expected_topic = "test / Issue #3 Test issue 2"
- expected_message = """kostekIV closed [Issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest body\n~~~"""
+ expected_topic = "test / issue #3 Test issue 2"
+ expected_message = """kostekIV closed [issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest body\n~~~"""
self.check_webhook("issues__closed", expected_topic, expected_message)
def test_issues_assigned(self) -> None:
- expected_topic = "test / Issue #3 Test issue"
- expected_message = """kostekIV assigned [Issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest body\n~~~"""
+ expected_topic = "test / issue #3 Test issue"
+ expected_message = """kostekIV assigned [issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest body\n~~~"""
self.check_webhook("issues__assigned", expected_topic, expected_message)
def test_issues_reopened(self) -> None:
- expected_topic = "test / Issue #3 Test issue 2"
- expected_message = """kostekIV reopened [Issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest body\n~~~"""
+ expected_topic = "test / issue #3 Test issue 2"
+ expected_message = """kostekIV reopened [issue #3](https://try.gitea.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest body\n~~~"""
self.check_webhook("issues__reopened", expected_topic, expected_message)
def test_issue_comment_new(self) -> None:
- expected_topic = "test / Issue #3 Test issue"
- expected_message = """kostekIV [commented](https://try.gitea.io/kostekIV/test/issues/3#issuecomment-24400) on [Issue #3](https://try.gitea.io/kostekIV/test/issues/3):\n\n~~~ quote\ntest comment\n~~~"""
+ expected_topic = "test / issue #3 Test issue"
+ expected_message = """kostekIV [commented](https://try.gitea.io/kostekIV/test/issues/3#issuecomment-24400) on [issue #3](https://try.gitea.io/kostekIV/test/issues/3):\n\n~~~ quote\ntest comment\n~~~"""
self.check_webhook("issue_comment__new", expected_topic, expected_message)
def test_issue_comment_in_pr(self) -> None:
- expected_topic = "test / Issue #1 dummy"
- expected_message = """kostekIV [commented](https://try.gitea.io/kostekIV/test/pulls/1/files#issuecomment-24399) on [Issue #1](https://try.gitea.io/kostekIV/test/issues/1):\n\n~~~ quote\ntest comment\n~~~"""
+ expected_topic = "test / issue #1 dummy"
+ expected_message = """kostekIV [commented](https://try.gitea.io/kostekIV/test/pulls/1/files#issuecomment-24399) on [issue #1](https://try.gitea.io/kostekIV/test/issues/1):\n\n~~~ quote\ntest comment\n~~~"""
self.check_webhook("issue_comment__in_pr", expected_topic, expected_message)
def test_issue_comment_edited(self) -> None:
- expected_topic = "test / Issue #3 Test issue 2"
- expected_message = """kostekIV edited a [comment](https://try.gitea.io/kostekIV/test/issues/3#issuecomment-24400) on [Issue #3](https://try.gitea.io/kostekIV/test/issues/3):\n\n~~~ quote\nedit test comment\n~~~"""
+ expected_topic = "test / issue #3 Test issue 2"
+ expected_message = """kostekIV edited a [comment](https://try.gitea.io/kostekIV/test/issues/3#issuecomment-24400) on [issue #3](https://try.gitea.io/kostekIV/test/issues/3):\n\n~~~ quote\nedit test comment\n~~~"""
self.check_webhook("issue_comment__edited", expected_topic, expected_message)
diff --git a/zerver/webhooks/github/tests.py b/zerver/webhooks/github/tests.py
index 6c2ba35abdd..40032fc75f9 100644
--- a/zerver/webhooks/github/tests.py
+++ b/zerver/webhooks/github/tests.py
@@ -6,12 +6,12 @@ from zerver.lib.test_classes import WebhookTestCase
from zerver.lib.webhooks.git import COMMITS_LIMIT
TOPIC_REPO = "public-repo"
-TOPIC_ISSUE = "public-repo / Issue #2 Spelling error in the README file"
+TOPIC_ISSUE = "public-repo / issue #2 Spelling error in the README file"
TOPIC_PR = "public-repo / PR #1 Update the README with new information"
TOPIC_DEPLOYMENT = "public-repo / Deployment on production"
TOPIC_ORGANIZATION = "baxterandthehackers organization"
TOPIC_BRANCH = "public-repo / changes"
-TOPIC_WIKI = "public-repo / Wiki Pages"
+TOPIC_WIKI = "public-repo / wiki pages"
class GitHubWebhookTest(WebhookTestCase):
@@ -117,28 +117,28 @@ class GitHubWebhookTest(WebhookTestCase):
self.check_webhook("fork", TOPIC_REPO, expected_message)
def test_issue_comment_msg(self) -> None:
- expected_message = "baxterthehacker [commented](https://github.com/baxterthehacker/public-repo/issues/2#issuecomment-99262140) on [Issue #2](https://github.com/baxterthehacker/public-repo/issues/2):\n\n~~~ quote\nYou are totally right! I'll get this fixed right away.\n~~~"
+ expected_message = "baxterthehacker [commented](https://github.com/baxterthehacker/public-repo/issues/2#issuecomment-99262140) on [issue #2](https://github.com/baxterthehacker/public-repo/issues/2):\n\n~~~ quote\nYou are totally right! I'll get this fixed right away.\n~~~"
self.check_webhook("issue_comment", TOPIC_ISSUE, expected_message)
def test_issue_comment_deleted_msg(self) -> None:
- expected_topic = "Scheduler / Issue #5 This is a new issue"
- expected_message = "eeshangarg deleted a [comment](https://github.com/eeshangarg/Scheduler/issues/5#issuecomment-425164194) on [Issue #5](https://github.com/eeshangarg/Scheduler/issues/5):\n\n~~~ quote\nThis is a comment on this new issue.\n~~~"
+ expected_topic = "Scheduler / issue #5 This is a new issue"
+ expected_message = "eeshangarg deleted a [comment](https://github.com/eeshangarg/Scheduler/issues/5#issuecomment-425164194) on [issue #5](https://github.com/eeshangarg/Scheduler/issues/5):\n\n~~~ quote\nThis is a comment on this new issue.\n~~~"
self.check_webhook("issue_comment__deleted", expected_topic, expected_message)
def test_issue_comment_msg_with_custom_topic_in_url(self) -> None:
self.url = self.build_webhook_url(topic="notifications")
expected_topic = "notifications"
- expected_message = "baxterthehacker [commented](https://github.com/baxterthehacker/public-repo/issues/2#issuecomment-99262140) on [Issue #2 Spelling error in the README file](https://github.com/baxterthehacker/public-repo/issues/2):\n\n~~~ quote\nYou are totally right! I'll get this fixed right away.\n~~~"
+ expected_message = "baxterthehacker [commented](https://github.com/baxterthehacker/public-repo/issues/2#issuecomment-99262140) on [issue #2 Spelling error in the README file](https://github.com/baxterthehacker/public-repo/issues/2):\n\n~~~ quote\nYou are totally right! I'll get this fixed right away.\n~~~"
self.check_webhook("issue_comment", expected_topic, expected_message)
def test_issue_msg(self) -> None:
- expected_message = "baxterthehacker opened [Issue #2](https://github.com/baxterthehacker/public-repo/issues/2):\n\n~~~ quote\nIt looks like you accidentally spelled 'commit' with two 't's.\n~~~"
+ expected_message = "baxterthehacker opened [issue #2](https://github.com/baxterthehacker/public-repo/issues/2):\n\n~~~ quote\nIt looks like you accidentally spelled 'commit' with two 't's.\n~~~"
self.check_webhook("issues", TOPIC_ISSUE, expected_message)
def test_issue_msg_with_custom_topic_in_url(self) -> None:
self.url = self.build_webhook_url(topic="notifications")
expected_topic = "notifications"
- expected_message = "baxterthehacker opened [Issue #2 Spelling error in the README file](https://github.com/baxterthehacker/public-repo/issues/2):\n\n~~~ quote\nIt looks like you accidentally spelled 'commit' with two 't's.\n~~~"
+ expected_message = "baxterthehacker opened [issue #2 Spelling error in the README file](https://github.com/baxterthehacker/public-repo/issues/2):\n\n~~~ quote\nIt looks like you accidentally spelled 'commit' with two 't's.\n~~~"
self.check_webhook("issues", expected_topic, expected_message)
def test_membership_msg(self) -> None:
@@ -231,23 +231,23 @@ class GitHubWebhookTest(WebhookTestCase):
self.check_webhook("status__with_target_url", TOPIC_REPO, expected_message)
def test_pull_request_review_msg(self) -> None:
- expected_message = "baxterthehacker submitted [PR Review](https://github.com/baxterthehacker/public-repo/pull/1#pullrequestreview-2626884)."
+ expected_message = "baxterthehacker submitted [PR review](https://github.com/baxterthehacker/public-repo/pull/1#pullrequestreview-2626884)."
self.check_webhook("pull_request_review", TOPIC_PR, expected_message)
def test_pull_request_review_msg_with_custom_topic_in_url(self) -> None:
self.url = self.build_webhook_url(topic="notifications")
expected_topic = "notifications"
- expected_message = "baxterthehacker submitted [PR Review for #1 Update the README with new information](https://github.com/baxterthehacker/public-repo/pull/1#pullrequestreview-2626884)."
+ expected_message = "baxterthehacker submitted [PR review for #1 Update the README with new information](https://github.com/baxterthehacker/public-repo/pull/1#pullrequestreview-2626884)."
self.check_webhook("pull_request_review", expected_topic, expected_message)
def test_pull_request_review_comment_msg(self) -> None:
- expected_message = "baxterthehacker created [PR Review Comment](https://github.com/baxterthehacker/public-repo/pull/1#discussion_r29724692):\n\n~~~ quote\nMaybe you should use more emojji on this line.\n~~~"
+ expected_message = "baxterthehacker created [PR review comment](https://github.com/baxterthehacker/public-repo/pull/1#discussion_r29724692):\n\n~~~ quote\nMaybe you should use more emojji on this line.\n~~~"
self.check_webhook("pull_request_review_comment", TOPIC_PR, expected_message)
def test_pull_request_review_comment_with_custom_topic_in_url(self) -> None:
self.url = self.build_webhook_url(topic="notifications")
expected_topic = "notifications"
- expected_message = "baxterthehacker created [PR Review Comment on #1 Update the README with new information](https://github.com/baxterthehacker/public-repo/pull/1#discussion_r29724692):\n\n~~~ quote\nMaybe you should use more emojji on this line.\n~~~"
+ expected_message = "baxterthehacker created [PR review comment on #1 Update the README with new information](https://github.com/baxterthehacker/public-repo/pull/1#discussion_r29724692):\n\n~~~ quote\nMaybe you should use more emojji on this line.\n~~~"
self.check_webhook("pull_request_review_comment", expected_topic, expected_message)
def test_pull_request_locked(self) -> None:
diff --git a/zerver/webhooks/github/view.py b/zerver/webhooks/github/view.py
index 6121a7e07db..62235f15ef4 100644
--- a/zerver/webhooks/github/view.py
+++ b/zerver/webhooks/github/view.py
@@ -434,7 +434,7 @@ def get_pull_request_review_body(helper: Helper) -> str:
get_sender_name(payload),
"submitted",
payload["review"]["html_url"],
- type="PR Review",
+ type="PR review",
title=title if include_title else None,
)
@@ -457,7 +457,7 @@ def get_pull_request_review_comment_body(helper: Helper) -> str:
action,
payload["comment"]["html_url"],
message=message,
- type="PR Review Comment",
+ type="PR review comment",
title=title if include_title else None,
)
@@ -574,7 +574,7 @@ def get_subject_based_on_type(payload: Dict[str, Any], event: str) -> str:
elif event.startswith("issue"):
return TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE.format(
repo=get_repository_name(payload),
- type="Issue",
+ type="issue",
id=payload["issue"]["number"],
title=payload["issue"]["title"],
)
@@ -595,7 +595,7 @@ def get_subject_based_on_type(payload: Dict[str, Any], event: str) -> str:
elif event == "gollum":
return TOPIC_WITH_BRANCH_TEMPLATE.format(
repo=get_repository_name(payload),
- branch="Wiki Pages",
+ branch="wiki pages",
)
elif event == "ping":
if payload.get("repository") is None:
diff --git a/zerver/webhooks/gitlab/doc.md b/zerver/webhooks/gitlab/doc.md
index 08f741eea00..f8022755bc1 100644
--- a/zerver/webhooks/gitlab/doc.md
+++ b/zerver/webhooks/gitlab/doc.md
@@ -4,9 +4,9 @@ Receive GitLab notifications in Zulip!
1. {!create-bot-construct-url-indented.md!}
- By default, the Zulip topics for Merge Requests will contain the
- title of the GitLab Merge Request. You can change the topic format to
- just contain the Merge Request ID by adding
+ By default, the Zulip topics for merge requests will contain the
+ title of the GitLab merge request. You can change the topic format to
+ just contain the merge request ID by adding
`&use_merge_request_title=false` at the end of the URL.
{!git-webhook-url-with-branches-indented.md!}
diff --git a/zerver/webhooks/gitlab/tests.py b/zerver/webhooks/gitlab/tests.py
index 0d64c6d837f..dce0d7e06bf 100644
--- a/zerver/webhooks/gitlab/tests.py
+++ b/zerver/webhooks/gitlab/tests.py
@@ -87,16 +87,16 @@ class GitlabHookTests(WebhookTestCase):
self.check_webhook("tag_push_hook__remove_tag", expected_topic, expected_message)
def test_create_issue_without_assignee_event_message(self) -> None:
- expected_topic = "my-awesome-project / Issue #1 Issue title"
- expected_message = "Tomasz Kolek created [Issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1):\n\n~~~ quote\nIssue description\n~~~"
+ expected_topic = "my-awesome-project / issue #1 Issue title"
+ expected_message = "Tomasz Kolek created [issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1):\n\n~~~ quote\nIssue description\n~~~"
self.check_webhook(
"issue_hook__issue_created_without_assignee", expected_topic, expected_message
)
def test_create_confidential_issue_without_assignee_event_message(self) -> None:
- expected_subject = "testing / Issue #1 Testing"
- expected_message = "Joe Bloggs created [Issue #1](https://gitlab.example.co.uk/joe.bloggs/testing/issues/1):\n\n~~~ quote\nTesting\n~~~"
+ expected_subject = "testing / issue #1 Testing"
+ expected_message = "Joe Bloggs created [issue #1](https://gitlab.example.co.uk/joe.bloggs/testing/issues/1):\n\n~~~ quote\nTesting\n~~~"
self.check_webhook(
"issue_hook__confidential_issue_created_without_assignee",
@@ -107,39 +107,39 @@ class GitlabHookTests(WebhookTestCase):
def test_create_issue_with_custom_topic_in_url(self) -> None:
self.url = self.build_webhook_url(topic="notifications")
expected_topic = "notifications"
- expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek created [Issue #1 Issue title](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1):\n\n~~~ quote\nIssue description\n~~~"
+ expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek created [issue #1 Issue title](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1):\n\n~~~ quote\nIssue description\n~~~"
self.check_webhook(
"issue_hook__issue_created_without_assignee", expected_topic, expected_message
)
def test_create_issue_with_assignee_event_message(self) -> None:
- expected_topic = "my-awesome-project / Issue #1 Issue title"
- expected_message = "Tomasz Kolek created [Issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1) (assigned to Tomasz Kolek):\n\n~~~ quote\nIssue description\n~~~"
+ expected_topic = "my-awesome-project / issue #1 Issue title"
+ expected_message = "Tomasz Kolek created [issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1) (assigned to Tomasz Kolek):\n\n~~~ quote\nIssue description\n~~~"
self.check_webhook(
"issue_hook__issue_created_with_assignee", expected_topic, expected_message
)
def test_create_issue_with_two_assignees_event_message(self) -> None:
- expected_subject = "Zulip GitLab Test / Issue #2 Zulip Test Issue 2"
- expected_message = "Adam Birds created [Issue #2](https://gitlab.com/adambirds/zulip-gitlab-test/issues/2) (assigned to Adam Birds and Eeshan Garg):\n\n~~~ quote\nZulip Test Issue 2\n~~~"
+ expected_subject = "Zulip GitLab Test / issue #2 Zulip Test Issue 2"
+ expected_message = "Adam Birds created [issue #2](https://gitlab.com/adambirds/zulip-gitlab-test/issues/2) (assigned to Adam Birds and Eeshan Garg):\n\n~~~ quote\nZulip Test Issue 2\n~~~"
self.check_webhook(
"issue_hook__issue_created_with_two_assignees", expected_subject, expected_message
)
def test_create_issue_with_three_assignees_event_message(self) -> None:
- expected_subject = "Zulip GitLab Test / Issue #2 Zulip Test Issue 2"
- expected_message = "Adam Birds created [Issue #2](https://gitlab.com/adambirds/zulip-gitlab-test/issues/2) (assigned to Adam Birds, Eeshan Garg and Tim Abbott):\n\n~~~ quote\nZulip Test Issue 2\n~~~"
+ expected_subject = "Zulip GitLab Test / issue #2 Zulip Test Issue 2"
+ expected_message = "Adam Birds created [issue #2](https://gitlab.com/adambirds/zulip-gitlab-test/issues/2) (assigned to Adam Birds, Eeshan Garg and Tim Abbott):\n\n~~~ quote\nZulip Test Issue 2\n~~~"
self.check_webhook(
"issue_hook__issue_created_with_three_assignees", expected_subject, expected_message
)
def test_create_confidential_issue_with_assignee_event_message(self) -> None:
- expected_subject = "testing / Issue #2 Testing"
- expected_message = "Joe Bloggs created [Issue #2](https://gitlab.example.co.uk/joe.bloggs/testing/issues/2) (assigned to Joe Bloggs):\n\n~~~ quote\nTesting\n~~~"
+ expected_subject = "testing / issue #2 Testing"
+ expected_message = "Joe Bloggs created [issue #2](https://gitlab.example.co.uk/joe.bloggs/testing/issues/2) (assigned to Joe Bloggs):\n\n~~~ quote\nTesting\n~~~"
self.check_webhook(
"issue_hook__confidential_issue_created_with_assignee",
@@ -148,8 +148,8 @@ class GitlabHookTests(WebhookTestCase):
)
def test_create_issue_with_hidden_comment_in_description(self) -> None:
- expected_topic = "public-repo / Issue #3 New Issue with hidden comment"
- expected_message = "Eeshan Garg created [Issue #3](https://gitlab.com/eeshangarg/public-repo/issues/3):\n\n~~~ quote\nThis description actually has a hidden comment in it!\n~~~"
+ expected_topic = "public-repo / issue #3 New Issue with hidden comment"
+ expected_message = "Eeshan Garg created [issue #3](https://gitlab.com/eeshangarg/public-repo/issues/3):\n\n~~~ quote\nThis description actually has a hidden comment in it!\n~~~"
self.check_webhook(
"issue_hook__issue_created_with_hidden_comment_in_description",
@@ -158,8 +158,8 @@ class GitlabHookTests(WebhookTestCase):
)
def test_create_confidential_issue_with_hidden_comment_in_description(self) -> None:
- expected_subject = "testing / Issue #1 Testing"
- expected_message = "Joe Bloggs created [Issue #1](https://gitlab.example.co.uk/joe.bloggs/testing/issues/1):\n\n~~~ quote\nThis description actually has a hidden comment in it!\n~~~"
+ expected_subject = "testing / issue #1 Testing"
+ expected_message = "Joe Bloggs created [issue #1](https://gitlab.example.co.uk/joe.bloggs/testing/issues/1):\n\n~~~ quote\nThis description actually has a hidden comment in it!\n~~~"
self.check_webhook(
"issue_hook__confidential_issue_created_with_hidden_comment_in_description",
@@ -168,21 +168,21 @@ class GitlabHookTests(WebhookTestCase):
)
def test_create_issue_with_null_description(self) -> None:
- expected_topic = "my-awesome-project / Issue #7 Issue without description"
- expected_message = "Eeshan Garg created [Issue #7](https://gitlab.com/eeshangarg/my-awesome-project/issues/7)."
+ expected_topic = "my-awesome-project / issue #7 Issue without description"
+ expected_message = "Eeshan Garg created [issue #7](https://gitlab.com/eeshangarg/my-awesome-project/issues/7)."
self.check_webhook(
"issue_hook__issue_opened_with_null_description", expected_topic, expected_message
)
def test_update_issue_event_message(self) -> None:
- expected_topic = "my-awesome-project / Issue #1 Issue title_new"
- expected_message = "Tomasz Kolek updated [Issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1)."
+ expected_topic = "my-awesome-project / issue #1 Issue title_new"
+ expected_message = "Tomasz Kolek updated [issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1)."
self.check_webhook("issue_hook__issue_updated", expected_topic, expected_message)
def test_update_confidential_issue_event_message(self) -> None:
- expected_subject = "testing / Issue #1 Testing"
- expected_message = "Joe Bloggs updated [Issue #1](https://gitlab.example.co.uk/joe.bloggs/testing/issues/1)."
+ expected_subject = "testing / issue #1 Testing"
+ expected_message = "Joe Bloggs updated [issue #1](https://gitlab.example.co.uk/joe.bloggs/testing/issues/1)."
self.check_webhook(
"issue_hook__confidential_issue_updated", expected_subject, expected_message
@@ -191,33 +191,33 @@ class GitlabHookTests(WebhookTestCase):
def test_update_issue_with_custom_topic_in_url(self) -> None:
self.url = self.build_webhook_url(topic="notifications")
expected_topic = "notifications"
- expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek updated [Issue #1 Issue title_new](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1)."
+ expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek updated [issue #1 Issue title_new](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1)."
self.check_webhook("issue_hook__issue_updated", expected_topic, expected_message)
def test_close_issue_event_message(self) -> None:
- expected_topic = "my-awesome-project / Issue #1 Issue title_new"
- expected_message = "Tomasz Kolek closed [Issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1)."
+ expected_topic = "my-awesome-project / issue #1 Issue title_new"
+ expected_message = "Tomasz Kolek closed [issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1)."
self.check_webhook("issue_hook__issue_closed", expected_topic, expected_message)
def test_close_confidential_issue_event_message(self) -> None:
- expected_subject = "testing / Issue #1 Testing Test"
- expected_message = "Joe Bloggs closed [Issue #1](https://gitlab.example.co.uk/joe.bloggs/testing/issues/1)."
+ expected_subject = "testing / issue #1 Testing Test"
+ expected_message = "Joe Bloggs closed [issue #1](https://gitlab.example.co.uk/joe.bloggs/testing/issues/1)."
self.check_webhook(
"issue_hook__confidential_issue_closed", expected_subject, expected_message
)
def test_reopen_issue_event_message(self) -> None:
- expected_topic = "my-awesome-project / Issue #1 Issue title_new"
- expected_message = "Tomasz Kolek reopened [Issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1)."
+ expected_topic = "my-awesome-project / issue #1 Issue title_new"
+ expected_message = "Tomasz Kolek reopened [issue #1](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/1)."
self.check_webhook("issue_hook__issue_reopened", expected_topic, expected_message)
def test_reopen_confidential_issue_event_message(self) -> None:
- expected_subject = "testing / Issue #1 Testing Test"
- expected_message = "Joe Bloggs reopened [Issue #1](https://gitlab.example.co.uk/joe.bloggs/testing/issues/1)."
+ expected_subject = "testing / issue #1 Testing Test"
+ expected_message = "Joe Bloggs reopened [issue #1](https://gitlab.example.co.uk/joe.bloggs/testing/issues/1)."
self.check_webhook(
"issue_hook__confidential_issue_reopened", expected_subject, expected_message
@@ -250,34 +250,34 @@ class GitlabHookTests(WebhookTestCase):
self.check_webhook("note_hook__merge_request_note", expected_topic, expected_message)
def test_note_issue_event_message(self) -> None:
- expected_topic = "my-awesome-project / Issue #2 abc"
- expected_message = "Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2#note_14172057) on [Issue #2](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2):\n\n~~~ quote\nNice issue\n~~~"
+ expected_topic = "my-awesome-project / issue #2 abc"
+ expected_message = "Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2#note_14172057) on [issue #2](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2):\n\n~~~ quote\nNice issue\n~~~"
self.check_webhook("note_hook__issue_note", expected_topic, expected_message)
def test_note_confidential_issue_event_message(self) -> None:
- expected_subject = "Test / Issue #3 Test"
- expected_message = "Joe Bloggs [commented](https://gitlab.com/joebloggs/test/issues/3#note_101638770) on [Issue #3](https://gitlab.com/joebloggs/test/issues/3):\n\n~~~ quote\nTest\n~~~"
+ expected_subject = "Test / issue #3 Test"
+ expected_message = "Joe Bloggs [commented](https://gitlab.com/joebloggs/test/issues/3#note_101638770) on [issue #3](https://gitlab.com/joebloggs/test/issues/3):\n\n~~~ quote\nTest\n~~~"
self.check_webhook("note_hook__confidential_issue_note", expected_subject, expected_message)
def test_note_issue_with_custom_topic_in_url(self) -> None:
self.url = self.build_webhook_url(topic="notifications")
expected_topic = "notifications"
- expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2#note_14172057) on [Issue #2 abc](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2):\n\n~~~ quote\nNice issue\n~~~"
+ expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2#note_14172057) on [issue #2 abc](https://gitlab.com/tomaszkolek0/my-awesome-project/issues/2):\n\n~~~ quote\nNice issue\n~~~"
self.check_webhook("note_hook__issue_note", expected_topic, expected_message)
def test_note_snippet_event_message(self) -> None:
- expected_topic = "my-awesome-project / Snippet #2 test"
- expected_message = "Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2#note_14172058) on [Snippet #2](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2):\n\n~~~ quote\nNice snippet\n~~~"
+ expected_topic = "my-awesome-project / snippet #2 test"
+ expected_message = "Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2#note_14172058) on [snippet #2](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2):\n\n~~~ quote\nNice snippet\n~~~"
self.check_webhook("note_hook__snippet_note", expected_topic, expected_message)
def test_note_snippet_with_custom_topic_in_url(self) -> None:
self.url = self.build_webhook_url(topic="notifications")
expected_topic = "notifications"
- expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2#note_14172058) on [Snippet #2 test](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2):\n\n~~~ quote\nNice snippet\n~~~"
+ expected_message = "[[my-awesome-project](https://gitlab.com/tomaszkolek0/my-awesome-project)] Tomasz Kolek [commented](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2#note_14172058) on [snippet #2 test](https://gitlab.com/tomaszkolek0/my-awesome-project/snippets/2):\n\n~~~ quote\nNice snippet\n~~~"
self.check_webhook("note_hook__snippet_note", expected_topic, expected_message)
@@ -391,13 +391,13 @@ A trivial change that should probably be ignored.
def test_wiki_page_opened_event_message(self) -> None:
expected_topic = "my-awesome-project"
- expected_message = 'Tomasz Kolek created [Wiki Page "how to"](https://gitlab.com/tomaszkolek0/my-awesome-project/wikis/how-to).'
+ expected_message = 'Tomasz Kolek created [wiki page "how to"](https://gitlab.com/tomaszkolek0/my-awesome-project/wikis/how-to).'
self.check_webhook("wiki_page_hook__wiki_page_opened", expected_topic, expected_message)
def test_wiki_page_edited_event_message(self) -> None:
expected_topic = "my-awesome-project"
- expected_message = 'Tomasz Kolek updated [Wiki Page "how to"](https://gitlab.com/tomaszkolek0/my-awesome-project/wikis/how-to).'
+ expected_message = 'Tomasz Kolek updated [wiki page "how to"](https://gitlab.com/tomaszkolek0/my-awesome-project/wikis/how-to).'
self.check_webhook("wiki_page_hook__wiki_page_edited", expected_topic, expected_message)
diff --git a/zerver/webhooks/gitlab/view.py b/zerver/webhooks/gitlab/view.py
index 9e48d03182d..f1f50dc1962 100644
--- a/zerver/webhooks/gitlab/view.py
+++ b/zerver/webhooks/gitlab/view.py
@@ -229,7 +229,7 @@ def get_commented_issue_event_body(payload: Dict[str, Any], include_title: bool
url,
payload["issue"].get("iid"),
message=comment["note"],
- type="Issue",
+ type="issue",
title=payload["issue"].get("title") if include_title else None,
)
@@ -248,13 +248,13 @@ def get_commented_snippet_event_body(payload: Dict[str, Any], include_title: boo
url,
payload["snippet"].get("id"),
message=comment["note"],
- type="Snippet",
+ type="snippet",
title=payload["snippet"].get("title") if include_title else None,
)
def get_wiki_page_event_body(payload: Dict[str, Any], action: str) -> str:
- return '{} {} [Wiki Page "{}"]({}).'.format(
+ return '{} {} [wiki page "{}"]({}).'.format(
get_issue_user_name(payload),
action,
payload["object_attributes"].get("title"),
@@ -448,14 +448,14 @@ def get_subject_based_on_event(
elif event.startswith("Issue Hook") or event.startswith("Confidential Issue Hook"):
return TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE.format(
repo=get_repo_name(payload),
- type="Issue",
+ type="issue",
id=payload["object_attributes"].get("iid"),
title=payload["object_attributes"].get("title"),
)
elif event == "Note Hook Issue" or event == "Confidential Note Hook Issue":
return TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE.format(
repo=get_repo_name(payload),
- type="Issue",
+ type="issue",
id=payload["issue"].get("iid"),
title=payload["issue"].get("title"),
)
@@ -470,7 +470,7 @@ def get_subject_based_on_event(
elif event == "Note Hook Snippet":
return TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE.format(
repo=get_repo_name(payload),
- type="Snippet",
+ type="snippet",
id=payload["snippet"].get("id"),
title=payload["snippet"].get("title"),
)
diff --git a/zerver/webhooks/gogs/tests.py b/zerver/webhooks/gogs/tests.py
index 1455b4f0123..e5d92d81769 100644
--- a/zerver/webhooks/gogs/tests.py
+++ b/zerver/webhooks/gogs/tests.py
@@ -99,38 +99,38 @@ class GogsHookTests(WebhookTestCase):
self.check_webhook("pull_request__synchronized", expected_topic, expected_message)
def test_issues_opened(self) -> None:
- expected_topic = "test / Issue #3 New test issue"
- expected_message = """kostekIV opened [Issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nTest\n~~~"""
+ expected_topic = "test / issue #3 New test issue"
+ expected_message = """kostekIV opened [issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nTest\n~~~"""
self.check_webhook("issues__opened", expected_topic, expected_message)
def test_issues_reopened(self) -> None:
- expected_topic = "test / Issue #3 New test issue"
- expected_message = """kostekIV reopened [Issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nTest\n~~~"""
+ expected_topic = "test / issue #3 New test issue"
+ expected_message = """kostekIV reopened [issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nTest\n~~~"""
self.check_webhook("issues__reopened", expected_topic, expected_message)
def test_issues_edited(self) -> None:
- expected_topic = "test / Issue #3 New test issue"
- expected_message = """kostekIV edited [Issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nTest edit\n~~~"""
+ expected_topic = "test / issue #3 New test issue"
+ expected_message = """kostekIV edited [issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nTest edit\n~~~"""
self.check_webhook("issues__edited", expected_topic, expected_message)
def test_issues_assignee(self) -> None:
- expected_topic = "test / Issue #3 New test issue"
- expected_message = """kostekIV assigned [Issue #3](https://try.gogs.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest\n~~~"""
+ expected_topic = "test / issue #3 New test issue"
+ expected_message = """kostekIV assigned [issue #3](https://try.gogs.io/kostekIV/test/issues/3) (assigned to kostekIV):\n\n~~~ quote\nTest\n~~~"""
self.check_webhook("issues__assigned", expected_topic, expected_message)
def test_issues_closed(self) -> None:
- expected_topic = "test / Issue #3 New test issue"
- expected_message = """kostekIV closed [Issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nClosed #3\n~~~"""
+ expected_topic = "test / issue #3 New test issue"
+ expected_message = """kostekIV closed [issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nClosed #3\n~~~"""
self.check_webhook("issues__closed", expected_topic, expected_message)
def test_issue_comment_new(self) -> None:
- expected_topic = "test / Issue #3 New test issue"
- expected_message = """kostekIV [commented](https://try.gogs.io/kostekIV/test/issues/3#issuecomment-3635) on [Issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nTest comment\n~~~"""
+ expected_topic = "test / issue #3 New test issue"
+ expected_message = """kostekIV [commented](https://try.gogs.io/kostekIV/test/issues/3#issuecomment-3635) on [issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nTest comment\n~~~"""
self.check_webhook("issue_comment__new", expected_topic, expected_message)
def test_issue_comment_edited(self) -> None:
- expected_topic = "test / Issue #3 New test issue"
- expected_message = """kostekIV edited a [comment](https://try.gogs.io/kostekIV/test/issues/3#issuecomment-3634) on [Issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nedit comment\n~~~"""
+ expected_topic = "test / issue #3 New test issue"
+ expected_message = """kostekIV edited a [comment](https://try.gogs.io/kostekIV/test/issues/3#issuecomment-3634) on [issue #3](https://try.gogs.io/kostekIV/test/issues/3):\n\n~~~ quote\nedit comment\n~~~"""
self.check_webhook("issue_comment__edited", expected_topic, expected_message)
def test_release_published(self) -> None:
diff --git a/zerver/webhooks/gogs/view.py b/zerver/webhooks/gogs/view.py
index d6b5c58097c..a253fc84fed 100644
--- a/zerver/webhooks/gogs/view.py
+++ b/zerver/webhooks/gogs/view.py
@@ -198,7 +198,7 @@ def gogs_webhook_main(
)
topic = TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE.format(
repo=repo,
- type="Issue",
+ type="issue",
id=payload["issue"]["number"],
title=payload["issue"]["title"],
)
@@ -209,7 +209,7 @@ def gogs_webhook_main(
)
topic = TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE.format(
repo=repo,
- type="Issue",
+ type="issue",
id=payload["issue"]["number"],
title=payload["issue"]["title"],
)
diff --git a/zerver/webhooks/gosquared/tests.py b/zerver/webhooks/gosquared/tests.py
index ef2de660b47..6d33f271815 100644
--- a/zerver/webhooks/gosquared/tests.py
+++ b/zerver/webhooks/gosquared/tests.py
@@ -22,7 +22,7 @@ class GoSquaredHookTests(WebhookTestCase):
)
def test_chat_message(self) -> None:
- expected_topic = "Live Chat Session - Zulip Chat"
+ expected_topic = "Live chat session - Zulip Chat"
expected_message = CHAT_MESSAGE_TEMPLATE.format(
status="visitor",
name="John Smith",
diff --git a/zerver/webhooks/gosquared/view.py b/zerver/webhooks/gosquared/view.py
index a26231f95f0..7e2a2df5451 100644
--- a/zerver/webhooks/gosquared/view.py
+++ b/zerver/webhooks/gosquared/view.py
@@ -48,7 +48,7 @@ def api_gosquared_webhook(
# Only support non-private messages
if not payload["message"]["private"]:
session_title = payload["message"]["session"]["title"]
- topic = f"Live Chat Session - {session_title}"
+ topic = f"Live chat session - {session_title}"
body = CHAT_MESSAGE_TEMPLATE.format(
status=payload["person"]["status"],
name=payload["person"]["_anon"]["name"],
diff --git a/zerver/webhooks/jira/doc.md b/zerver/webhooks/jira/doc.md
index 47ae275bf11..92cbccc5ec6 100644
--- a/zerver/webhooks/jira/doc.md
+++ b/zerver/webhooks/jira/doc.md
@@ -1,13 +1,13 @@
-Get Zulip notifications for your JIRA projects!
+Get Zulip notifications for your Jira projects!
-These instructions apply to Atlassian Cloud's hosted JIRA, and JIRA Server version
-5.2 or greater. For older installs, you'll need our [JIRA Plugin](./jira-plugin).
+These instructions apply to Atlassian Cloud's hosted Jira, and Jira Server version
+5.2 or greater. For older installs, you'll need our [Jira plugin](./jira-plugin).
1. {!create-stream.md!}
1. {!create-bot-construct-url-indented.md!}
-1. Go to your JIRA **Site administration** page. Click **Jira** on the left.
+1. Go to your Jira **Site administration** page. Click **Jira** on the left.
On the left sidebar, scroll down, and under **Advanced**, click **WebHooks**.
Click **+ Create a WebHook**.
diff --git a/zerver/webhooks/jira/view.py b/zerver/webhooks/jira/view.py
index eb6c0b4460d..16bb75468ce 100644
--- a/zerver/webhooks/jira/view.py
+++ b/zerver/webhooks/jira/view.py
@@ -42,7 +42,7 @@ def guess_zulip_user_from_jira(jira_username: str, realm: Realm) -> Optional[Use
def convert_jira_markup(content: str, realm: Realm) -> str:
- # Attempt to do some simplistic conversion of JIRA
+ # Attempt to do some simplistic conversion of Jira
# formatting to Markdown, for consumption in Zulip
# Jira uses *word* for bold, we use **word**
@@ -75,8 +75,8 @@ def convert_jira_markup(content: str, realm: Realm) -> str:
full_link_re = re.compile(r"\[(?:(?P<title>[^|~]+)\|)(?P<url>[^\]]*)\]")
content = re.sub(full_link_re, r"[\g<title>](\g<url>)", content)
- # Try to convert a JIRA user mention of format [~username] into a
- # Zulip user mention. We don't know the email, just the JIRA username,
+ # Try to convert a Jira user mention of format [~username] into a
+ # Zulip user mention. We don't know the email, just the Jira username,
# so we naively guess at their Zulip account using this
if realm:
mention_re = re.compile("\\[~(.*?)\\]")
@@ -337,7 +337,7 @@ JIRA_CONTENT_FUNCTION_MAPPER: Dict[
}
-@webhook_view("JIRA")
+@webhook_view("Jira")
@has_request_variables
def api_jira_webhook(
request: HttpRequest,
diff --git a/zerver/webhooks/semaphore/tests.py b/zerver/webhooks/semaphore/tests.py
index 44ba6c07c8e..1e6b3b1592f 100644
--- a/zerver/webhooks/semaphore/tests.py
+++ b/zerver/webhooks/semaphore/tests.py
@@ -75,7 +75,7 @@ class SemaphoreHookTests(WebhookTestCase):
expected_topic = "notifications/test-notifications"
expected_message = """
[Notifications](https://semaphore.semaphoreci.com/workflows/84383f37-d025-4811-b719-61c6acc92a1e) pipeline **failed**:
-* **Pull Request**: [Testing PR notifications](https://github.com/renderedtext/notifications/pull/3)
+* **Pull request**: [Testing PR notifications](https://github.com/renderedtext/notifications/pull/3)
* **Branch**: test-notifications
* **Author**: [radwo](https://github.com/radwo)
""".strip()
@@ -87,7 +87,7 @@ class SemaphoreHookTests(WebhookTestCase):
expected_topic = "notifications/test-notifications"
expected_message = """
[Notifications](https://semaphore.semaphoreci.com/workflows/84383f37-d025-4811-b719-61c6acc92a1e) pipeline **failed**:
-* **Pull Request**: Testing PR notifications (#3)
+* **Pull request**: Testing PR notifications (#3)
* **Branch**: test-notifications
* **Author**: radwo
""".strip()
diff --git a/zerver/webhooks/semaphore/view.py b/zerver/webhooks/semaphore/view.py
index 1d223d8bb82..eb24958f267 100644
--- a/zerver/webhooks/semaphore/view.py
+++ b/zerver/webhooks/semaphore/view.py
@@ -10,7 +10,7 @@ from zerver.lib.response import json_success
from zerver.lib.webhooks.common import check_send_webhook_message
from zerver.models import UserProfile
-# Semaphore Classic Templates
+# Semaphore Classic templates
BUILD_TEMPLATE = """
[Build {build_number}]({build_url}) {status}:
@@ -25,7 +25,7 @@ DEPLOY_TEMPLATE = """
* **Server**: {server_name}
""".strip()
-# Semaphore 2.0 Templates
+# Semaphore 2.0 templates
# Currently, Semaphore 2.0 only supports GitHub, while Semaphore Classic
# supports Bitbucket too. The payload does not have URLs for commits, tags,
@@ -49,14 +49,14 @@ PUSH_TEMPLATE = """
GH_PULL_REQUEST_TEMPLATE = """
[{pipeline_name}]({workflow_url}) pipeline **{pipeline_result}**:
-* **Pull Request**: [{pull_request_title}]({pull_request_url})
+* **Pull request**: [{pull_request_title}]({pull_request_url})
* **Branch**: {branch_name}
* **Author**: [{author_name}]({author_url})
""".strip()
PULL_REQUEST_TEMPLATE = """
[{pipeline_name}]({workflow_url}) pipeline **{pipeline_result}**:
-* **Pull Request**: {pull_request_title} (#{pull_request_number})
+* **Pull request**: {pull_request_title} (#{pull_request_number})
* **Branch**: {branch_name}
* **Author**: {author_name}
""".strip()
diff --git a/zerver/webhooks/sentry/view.py b/zerver/webhooks/sentry/view.py
index 251b46ff455..09ee207a360 100644
--- a/zerver/webhooks/sentry/view.py
+++ b/zerver/webhooks/sentry/view.py
@@ -230,7 +230,7 @@ def transform_webhook_payload(payload: Dict[str, Any]) -> Optional[Dict[str, Any
"""Attempt to use webhook payload for the notification.
When the integration is configured as a webhook, instead of being added as
- an Internal Integration, the payload is slightly different, but has all the
+ an internal integration, the payload is slightly different, but has all the
required information for sending a notification. We transform this payload to
look like the payload from a "properly configured" integration.
"""
diff --git a/zerver/webhooks/thinkst/tests.py b/zerver/webhooks/thinkst/tests.py
index eaadd1174f4..d5303debf59 100644
--- a/zerver/webhooks/thinkst/tests.py
+++ b/zerver/webhooks/thinkst/tests.py
@@ -10,7 +10,7 @@ class ThinkstHookTests(WebhookTestCase):
expected_message = (
"**:alert: Canary *0000000testnode* has been triggered!**\n\n"
"This is a dummy incident.\n\n"
- "**Incident Id:** `aa875f255f94e3ffe40dc85cf1a8b1e0`\n"
+ "**Incident ID:** `aa875f255f94e3ffe40dc85cf1a8b1e0`\n"
"**Kind:** Dummy Incident\n"
"**Timestamp:** 2020-06-09 13:59:38 (UTC)\n"
"**Canary IP:** `1.1.1.1`\n"
@@ -33,11 +33,11 @@ class ThinkstHookTests(WebhookTestCase):
"**:alert: Canary *foo-bar* has been triggered!**\n\n"
"A portscan has been done on several of your canaries by the host "
"1.1.1.1.\n\n"
- "**Incident Id:** `3f25fec9e18c7673dcc468800b7af0a6`\n"
+ "**Incident ID:** `3f25fec9e18c7673dcc468800b7af0a6`\n"
"**Kind:** Consolidated Network Port Scan\n"
"**Timestamp:** 2020-07-20 16:18:40 (UTC)\n"
"**Canary IP:** `1.1.1.1`\n"
- "**Canary Location:** dining room\n"
+ "**Canary location:** dining room\n"
"**Source IP:** `1.1.1.1`\n"
"**Reverse DNS:** `attacker.local`\n"
"**Incident:** Consolidated Network Port Scan\n"
@@ -58,11 +58,11 @@ class ThinkstHookTests(WebhookTestCase):
"**:alert: Canary *bar-foo* has been triggered!**\n\n"
"Shared File (Re)Opened has been detected against one of your Canaries "
"(bar-foo) at 1.1.1.1.\n\n"
- "**Incident Id:** `a7bb317ba2072415462233cef3bc615a`\n"
+ "**Incident ID:** `a7bb317ba2072415462233cef3bc615a`\n"
"**Kind:** Shared File (Re)Opened\n"
"**Timestamp:** 2020-07-20 16:27:20 (UTC)\n"
"**Canary IP:** `1.1.1.1`\n"
- "**Canary Location:** dining room\n"
+ "**Canary location:** dining room\n"
"**Source IP:** `1.1.1.1`\n"
"**User:** guest\n"
"**Filename:** secret/bar.doc\n"
@@ -85,11 +85,11 @@ class ThinkstHookTests(WebhookTestCase):
"**:alert: Canary *foo-bar* has been triggered!**\n\n"
"Host Port Scan has been detected against one of your Canaries "
"(foo-bar) at 1.1.1.1.\n\n"
- "**Incident Id:** `9060473d2da98afe494adad648495620`\n"
+ "**Incident ID:** `9060473d2da98afe494adad648495620`\n"
"**Kind:** Host Port Scan\n"
"**Timestamp:** 2020-07-20 16:26:30 (UTC)\n"
"**Canary IP:** `1.1.1.1`\n"
- "**Canary Location:** dining room\n"
+ "**Canary location:** dining room\n"
"**Source IP:** `1.1.1.1`\n"
"**Reverse DNS:** `attacker.local`\n"
"**Partial Ports:** 443, 554, 80, 1723, 22"
@@ -107,11 +107,11 @@ class ThinkstHookTests(WebhookTestCase):
"**:alert: Canary *foo-bar* has been triggered!**\n\n"
"HTTP Login Attempt has been detected against one of your Canaries "
"(foo-bar) at 1.1.1.1.\n\n"
- "**Incident Id:** `1ef86f5cf4090a5252c6f453c5cd46bd`\n"
+ "**Incident ID:** `1ef86f5cf4090a5252c6f453c5cd46bd`\n"
"**Kind:** HTTP Login Attempt\n"
"**Timestamp:** 2020-07-20 14:55:45 (UTC)\n"
"**Canary IP:** `1.1.1.1`\n"
- "**Canary Location:** dining room\n"
+ "**Canary location:** dining room\n"
"**Source IP:** `1.1.1.1`\n"
"**Username:** regular\n"
"**Password:** `*******`\n"
@@ -132,11 +132,11 @@ class ThinkstHookTests(WebhookTestCase):
"**:alert: Canary *foo-bar* has been triggered!**\n\n"
"SSH Login Attempt has been detected against one of your Canaries "
"(foo-bar) at 1.1.1.1.\n\n"
- "**Incident Id:** `4ef51a936d05e0a6b4846378c8c38d2c`\n"
+ "**Incident ID:** `4ef51a936d05e0a6b4846378c8c38d2c`\n"
"**Kind:** SSH Login Attempt\n"
"**Timestamp:** 2020-07-20 16:26:22 (UTC)\n"
"**Canary IP:** `1.1.1.1`\n"
- "**Canary Location:** dining room\n"
+ "**Canary location:** dining room\n"
"**Source IP:** `1.1.1.1`\n"
"**Reverse DNS:** `attacker.local`\n"
"**Username:** foo\n"
@@ -156,7 +156,7 @@ class ThinkstHookTests(WebhookTestCase):
expected_message = (
"**:alert: Canary *0000000testnode* has been triggered!**\n\n"
"This is a dummy incident.\n\n"
- "**Incident Id:** `aa875f255f94e3ffe40dc85cf1a8b1e0`\n"
+ "**Incident ID:** `aa875f255f94e3ffe40dc85cf1a8b1e0`\n"
"**Kind:** Dummy Incident\n"
"**Timestamp:** 2020-06-09 13:59:38 (UTC)\n"
"**Canary IP:** `1.1.1.1`\n"
@@ -179,7 +179,7 @@ class ThinkstHookTests(WebhookTestCase):
"**:alert: Canarytoken *test document* has been triggered!**\n\n"
"A MS Word .docx Document Canarytoken has been triggered over doc-msword "
"by the source IP 1.1.1.1.\n\n"
- "**Incident Id:** `db6f9b5528c6c6c385cb3bb63f5949c8`\n"
+ "**Incident ID:** `db6f9b5528c6c6c385cb3bb63f5949c8`\n"
"**Token:** `dbwx4d68flwh2u5zku56nogu6`\n"
"**Kind:** MS Word .docx Document\n"
"**Timestamp:** 2020-07-20 14:40:15 (UTC)\n"
@@ -206,7 +206,7 @@ class ThinkstHookTests(WebhookTestCase):
"**:alert: Canarytoken *test image* has been triggered!**\n\n"
"A Remote Web Image Canarytoken has been triggered over web-image by the "
"source IP 1.1.1.1.\n\n"
- "**Incident Id:** `533395067f6d655cd19384bc6991cc0f`\n"
+ "**Incident ID:** `533395067f6d655cd19384bc6991cc0f`\n"
"**Token:** `ew5n8gqtb82m4uegrttarn2zu`\n"
"**Kind:** Remote Web Image\n"
"**Timestamp:** 2020-07-20 16:33:12 (UTC)\n"
@@ -237,7 +237,7 @@ class ThinkstHookTests(WebhookTestCase):
"**:alert: Canarytoken *test document* has been triggered!**\n\n"
"A MS Word .docx Document Canarytoken has been triggered over doc-msword "
"by the source IP 1.1.1.1.\n\n"
- "**Incident Id:** `db6f9b5528c6c6c385cb3bb63f5949c8`\n"
+ "**Incident ID:** `db6f9b5528c6c6c385cb3bb63f5949c8`\n"
"**Token:** `dbwx4d68flwh2u5zku56nogu6`\n"
"**Kind:** MS Word .docx Document\n"
"**Timestamp:** 2020-07-20 14:40:15 (UTC)\n"
diff --git a/zerver/webhooks/thinkst/view.py b/zerver/webhooks/thinkst/view.py
index 2dea1671b65..77f7cbe1b4d 100644
--- a/zerver/webhooks/thinkst/view.py
+++ b/zerver/webhooks/thinkst/view.py
@@ -64,7 +64,7 @@ def body(message: Dict[str, Any]) -> str:
body = f"**:alert: {title} *{name}* has been triggered!**\n\n{message['Intro']}\n\n"
if "IncidentHash" in message:
- body += f"**Incident Id:** `{message['IncidentHash']}`\n"
+ body += f"**Incident ID:** `{message['IncidentHash']}`\n"
if "Token" in message:
body += f"**Token:** `{message['Token']}`\n"
@@ -79,7 +79,7 @@ def body(message: Dict[str, Any]) -> str:
body += f"**Canary IP:** `{message['CanaryIP']}`\n"
if "CanaryLocation" in message:
- body += f"**Canary Location:** {message['CanaryLocation']}\n"
+ body += f"**Canary location:** {message['CanaryLocation']}\n"
if "Triggered" in message:
unit = "times" if message["Triggered"] > 1 else "time"
diff --git a/zerver/webhooks/wordpress/tests.py b/zerver/webhooks/wordpress/tests.py
index 15b425800e9..a12fc8ceaaf 100644
--- a/zerver/webhooks/wordpress/tests.py
+++ b/zerver/webhooks/wordpress/tests.py
@@ -33,8 +33,8 @@ class WordPressHookTests(WebhookTestCase):
def test_publish_post_no_data_provided(self) -> None:
# Note: the fixture includes 'hook=publish_post' because it's always added by HookPress
- expected_topic = "WordPress Notification"
- expected_message = "New post published:\n* [New WordPress Post](WordPress Post URL)"
+ expected_topic = "WordPress notification"
+ expected_message = "New post published:\n* [New WordPress post](WordPress post URL)"
self.check_webhook(
"publish_post_no_data_provided",
@@ -99,7 +99,7 @@ class WordPressHookTests(WebhookTestCase):
result = self.client_post(self.url, "unknown_action", **post_params)
# check that we got the expected error message
- self.assert_json_error(result, "Unknown WordPress webhook action: WordPress Action")
+ self.assert_json_error(result, "Unknown WordPress webhook action: WordPress action")
def test_unknown_action_no_hook_provided(self) -> None:
@@ -113,7 +113,7 @@ class WordPressHookTests(WebhookTestCase):
}
result = self.client_post(self.url, "unknown_action", **post_params)
- self.assert_json_error(result, "Unknown WordPress webhook action: WordPress Action")
+ self.assert_json_error(result, "Unknown WordPress webhook action: WordPress action")
def get_body(self, fixture_name: str) -> str:
return self.webhook_fixture_data("wordpress", fixture_name, file_type="txt")
diff --git a/zerver/webhooks/wordpress/view.py b/zerver/webhooks/wordpress/view.py
index 91342ad96cd..fe2839eff9e 100644
--- a/zerver/webhooks/wordpress/view.py
+++ b/zerver/webhooks/wordpress/view.py
@@ -25,13 +25,13 @@ WP_LOGIN_TEMPLATE = "User {name} logged in."
def api_wordpress_webhook(
request: HttpRequest,
user_profile: UserProfile,
- hook: str = REQ(default="WordPress Action"),
- post_title: str = REQ(default="New WordPress Post"),
+ hook: str = REQ(default="WordPress action"),
+ post_title: str = REQ(default="New WordPress post"),
post_type: str = REQ(default="post"),
- post_url: str = REQ(default="WordPress Post URL"),
- display_name: str = REQ(default="New User Name"),
- user_email: str = REQ(default="New User Email"),
- user_login: str = REQ(default="Logged in User"),
+ post_url: str = REQ(default="WordPress post URL"),
+ display_name: str = REQ(default="New user name"),
+ user_email: str = REQ(default="New user email"),
+ user_login: str = REQ(default="Logged in user"),
) -> HttpResponse:
# remove trailing whitespace (issue for some test fixtures)
hook = hook.rstrip()
@@ -48,7 +48,7 @@ def api_wordpress_webhook(
else:
return json_error(_("Unknown WordPress webhook action: {}").format(hook))
- topic = "WordPress Notification"
+ topic = "WordPress notification"
check_send_webhook_message(request, user_profile, topic, data)
return json_success()
diff --git a/zproject/dev_urls.py b/zproject/dev_urls.py
index 8aec120e150..076ddd1f418 100644
--- a/zproject/dev_urls.py
+++ b/zproject/dev_urls.py
@@ -67,7 +67,7 @@ urls = [
path("emails/clear/", clear_emails),
# Listing of useful URLs and various tools for development
path("devtools/", TemplateView.as_view(template_name="zerver/development/dev_tools.html")),
- # Register New User and Realm
+ # Register new user and realm
path("devtools/register_user/", register_development_user, name="register_dev_user"),
path("devtools/register_realm/", register_development_realm, name="register_dev_realm"),
# Have easy access for error pages
diff --git a/zproject/prod_settings_template.py b/zproject/prod_settings_template.py
index 2f9db977717..a73b41ba764 100644
--- a/zproject/prod_settings_template.py
+++ b/zproject/prod_settings_template.py
@@ -294,7 +294,7 @@ AUTH_LDAP_USER_ATTR_MAP = {
## based on your value for EXTERNAL_HOST.
## (3) For "scopes", select only "read_user", and create the application.
## (4) You'll end up on a page with the Application ID and Secret for
-## your new GitLab Application. Use the Application ID as
+## your new GitLab application. Use the Application ID as
## `SOCIAL_AUTH_GITLAB_KEY` here, and put the Secret in
## zulip-secrets.conf as `social_auth_gitlab_secret`.
## (5) If you are self-hosting GitLab, provide the URL of the
@@ -341,10 +341,10 @@ AUTH_LDAP_USER_ATTR_MAP = {
# SOCIAL_AUTH_SUBDOMAIN = 'auth'
########
-## SAML Authentication
+## SAML authentication
##
## For SAML authentication, you will need to configure the settings
-## below using information from your SAML Identity Provider, as
+## below using information from your SAML identity provider, as
## explained in:
##
## https://zulip.readthedocs.io/en/latest/production/authentication-methods.html#saml
@@ -572,7 +572,7 @@ SOCIAL_AUTH_SAML_SUPPORT_CONTACT = {
## Controls the Zoom video call integration. See:
## https://zulip.readthedocs.io/en/latest/production/video-calls.html
#
-# VIDEO_ZOOM_CLIENT_ID = <your Zoom Client ID>
+# VIDEO_ZOOM_CLIENT_ID = <your Zoom client ID>
## Controls the Jitsi Meet video call integration. By default, the
## integration uses the SaaS https://meet.jit.si server. You can specify