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 grammar errors found by mwic.

Anders Kaseorg835ee69c80e5
diff --git a/Dockerfile-postgresql b/Dockerfile-postgresql
index 15cfdc04524..dc96a117c72 100644
--- a/Dockerfile-postgresql
+++ b/Dockerfile-postgresql
@@ -8,7 +8,7 @@
# -f ./Dockerfile-postgresql -t zulip/zulip-postgresql:14 --push .
# Currently the PostgreSQL images do not support automatic upgrading of
-# the on-disk data in volumes. So the base image can not currently be upgraded
+# the on-disk data in volumes. So the base image cannot currently be upgraded
# without users needing a manual pgdump and restore.
# https://hub.docker.com/r/groonga/pgroonga/tags
diff --git a/docs/documentation/api.md b/docs/documentation/api.md
index 6159bb94ba4..05f50624c7e 100644
--- a/docs/documentation/api.md
+++ b/docs/documentation/api.md
@@ -469,7 +469,7 @@ We can see in the traceback that a `SchemaError` was raised in
raise SchemaError(message) from None
```
-The next line in the output, let's us know how many errors were found
+The next line in the output, lets us know how many errors were found
and for what endpoint.
```console
diff --git a/docs/outreach/experience.md b/docs/outreach/experience.md
index e70802c7ede..4f5ce2b20b6 100644
--- a/docs/outreach/experience.md
+++ b/docs/outreach/experience.md
@@ -38,7 +38,7 @@ help you along.
Don't forget to have fun! Spending a few months coding on open source is an
amazing opportunity, and we hope you'll have a blast. Your acceptance to the
-program means that we we are confident that if you put in the effort, your
+program means that we are confident that if you put in the effort, your
contributions to the open source world will be something you can be proud of for
the rest of your life.
diff --git a/docs/subsystems/markdown.md b/docs/subsystems/markdown.md
index 92effadd0c1..261ea9cf3f9 100644
--- a/docs/subsystems/markdown.md
+++ b/docs/subsystems/markdown.md
@@ -64,7 +64,7 @@ this file:
rendered content, since the APNS and GCM push notification systems
don't support richer markup. Mostly, this involves stripping HTML,
but there's some syntax we take special care with. Tests for what
- this plain-text version of content should be are stored in the
+ this plain-text version of content should be stored in the
`text_content` field.
If you're going to manually test some changes in the frontend Markdown
diff --git a/help/scim.md b/help/scim.md
index 26a26a95464..da3cabaa6f1 100644
--- a/help/scim.md
+++ b/help/scim.md
@@ -12,7 +12,7 @@ for Zulip.
Zulip's SCIM integration has the following limitations:
* Provisioning Groups is not yet implemented.
-* While Zulip's SCIM integration is generic, it has has only been
+* While Zulip's SCIM integration is generic, it has only been
fully tested and documented with Okta's SCIM provider, and it is
possible minor adjustments may be required. [Zulip
support](/help/contact-support) is happy to help customers configure
@@ -71,7 +71,7 @@ Zulip's SCIM integration has the following limitations:
* **familyName**
1. **Optional:** If you'd like to also sync [user role](/help/roles-and-permissions),
- you can do it by by adding a custom attribute in Okta. Go to the **Profile Editor**,
+ you can do it by adding a custom attribute in Okta. Go to the **Profile Editor**,
click into the entry of the SCIM app you've just set up and **Add Attribute**.
Configure the following:
* **Data type**: `string`
diff --git a/puppet/zulip_ops/manifests/profile/base.pp b/puppet/zulip_ops/manifests/profile/base.pp
index 906843f894c..184f245a171 100644
--- a/puppet/zulip_ops/manifests/profile/base.pp
+++ b/puppet/zulip_ops/manifests/profile/base.pp
@@ -118,7 +118,7 @@ class zulip_ops::profile::base {
$hosting_provider = zulipconf('machine', 'hosting_provider', 'ec2')
if $hosting_provider == 'ec2' {
- # This conditional block is for for whether it's not
+ # This conditional block is for whether it's not
# chat.zulip.org, which uses a different hosting provider.
file { '/root/.ssh/authorized_keys':
ensure => file,
diff --git a/scripts/lib/email-mirror-postfix b/scripts/lib/email-mirror-postfix
index 2b183d58d82..8e5a73b65c5 100755
--- a/scripts/lib/email-mirror-postfix
+++ b/scripts/lib/email-mirror-postfix
@@ -30,7 +30,7 @@ Also you can use optional keys to configure the script and change default values
the HTTP requests made by this tool.
-d HOST Destination Zulip host for email uploading. Address must contain type of
- HTTP protocol, i.e "https://example.com". Default value: "https://127.0.0.1".
+ HTTP protocol, e.g. "https://example.com". Default value: "https://127.0.0.1".
-u URL Destination relative for email uploading. Default value: "/email_mirror_message".
diff --git a/scripts/lib/setup_venv.py b/scripts/lib/setup_venv.py
index 2f0346100b2..f09a0d16981 100644
--- a/scripts/lib/setup_venv.py
+++ b/scripts/lib/setup_venv.py
@@ -179,7 +179,7 @@ def try_to_copy_venv(venv_path: str, new_packages: Set[str]) -> bool:
continue
old_packages = get_venv_packages(curr_venv_path)
- # We only consider using using old virtualenvs that only
+ # We only consider using old virtualenvs that only
# contain packages that we want in our new virtualenv.
if not (old_packages - new_packages):
overlap = new_packages & old_packages
diff --git a/tools/total-contributions b/tools/total-contributions
index d5fa2410a78..02a6f94a294 100755
--- a/tools/total-contributions
+++ b/tools/total-contributions
@@ -98,7 +98,7 @@ Its main downside is that contributions to projects other than
zulip/zulip in the last few weeks before a zulip/zulip release will be
delayed (i.e. counted in the total for the next zulip/zulip release).
-Expects that all Zulip repositories repositories are in the current working
+Expects that all Zulip repositories are in the current working
directory, which does not need to be the directory this is run from.
# Changes between two major releases.
diff --git a/web/src/alert_words.ts b/web/src/alert_words.ts
index f60e6823f99..255f8c0c24b 100644
--- a/web/src/alert_words.ts
+++ b/web/src/alert_words.ts
@@ -68,7 +68,7 @@ export function process_message(message: Message): void {
// case when there is an alert word just before `<` or `>`.
const check_string = pre_match + match.slice(0, -1);
const in_tag = check_string.lastIndexOf("<") > check_string.lastIndexOf(">");
- // Matched word is inside a HTML tag so don't perform any highlighting.
+ // Matched word is inside an HTML tag so don't perform any highlighting.
if (in_tag) {
return before + word + after;
}
diff --git a/web/src/copy_and_paste.js b/web/src/copy_and_paste.js
index 5a8b1337fad..4af653b2eb1 100644
--- a/web/src/copy_and_paste.js
+++ b/web/src/copy_and_paste.js
@@ -273,7 +273,7 @@ function get_end_tr_from_endc($endc) {
// We can tell this is the case because the selection isn't inside a
// `messagebox-content` div, which is where the message text itself is.
// TODO: Ideally make it so that the selection cannot end there.
- // For now, we find find the message row directly above wherever the
+ // For now, we find the message row directly above wherever the
// selection ended.
if ($endc.closest(".messagebox-content").length === 0) {
// If the selection ends within the message following the selected
diff --git a/web/src/message_viewport.js b/web/src/message_viewport.js
index 3a946770f75..cd14b2659bc 100644
--- a/web/src/message_viewport.js
+++ b/web/src/message_viewport.js
@@ -31,7 +31,7 @@ function make_dimen_wrapper(dimen_name, dimen_func) {
export const height = make_dimen_wrapper("height", $.fn.height);
export const width = make_dimen_wrapper("width", $.fn.width);
-// TODO: This function let's us use the DOM API instead of jquery
+// TODO: This function lets us use the DOM API instead of jquery
// (<10x faster) for condense.js, but we want to eventually do a
// bigger of refactor `height` and `width` above to do the same.
export function max_message_height() {
diff --git a/web/src/people.ts b/web/src/people.ts
index c67d4e3bb0f..74c8b69576e 100644
--- a/web/src/people.ts
+++ b/web/src/people.ts
@@ -707,7 +707,7 @@ export function slug_to_emails(slug: string): string | undefined {
/*
It's not super important to be flexible about
direct message related slugs, since you would
- rarely post them to the web, but we we do want
+ rarely post them to the web, but we do want
to support reasonable variations:
diff --git a/web/src/reactions.js b/web/src/reactions.js
index 5e5689eea7d..6131a11a510 100644
--- a/web/src/reactions.js
+++ b/web/src/reactions.js
@@ -109,7 +109,7 @@ function update_ui_and_send_reaction_ajax(message_id, reaction_info) {
export function toggle_emoji_reaction(message_id, emoji_name) {
// This codepath doesn't support toggling a deactivated realm emoji.
- // Since an user can interact with a deactivated realm emoji only by
+ // Since a user can interact with a deactivated realm emoji only by
// clicking on a reaction and that is handled by `process_reaction_click()`
// method. This codepath is to be used only where there is no chance of an
// user interacting with a deactivated realm emoji like emoji picker.
diff --git a/web/src/spoilers.ts b/web/src/spoilers.ts
index 081ee51d86a..bb6a4b7adab 100644
--- a/web/src/spoilers.ts
+++ b/web/src/spoilers.ts
@@ -56,7 +56,7 @@ export function initialize(): void {
const $target = $(e.target);
// Spoiler headers can contain Markdown, including links. We
- // return so that clicking such links will be be processed by
+ // return so that clicking such links will be processed by
// the browser rather than opening the header.
if ($target.closest("a").length > 0) {
return;
diff --git a/web/src/stream_data.ts b/web/src/stream_data.ts
index d49f68a5033..186a8e1cc83 100644
--- a/web/src/stream_data.ts
+++ b/web/src/stream_data.ts
@@ -668,7 +668,7 @@ export function is_default_stream_id(stream_id: number): boolean {
export function get_name(stream_name: string): string {
// This returns the actual name of a stream if we are subscribed to
- // it (i.e "Denmark" vs. "denmark"), while falling thru to
+ // it (e.g. "Denmark" vs. "denmark"), while falling thru to
// stream_name if we don't have a subscription. (Stream names
// are case-insensitive, but we try to display the actual name
// when we know it.)
diff --git a/web/src/stream_edit.js b/web/src/stream_edit.js
index 6f742b8f59b..8b3d9a3338e 100644
--- a/web/src/stream_edit.js
+++ b/web/src/stream_edit.js
@@ -405,7 +405,7 @@ export function initialize() {
});
$("#streams_overlay_container").on("keypress", "#change_stream_description", (e) => {
- // Stream descriptions can not be multiline, so disable enter key
+ // Stream descriptions cannot be multiline, so disable enter key
// to prevent new line
if (keydown_util.is_enter_event(e)) {
return false;
diff --git a/web/src/user_card_popover.js b/web/src/user_card_popover.js
index b89b82d2f01..5102603a6b3 100644
--- a/web/src/user_card_popover.js
+++ b/web/src/user_card_popover.js
@@ -100,7 +100,7 @@ export const user_card = new PopoverMenu();
function popover_items_handle_keyboard_with_overrides(key, $items) {
/* Variant of popover_items_handle_keyboard with somewhat hacky
- * logic for for opening the manage menu. */
+ * logic for opening the manage menu. */
if (!$items) {
return;
}
diff --git a/web/tests/lib/namespace.js b/web/tests/lib/namespace.js
index 3c78a596ca9..3d1d537808f 100644
--- a/web/tests/lib/namespace.js
+++ b/web/tests/lib/namespace.js
@@ -109,7 +109,7 @@ function template_stub({filename, actual_render}) {
if (exercise_template) {
// If our dev wants to exercise the actual template, then do so.
- // We set the in_mid_render bool so that included (i.e partial)
+ // We set the in_mid_render bool so that included (i.e. partial)
// templates get rendered.
in_mid_render = true;
const html = actual_render(...args);
diff --git a/web/tests/stream_data.test.js b/web/tests/stream_data.test.js
index f2ea99186bf..c2f500f538a 100644
--- a/web/tests/stream_data.test.js
+++ b/web/tests/stream_data.test.js
@@ -253,7 +253,7 @@ test("get_streams_for_user", () => {
// #social: current user is can get this as neither this is invite only nor current
// user is a guest.
// #test: current user is no longer subscribed to a private stream, so
- // he can not see whether test_user is subscribed to it.
+ // he cannot see whether test_user is subscribed to it.
assert.deepEqual(stream_data.get_streams_for_user(test_user.user_id).subscribed, [
denmark,
social,
diff --git a/web/tests/typeahead_helper.test.js b/web/tests/typeahead_helper.test.js
index 7f92f97a3fc..71bfeb3b8d3 100644
--- a/web/tests/typeahead_helper.test.js
+++ b/web/tests/typeahead_helper.test.js
@@ -316,7 +316,7 @@ test("sort_languages", () => {
assert.deepEqual(test_langs, ["j", "javascript", "java"]);
// (Only one alias should be shown per language
- // (i.e searching for "js" shouldn't show "javascript")
+ // (e.g. searching for "js" shouldn't show "javascript")
test_langs = ["js", "javascript", "java"];
test_langs = th.sort_languages(test_langs, "js");
assert.deepEqual(test_langs, ["js", "java"]);
diff --git a/web/third/bootstrap/js/bootstrap.js b/web/third/bootstrap/js/bootstrap.js
index 65dfdb80f56..3ac25419a75 100644
--- a/web/third/bootstrap/js/bootstrap.js
+++ b/web/third/bootstrap/js/bootstrap.js
@@ -113,7 +113,7 @@
if (!isActive) {
if ('ontouchstart' in document.documentElement) {
- // if mobile we we use a backdrop because click events don't delegate
+ // if mobile we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
}
$parent.toggleClass('open')
diff --git a/zerver/actions/realm_emoji.py b/zerver/actions/realm_emoji.py
index 1d5be64924a..86fbc83f115 100644
--- a/zerver/actions/realm_emoji.py
+++ b/zerver/actions/realm_emoji.py
@@ -41,7 +41,7 @@ def check_add_realm_emoji(
emoji_file_name = get_emoji_file_name(image_file.name, realm_emoji.id)
# The only user-controlled portion of 'emoji_file_name' is an extension,
- # which can not contain '..' or '/' or '\', making it difficult to exploit
+ # which cannot contain '..' or '/' or '\', making it difficult to exploit
emoji_file_name = mark_sanitized(emoji_file_name)
emoji_uploaded_successfully = False
diff --git a/zerver/lib/markdown/__init__.py b/zerver/lib/markdown/__init__.py
index d08e6e45e06..6c8eccf71b9 100644
--- a/zerver/lib/markdown/__init__.py
+++ b/zerver/lib/markdown/__init__.py
@@ -732,7 +732,7 @@ class InlineInterestingLinkProcessor(markdown.treeprocessors.Treeprocessor):
if not self.zmd.image_preview_enabled:
return False
parsed_url = urllib.parse.urlparse(url)
- # remove HTML URLs which end with image extensions that can not be shorted
+ # remove HTML URLs which end with image extensions that cannot be shorted
if parsed_url.netloc == "pasteboard.co":
return False
diff --git a/zerver/lib/upload/base.py b/zerver/lib/upload/base.py
index a9b48c2f977..38fd894a00c 100644
--- a/zerver/lib/upload/base.py
+++ b/zerver/lib/upload/base.py
@@ -137,8 +137,8 @@ def resize_emoji(
) -> Tuple[bytes, bool, Optional[bytes]]:
# This function returns three values:
# 1) Emoji image data.
- # 2) If emoji is gif i.e animated.
- # 3) If is animated then return still image data i.e first frame of gif.
+ # 2) If emoji is gif i.e. animated.
+ # 3) If is animated then return still image data i.e. first frame of gif.
try:
im = Image.open(io.BytesIO(image_data))
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 954f5081a4b..d2f247a410c 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -3961,7 +3961,7 @@ paths:
type: object
additionalProperties:
description: |
- Boolean describing whether the authentication method (i.e its key)
+ Boolean describing whether the authentication method (i.e. its key)
is enabled in this organization.
type: boolean
description: |
@@ -13759,7 +13759,7 @@ paths:
type: object
additionalProperties:
description: |
- Boolean describing whether the authentication method (i.e its key)
+ Boolean describing whether the authentication method (i.e. its key)
is enabled in this organization.
type: boolean
description: |
diff --git a/zerver/tests/test_realm_emoji.py b/zerver/tests/test_realm_emoji.py
index cfd63a473db..28c59217295 100644
--- a/zerver/tests/test_realm_emoji.py
+++ b/zerver/tests/test_realm_emoji.py
@@ -346,7 +346,7 @@ class RealmEmojiTest(ZulipTestCase):
self.assert_json_error(result, "Broken")
def test_check_admin_realm_emoji(self) -> None:
- # Test that an user A is able to remove a realm emoji uploaded by him
+ # Test that a user A is able to remove a realm emoji uploaded by him
# and having same name as a deactivated realm emoji uploaded by some
# other user B.
emoji_author_1 = self.example_user("cordelia")
diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py
index 996d5afb79f..dba68ebe7a4 100644
--- a/zerver/tests/test_subs.py
+++ b/zerver/tests/test_subs.py
@@ -4734,7 +4734,7 @@ class SubscriptionAPITest(ZulipTestCase):
def test_subscribe_to_stream_post_policy_restrict_new_members_stream(self) -> None:
"""
- New members can subscribe to streams where they can not post
+ New members can subscribe to streams where they cannot post
"""
new_member_email = self.nonreg_email("test")
self.register(new_member_email, "test")
diff --git a/zerver/views/message_edit.py b/zerver/views/message_edit.py
index 11202f22d8d..3983d73c073 100644
--- a/zerver/views/message_edit.py
+++ b/zerver/views/message_edit.py
@@ -158,7 +158,7 @@ def validate_can_delete_message(user_profile: UserProfile, message: Message) ->
# None means no time limit to delete message
return
if (timezone_now() - message.date_sent) > datetime.timedelta(seconds=deadline_seconds):
- # User can not delete message after deadline time of realm
+ # User cannot delete message after deadline time of realm
raise JsonableError(_("The time limit for deleting this message has passed"))
return
diff --git a/zerver/views/video_calls.py b/zerver/views/video_calls.py
index d2b08ecfa0e..1c53c7f77ea 100644
--- a/zerver/views/video_calls.py
+++ b/zerver/views/video_calls.py
@@ -195,7 +195,7 @@ def get_bigbluebutton_url(
id = "zulip-" + str(random.randint(100000000000, 999999999999))
password = b32encode(secrets.token_bytes(20)).decode() # 20 bytes means 32 characters
- # We sign our data here to ensure a Zulip user can not tamper with
+ # We sign our data here to ensure a Zulip user cannot tamper with
# the join link to gain access to other meetings that are on the
# same bigbluebutton server.
signed = Signer().sign_object(