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.

lint: Fix typos found by codespell.

rhtbb8504d9253e
diff --git a/frontend_tests/node_tests/channel.js b/frontend_tests/node_tests/channel.js
index 40934996ce6..690367e3c57 100644
--- a/frontend_tests/node_tests/channel.js
+++ b/frontend_tests/node_tests/channel.js
@@ -16,7 +16,7 @@ set_global("setTimeout", (f, delay) => {
const xhr_401 = {
status: 401,
- responseText: '{"msg": "Use cannnot access XYZ"}',
+ responseText: '{"msg": "Use cannot access XYZ"}',
};
let login_to_access_shown = false;
diff --git a/frontend_tests/node_tests/example8.js b/frontend_tests/node_tests/example8.js
index 56baadb2643..57653d748db 100644
--- a/frontend_tests/node_tests/example8.js
+++ b/frontend_tests/node_tests/example8.js
@@ -85,7 +85,7 @@ run_test("typing_events.render_notifications_for_narrow", ({override, mock_templ
// As you can see below, the first argument of mock_template takes
// the relative path of the template we want to mock w.r.t static/templates/
//
- // The second argument takes a boolean determing whether to render html.
+ // The second argument takes a boolean determining whether to render html.
// We mostly set this to `false` and recommend you avoid setting this to `true`
// unless necessary in situations where you want to test conditionals
// or something similar. The latter examples below would make that more clear.
diff --git a/frontend_tests/node_tests/message_list_view.js b/frontend_tests/node_tests/message_list_view.js
index b8ead64af80..904cc410f9e 100644
--- a/frontend_tests/node_tests/message_list_view.js
+++ b/frontend_tests/node_tests/message_list_view.js
@@ -218,7 +218,7 @@ test("muted_message_vars", () => {
// Additionally test that, `contains_mention` is true on that message which has a mention.
assert.equal(result[1].contains_mention, true);
- // Now test rehiding muted user's messsage
+ // Now test rehiding muted user's message
is_revealed = false;
result = calculate_variables(list, messages, is_revealed);
diff --git a/frontend_tests/node_tests/stream_data.js b/frontend_tests/node_tests/stream_data.js
index 6b6dd7ebf10..91a1147481e 100644
--- a/frontend_tests/node_tests/stream_data.js
+++ b/frontend_tests/node_tests/stream_data.js
@@ -191,7 +191,7 @@ test("get_subscribed_streams_for_user", () => {
// test_user is subscribed to all three streams, but current user (me)
// gets only two because of subscriber visibility policy of stream:
// #denmark: current user is subscribed to it so he can see its subscribers.
- // #social: current user is can get this as neither this is invite onyl nor current
+ // #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.
diff --git a/frontend_tests/puppeteer_tests/user-status.ts b/frontend_tests/puppeteer_tests/user-status.ts
index d9bbb9986a6..26a062e1a49 100644
--- a/frontend_tests/puppeteer_tests/user-status.ts
+++ b/frontend_tests/puppeteer_tests/user-status.ts
@@ -45,7 +45,7 @@ async function test_user_status(page: Page): Promise<void> {
);
await page.waitForSelector(".status_emoji_wrapper .smiley_icon", {visible: true});
- // Manualy adding everthing.
+ // Manually adding everything.
await page.type(".user_status", "Busy");
const tada_emoji_selector = ".emoji-1f389";
await page.click(".status_emoji_wrapper .smiley_icon");
@@ -59,7 +59,7 @@ async function test_user_status(page: Page): Promise<void> {
// It should close the modal after saving.
await page.waitForSelector("#set_user_status_modal", {hidden: true});
- // Check if the emoji is added in user presense list.
+ // Check if the emoji is added in user presence list.
await page.waitForSelector(`.user-presence-link .status_emoji${tada_emoji_selector}`);
}
diff --git a/scripts/lib/setup-apt-repo b/scripts/lib/setup-apt-repo
index 910b35f17c2..fcdc19e55cf 100755
--- a/scripts/lib/setup-apt-repo
+++ b/scripts/lib/setup-apt-repo
@@ -5,7 +5,7 @@
# used to verify the repositories (via `apt-key`), to explicitly pin
# the trusted signing keys, as opposed to blindly trusting HTTPS.
#
-# Each /etc/apt/soruces.list.d/foo.list file is created via `--list
+# Each /etc/apt/sources.list.d/foo.list file is created via `--list
# foo`, where `foo` defaults to `zulip`. The default `zulip.list` is
# installed in `scripts/lib/install` / `tools/lib/provision.py`, and
# other `.list` files may be installed by Puppet.
diff --git a/static/js/blueslip.ts b/static/js/blueslip.ts
index c371dea0e90..a46a053da29 100644
--- a/static/js/blueslip.ts
+++ b/static/js/blueslip.ts
@@ -158,7 +158,7 @@ class BlueslipError extends Error {
export function exception_msg(
ex: Error & {
- // Unsupported properties avaliable on some browsers
+ // Unsupported properties available on some browsers
fileName?: string;
lineNumber?: number;
},
diff --git a/static/js/types.ts b/static/js/types.ts
index 4e84363aee3..a9229eaad5c 100644
--- a/static/js/types.ts
+++ b/static/js/types.ts
@@ -10,5 +10,5 @@ export type UserGroupUpdateEvent = {
};
// TODO/typescript: Move the User and Stream placeholder
-// types to their approriate modules.
+// types to their appropriate modules.
export type User = Record<string, never>;
diff --git a/static/styles/subscriptions.css b/static/styles/subscriptions.css
index 084755fa80c..b089e632961 100644
--- a/static/styles/subscriptions.css
+++ b/static/styles/subscriptions.css
@@ -1201,7 +1201,7 @@
to show alert beside stream name we set its display
to block so it is shown in new line. But to avoid
it covering whole screen width we set max-width
- so that it does not losses inline-block appearence. */
+ so that it does not losses inline-block appearance. */
/* TODO: This will probably be not required once
we have tabbed navigation as button group width
diff --git a/static/third/bootstrap/css/bootstrap.css b/static/third/bootstrap/css/bootstrap.css
index 95e87ffd61e..d9235a19435 100644
--- a/static/third/bootstrap/css/bootstrap.css
+++ b/static/third/bootstrap/css/bootstrap.css
@@ -87,7 +87,7 @@ img {
/* Responsive images (ensure images don't scale beyond their parents) */
max-width: 100%;
- /* Part 1: Set a maxium relative to the parent */
+ /* Part 1: Set a maximum relative to the parent */
width: auto\9;
/* IE7-8 need help adjusting responsive images */
diff --git a/templates/zerver/api/rest-error-handling.md b/templates/zerver/api/rest-error-handling.md
index f92a006bb6a..1adeff2f283 100644
--- a/templates/zerver/api/rest-error-handling.md
+++ b/templates/zerver/api/rest-error-handling.md
@@ -19,7 +19,7 @@ errors common to many endpoints:
{generate_code_example|/rest-error-handling:post|fixture}
-The `retry-after` paremeter in the response indicates how many seconds
+The `retry-after` parameter in the response indicates how many seconds
the client must wait before making additional requests.
To help clients avoid exceeding rate limits, Zulip sets the following
diff --git a/templates/zerver/for-companies.html b/templates/zerver/for-companies.html
index 82db1c25a8a..39b45f9d111 100644
--- a/templates/zerver/for-companies.html
+++ b/templates/zerver/for-companies.html
@@ -306,7 +306,7 @@
</div>
</li>
</ul>
- <blockquote class="twitter-tweet"><p lang="en" dir="ltr">It’s so refreshing to see and use <a href="https://twitter.com/zulip?ref_src=twsrc%5Etfw">@zulip</a> Another level of product design. Which really delights. A singular experience, unfortunatelly, in years. <br /><br />Congrats and keep up the good work!</p>&mdash; metamn (@metamn) <a href="https://twitter.com/metamn/status/1385684113097691141?ref_src=twsrc%5Etfw">April 23, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js"></script>
+ <blockquote class="twitter-tweet"><p lang="en" dir="ltr">It’s so refreshing to see and use <a href="https://twitter.com/zulip?ref_src=twsrc%5Etfw">@zulip</a> Another level of product design. Which really delights. A singular experience, unfortunately, in years. <br /><br />Congrats and keep up the good work!</p>&mdash; metamn (@metamn) <a href="https://twitter.com/metamn/status/1385684113097691141?ref_src=twsrc%5Etfw">April 23, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js"></script>
</div>
</div>
<div class="feature-half">
diff --git a/templates/zerver/for-education.html b/templates/zerver/for-education.html
index 830f58b13ac..c3b35de0009 100644
--- a/templates/zerver/for-education.html
+++ b/templates/zerver/for-education.html
@@ -132,7 +132,7 @@
</ul>
<div class="quote">
<blockquote>
- Participants across six continents signed up for my graduate-level classes when I decided to open them up to the world during the pandemic. Zulip became a central hub for asychronous Q&A and posting Zoom links for lectures, whiteboard PDFs, and announcements. Zulip’s topics, and the ability to change the topic of someone else's message, has made it much easier for me to keep things coherent. It’s super easy to discuss technical material using the TeX integration, and spoilers are a great way to answer questions about homework without depriving students of a chance to keep thinking about the problem on their own.
+ Participants across six continents signed up for my graduate-level classes when I decided to open them up to the world during the pandemic. Zulip became a central hub for asynchronous Q&A and posting Zoom links for lectures, whiteboard PDFs, and announcements. Zulip’s topics, and the ability to change the topic of someone else's message, has made it much easier for me to keep things coherent. It’s super easy to discuss technical material using the TeX integration, and spoilers are a great way to answer questions about homework without depriving students of a chance to keep thinking about the problem on their own.
</blockquote>
<div class="author">
&mdash; <a href="https://kskedlaya.org/">Kiran S. Kedlaya</a>, Professor of Mathematics at University of California San Diego
diff --git a/templates/zerver/help/configure-default-new-user-settings.md b/templates/zerver/help/configure-default-new-user-settings.md
index b8bdad8059b..93583dba09f 100644
--- a/templates/zerver/help/configure-default-new-user-settings.md
+++ b/templates/zerver/help/configure-default-new-user-settings.md
@@ -4,7 +4,7 @@
Organization administrators can configure the default values of
personal preference settings for new users joining the
-organization. This can help seemlessly customize the Zulip experience
+organization. This can help seamlessly customize the Zulip experience
to match how the organization in question is using Zulip.
Existing users' preferences cannot be modified by administrators, and
diff --git a/templates/zerver/plans.html b/templates/zerver/plans.html
index 017e2ff0dae..a7ef4cad515 100644
--- a/templates/zerver/plans.html
+++ b/templates/zerver/plans.html
@@ -20,7 +20,7 @@
<h1>Special Zulip Cloud Standard pricing</h1>
</header>
<div class="register-buttons">
- <a href="/for/open-source" class="register-now buttton">Open source <p>Free</p></a>
+ <a href="/for/open-source" class="register-now button">Open source <p>Free</p></a>
<a href="/for/education" class="register-now button">Education <p>85%+ OFF</p></a>
<a href="/for/research" class="register-now button">Research <p>Free</p></a>
<a href="/for/events" class="register-now button">Academic conferences<p>Free</p></a>
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py
index c24015bdf1f..23cca14175f 100644
--- a/zerver/lib/actions.py
+++ b/zerver/lib/actions.py
@@ -1118,7 +1118,7 @@ def do_change_realm_subdomain(
) -> None:
"""Changing a realm's subdomain is a highly disruptive operation,
because all existing clients will need to be updated to point to
- the new URL. Further, requests to fetch data frmo existing event
+ the new URL. Further, requests to fetch data from existing event
queues will fail with an authentication error when this change
happens (because the old subdomain is no longer associated with
the realm), making it hard for us to provide a graceful update
@@ -1689,7 +1689,7 @@ def get_recipient_info(
)
# We deal with only the users who have disabled this setting, since that
- # will ususally be much smaller a set than those who have enabled it (which
+ # will usually be much smaller a set than those who have enabled it (which
# is the default)
pm_mention_email_disabled_user_ids = get_ids_for(
lambda r: not r["enable_offline_email_notifications"]
diff --git a/zerver/lib/events.py b/zerver/lib/events.py
index 86ea5dfead3..87eb538b1f6 100644
--- a/zerver/lib/events.py
+++ b/zerver/lib/events.py
@@ -175,7 +175,7 @@ def fetch_initial_state_data(
state["max_message_id"] = -1
if want("drafts"):
- # Note: if a user ever disables synching drafts then all of
+ # Note: if a user ever disables syncing drafts then all of
# their old drafts stored on the server will be deleted and
# simply retained in local storage. In which case user_drafts
# would just be an empty queryset.
diff --git a/zerver/lib/scim.py b/zerver/lib/scim.py
index 97e81c37583..a522992025f 100644
--- a/zerver/lib/scim.py
+++ b/zerver/lib/scim.py
@@ -139,7 +139,7 @@ class ZulipSCIMUser(SCIMUser):
functions (which update audit logs, send events, etc.) or
doing application-specific validation.
- Thus, we've completely overriden the upstream implementation
+ Thus, we've completely overridden the upstream implementation
to store the values of the supported attributes that the
request would like to change. Actually modifying the database
is implemented in self.save().
@@ -207,11 +207,11 @@ class ZulipSCIMUser(SCIMUser):
This method is forked from the superclass and is called to handle "replace"
PATCH operations. Such an operation tells us to change the values
of a User's attributes as specified. The superclass implements a very basic
- behavior in this method and is meant to be overriden, since this is an adapter class.
+ behavior in this method and is meant to be overridden, since this is an adapter class.
"""
if not isinstance(value, dict):
# Restructure for use in loop below. Taken from the
- # overriden upstream method.
+ # overridden upstream method.
assert path is not None
value = {path: value}
diff --git a/zerver/lib/test_helpers.py b/zerver/lib/test_helpers.py
index 5e1d2a618b6..3c8fd62a41f 100644
--- a/zerver/lib/test_helpers.py
+++ b/zerver/lib/test_helpers.py
@@ -489,7 +489,7 @@ def write_instrumentation_reports(full_suite: bool, include_webhooks: bool) -> N
"static/(?P<path>.+)",
"flush_caches",
"external_content/(?P<digest>[^/]+)/(?P<received_url>[^/]+)",
- # These are SCIM2 urls overriden from django-scim2 to return Not Implemented.
+ # These are SCIM2 urls overridden from django-scim2 to return Not Implemented.
# We actually test them, but it's not being detected as a tested pattern,
# possibly due to the use of re_path. TODO: Investigate and get them
# recognized as tested.
diff --git a/zerver/middleware.py b/zerver/middleware.py
index 00952aa8455..7c378bba28d 100644
--- a/zerver/middleware.py
+++ b/zerver/middleware.py
@@ -673,7 +673,7 @@ def validate_scim_bearer_token(request: HttpRequest) -> Optional[SCIMClient]:
This function verifies the request is allowed to make SCIM requests on this subdomain,
by checking the provided bearer token and ensuring it matches a scim client configured
for this subdomain in settings.SCIM_CONFIG.
- If succesful, returns the corresponding SCIMClient object. Returns None otherwise.
+ If successful, returns the corresponding SCIMClient object. Returns None otherwise.
"""
subdomain = get_subdomain(request)
@@ -702,7 +702,7 @@ def validate_scim_bearer_token(request: HttpRequest) -> Optional[SCIMClient]:
class ZulipSCIMAuthCheckMiddleware(SCIMAuthCheckMiddleware):
"""
- Overriden version of middleware implemented in django-scim2
+ Overridden version of middleware implemented in django-scim2
(https://github.com/15five/django-scim2/blob/master/src/django_scim/middleware.py)
to also handle authenticating the client.
"""
diff --git a/zerver/openapi/markdown_extension.py b/zerver/openapi/markdown_extension.py
index bb96c59a702..63fe92339eb 100644
--- a/zerver/openapi/markdown_extension.py
+++ b/zerver/openapi/markdown_extension.py
@@ -479,7 +479,7 @@ class BasePreprocessor(Preprocessor):
return text
def render(self, function: str) -> List[str]:
- raise NotImplementedError("Must be overriden by a child class")
+ raise NotImplementedError("Must be overridden by a child class")
class APICodeExamplesPreprocessor(BasePreprocessor):
diff --git a/zerver/tests/test_example.py b/zerver/tests/test_example.py
index c6230ccd5b2..d67e72e8a0e 100644
--- a/zerver/tests/test_example.py
+++ b/zerver/tests/test_example.py
@@ -497,7 +497,7 @@ class TestMocking(ZulipTestCase):
# mock.patch() here makes any calls to `timezone_now` in `zerver.lib.actions`
# to return the value passed to `return_value` in the its context.
# You can also use mock.patch() as a decorator depending on the
- # requirements. Read more at the documentaion link provided above.
+ # requirements. Read more at the documentation link provided above.
time_beyond_edit_limit = message_sent_time + datetime.timedelta(
seconds=MESSAGE_CONTENT_EDIT_LIMIT + 100
diff --git a/zerver/tests/test_muting_users.py b/zerver/tests/test_muting_users.py
index c170febf3a1..a0558d16612 100644
--- a/zerver/tests/test_muting_users.py
+++ b/zerver/tests/test_muting_users.py
@@ -312,7 +312,7 @@ class MutedUsersTests(ZulipTestCase):
self.make_stream("general")
self.subscribe(hamlet, "general")
- # No muting. Only Hamlet is subscribed to #general, so only he can potentially recieve
+ # No muting. Only Hamlet is subscribed to #general, so only he can potentially receive
# notifications.
with mock.patch("zerver.tornado.event_queue.maybe_enqueue_notifications") as m:
message_id = self.send_stream_message(cordelia, "general")
diff --git a/zerver/tests/test_settings.py b/zerver/tests/test_settings.py
index d2ca0ab923d..9e27ff6320c 100644
--- a/zerver/tests/test_settings.py
+++ b/zerver/tests/test_settings.py
@@ -456,7 +456,7 @@ class ChangeSettingsTest(ZulipTestCase):
def test_changing_setting_using_display_setting_endpoint(self) -> None:
"""
This test is just for adding coverage for `/settings/display` endpoint which is
- now depreceated.
+ now deprecated.
"""
self.login("hamlet")
@@ -470,7 +470,7 @@ class ChangeSettingsTest(ZulipTestCase):
def test_changing_setting_using_notification_setting_endpoint(self) -> None:
"""
This test is just for adding coverage for `/settings/notifications` endpoint which is
- now depreceated.
+ now deprecated.
"""
self.login("hamlet")
diff --git a/zerver/tests/test_submessage.py b/zerver/tests/test_submessage.py
index aa0874a1d76..0103ce96d58 100644
--- a/zerver/tests/test_submessage.py
+++ b/zerver/tests/test_submessage.py
@@ -123,7 +123,7 @@ class TestBasics(ZulipTestCase):
result = self.client_post("/json/submessage", payload)
self.assert_json_error(result, "You cannot attach a submessage to this message.")
- # Since Hamlet is actually subcribed to the stream, he is welcome
+ # Since Hamlet is actually subscribed to the stream, he is welcome
# to send submessages to Cordelia once she initiates the "subconversation".
do_add_submessage(
realm=cordelia.realm,
diff --git a/zerver/tornado/event_queue.py b/zerver/tornado/event_queue.py
index 76f8f598017..20d1a81b92a 100644
--- a/zerver/tornado/event_queue.py
+++ b/zerver/tornado/event_queue.py
@@ -1127,7 +1127,7 @@ def process_message_update_event(
# code path, and represent just rendering previews; there should be no
# real content changes.
# It doesn't really matter what we set `acting_user_id` in this case,
- # becuase we know this event isn't meant to send notifications.
+ # because we know this event isn't meant to send notifications.
acting_user_id = user_profile_id
user_event = dict(event_template) # shallow copy, but deep enough for our needs
diff --git a/zproject/backends.py b/zproject/backends.py
index f802c627649..d6850425925 100644
--- a/zproject/backends.py
+++ b/zproject/backends.py
@@ -2146,7 +2146,7 @@ class AppleAuthBackend(SocialAuthMixin, AppleIdAuth):
class ZulipSAMLIdentityProvider(SAMLIdentityProvider):
def get_user_details(self, attributes: Dict[str, Any]) -> Dict[str, Any]:
"""
- Overriden to support plumbing of additional Attributes
+ Overridden to support plumbing of additional Attributes
from the SAMLResponse.
"""
result = super().get_user_details(attributes)
diff --git a/zproject/computed_settings.py b/zproject/computed_settings.py
index a40b2990fcd..dd26799b36c 100644
--- a/zproject/computed_settings.py
+++ b/zproject/computed_settings.py
@@ -1212,7 +1212,7 @@ if SENTRY_DSN:
SCIM_SERVICE_PROVIDER = {
"USER_ADAPTER": "zerver.lib.scim.ZulipSCIMUser",
"USER_FILTER_PARSER": "zerver.lib.scim_filter.ZulipUserFilterQuery",
- # NETLOC is actually overriden by the behavior of base_scim_location_getter,
+ # NETLOC is actually overridden by the behavior of base_scim_location_getter,
# but django-scim2 requires it to be set, even though it ends up not being used.
# So we need to give it some value here, and EXTERNAL_HOST is the most generic.
"NETLOC": EXTERNAL_HOST,