Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
docs: Fix spelling errors caught by codespell.
Anders Kaseorg178736c8eb79
diff --git a/docs/contributing/code-reviewing.md b/docs/contributing/code-reviewing.mdindex 7f7709728f5..8cdc1594334 100644--- a/docs/contributing/code-reviewing.md+++ b/docs/contributing/code-reviewing.md@@ -49,7 +49,7 @@ will assume it isn't ready for review and move on to other work.If you need help or think an open discussion topic requires morefeedback or a more complex discussion, move the discussion to a topicin the Zulip development community server. Be sure to provide links-from the GitHub PR to the conversation (and vise versa) so that it's+from the GitHub PR to the conversation (and vice versa) so that it'sconvenient to read both conversations together.## Principles of code reviewdiff --git a/docs/subsystems/performance.md b/docs/subsystems/performance.mdindex faa7cf644ee..cef37be2288 100644--- a/docs/subsystems/performance.md+++ b/docs/subsystems/performance.md@@ -341,7 +341,7 @@ that powers [/stats](https://zulip.com/help/analytics) are run by[queue processors](../subsystems/queuing.md) and cron jobs, not inresponse to incoming HTTP requests. In practice, all of these havebeen written such that they are immaterial to total load and thus-architectual scalability, though we do from time to time need to do+architectural scalability, though we do from time to time need to dooperational work to add additional queue processors for particularlyhigh-traffic queues. For all of our queue processors, anyserialization requirements are at most per-user, and thus it would bediff --git a/docs/testing/continuous-integration.md b/docs/testing/continuous-integration.mdindex f2c9cafd72c..0fd34d2c31a 100644--- a/docs/testing/continuous-integration.md+++ b/docs/testing/continuous-integration.md@@ -29,7 +29,7 @@ run to iteratively debug something.* GitHub Actions stores timestamps for every line in the logs. Theyare hidden by default; you can see them by toggling the `Showtimestamps` option in the menu on any job's log page. (You can get-this sort of timestamp in a development environemnt by piping output+this sort of timestamp in a development environment by piping outputto `ts`).* GitHub Actions runs on every branch you push on your Zulip fork.diff --git a/docs/translating/translating.md b/docs/translating/translating.mdindex 147f1bf69f8..2699176db70 100644--- a/docs/translating/translating.md+++ b/docs/translating/translating.md@@ -63,7 +63,7 @@ Some useful tips for your translating journey:search](https://github.com/search?q=org%3Azulip+%22alert+word+already+exists%22&type=code)helpful for finding the code using a given string (ignore `.po` and`.json` matches, and note the search box is semi-invisible in the- upper-left corner of the page), or looking at the "Occurences"+ upper-left corner of the page), or looking at the "Occurrences"section in the Transifex UI, browsing to the file on[GitHub](https://github.com/zulip/zulip/), and then searching forthe string with `Ctrl+F` in your browser.diff --git a/frontend_tests/node_tests/message_fetch.js b/frontend_tests/node_tests/message_fetch.jsindex 345e5d51f62..96843b650a8 100644--- a/frontend_tests/node_tests/message_fetch.js+++ b/frontend_tests/node_tests/message_fetch.js@@ -92,7 +92,7 @@ function config_fake_channel(conf) {channel.get = (opts) => {assert.equal(opts.url, "/json/messages");// There's a separate call with anchor="newest" that happens- // unconditionally; do basic verfication of that call.+ // unconditionally; do basic verification of that call.if (opts.data.anchor === "newest") {if (!called_with_newest_flag) {called_with_newest_flag = true;diff --git a/frontend_tests/puppeteer_tests/message-basics.ts b/frontend_tests/puppeteer_tests/message-basics.tsindex 04fce83e9bc..727898c300e 100644--- a/frontend_tests/puppeteer_tests/message-basics.ts+++ b/frontend_tests/puppeteer_tests/message-basics.ts@@ -423,7 +423,7 @@ async function test_users_search(page: Page): Promise<void> {await arrow(page, "Down");await arrow(page, "Up");await arrow(page, "Up");- await arrow(page, "Up"); // does nothing; allready on the top.+ await arrow(page, "Up"); // does nothing; already on the top.await arrow(page, "Down");await arrow(page, "Down");await arrow(page, "Down");diff --git a/static/js/click_handlers.js b/static/js/click_handlers.jsindex 4f304a87c2b..f2cab2fe815 100644--- a/static/js/click_handlers.js+++ b/static/js/click_handlers.js@@ -132,7 +132,7 @@ export function initialize() {return true;}- // Ideally, this should be done via ClipboardJS, but it does't support+ // Ideally, this should be done via ClipboardJS, but it doesn't support// feature of stopPropagation once clicked.// See https://github.com/zenorocha/clipboard.js/pull/475if (target.is(".copy_codeblock") || target.parents(".copy_codeblock").length > 0) {diff --git a/static/js/giphy.js b/static/js/giphy.jsindex 664d50ead22..0393f3e0d44 100644--- a/static/js/giphy.js+++ b/static/js/giphy.js@@ -28,7 +28,7 @@ export function focus_current_edit_message() {$(`#message_edit_content_${CSS.escape(edit_message_id)}`).trigger("focus");}-// Approximate width and heigh of+// Approximate width and height of// giphy popover as computed by chrome// + 25px;const APPROX_HEIGHT = 350;@@ -126,7 +126,7 @@ export function hide_giphy_popover() {// We need to destroy the popover because when// we hide it, bootstrap popover// library removes `giphy-content` element- // as part of cleaning up everthing inside+ // as part of cleaning up everything inside// `popover-content`, so we need to reinitialize// the popover by destroying it.active_popover_element.popover("destroy");@@ -204,7 +204,7 @@ export function initialize() {// Allow simplebar to render, then fetch and// render GIFs. otherwise simplebar replaces// the `.gipihy-content` element when trying- // to wrap it and hence, our jquery refernce+ // to wrap it and hence, our jquery reference// to `.giphy-content` is lost. Thus, no GIF// is rendered.setTimeout(() => {@@ -227,7 +227,7 @@ export function initialize() {// Focus on search box by default.// This is specially helpful for users- // navigating via keybaord.+ // navigating via keyboard.$("#giphy-search-query").trigger("focus");});}diff --git a/static/js/hashchange.js b/static/js/hashchange.jsindex c9b4050638f..a2eed127dce 100644--- a/static/js/hashchange.js+++ b/static/js/hashchange.js@@ -166,7 +166,7 @@ function do_hashchange_overlay(old_hash) {// We need to show recent topics in the background.// Even though recent topics may not be the default view// here, we show it because we need to show a view in- // background and recent topics seems preferrable for that.+ // background and recent topics seems preferable for that.recent_topics.show();}const base = hash_util.get_hash_category(window.location.hash);diff --git a/static/js/markdown.js b/static/js/markdown.jsindex da5a6b84aa9..87b4f113b9b 100644--- a/static/js/markdown.js+++ b/static/js/markdown.js@@ -239,8 +239,8 @@ export function add_topic_links(message) {link_url = link_url.replace(back_ref, matched_group);i += 1;}- // We store the starting index as well, to sort the order of occurence of the links- // in the topic, similar to the logic implemeted in zerver/lib/markdown/__init__.py+ // We store the starting index as well, to sort the order of occurrence of the links+ // in the topic, similar to the logic implemented in zerver/lib/markdown/__init__.pylinks.push({url: link_url, text: match[0], index: topic.indexOf(match[0])});}}diff --git a/static/js/message_fetch.js b/static/js/message_fetch.jsindex 677f5bbbe0b..b7cd0f49f5c 100644--- a/static/js/message_fetch.js+++ b/static/js/message_fetch.js@@ -458,7 +458,7 @@ export function initialize(home_view_loaded) {// more than a few hundred messages' history, but this strategy// allows "Recent Topics" to always show current data (with gaps)// on page load; the data will be complete once the algorithm- // above catched up to present.+ // above catches up to present.//// (Users will see a weird artifact where Recent Topics has a gap// between E.g. 6 days ago and 37 days ago while the catchupdiff --git a/static/js/recent_topics.js b/static/js/recent_topics.jsindex 854779ae631..3f32bc6e181 100644--- a/static/js/recent_topics.js+++ b/static/js/recent_topics.js@@ -605,7 +605,7 @@ export function change_focused_element($elt, input_key) {}switch (input_key) {- // Allow broswer to handle all+ // Allow browser to handle all// character keypresses.case "vim_left":case "vim_right":diff --git a/static/js/ui_init.js b/static/js/ui_init.jsindex e25ffffa82a..99245179521 100644--- a/static/js/ui_init.js+++ b/static/js/ui_init.js@@ -458,7 +458,7 @@ export function initialize_everything() {const user_status_params = pop_fields("user_status");tippyjs.initialize();- // We need to initialze compose early, because other modules'+ // We need to initialize compose early, because other modules'// initialization expects `#compose` to be already present in the// DOM, dating from when the compose area was part of the backend// template.diff --git a/static/styles/popovers.css b/static/styles/popovers.cssindex 2ca314b4087..46550dcdee0 100644--- a/static/styles/popovers.css+++ b/static/styles/popovers.css@@ -466,7 +466,7 @@ ul {.giphy-gif-img:focus {/* Red outline for clear visibility- * of which image is in foucs.+ * of which image is in focus.*/outline-color: hsl(0, 100%, 50%);}diff --git a/tools/lib/provision.py b/tools/lib/provision.pyindex 563c3256025..4ab703ff965 100755--- a/tools/lib/provision.py+++ b/tools/lib/provision.py@@ -202,7 +202,7 @@ elif "debian" in os_families():DEBIAN_DEPENDECIES = UBUNTU_COMMON_APT_DEPENDENCIES# The below condition is required since libappindicator is# not available for bullseye (sid). "libgroonga1" is an- # additional depedency for postgresql-13-pgdg-pgroonga.+ # additional dependency for postgresql-13-pgdg-pgroonga.## See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037if distro_info["VERSION_CODENAME"] == "bullseye":diff --git a/zerver/lib/hotspots.py b/zerver/lib/hotspots.pyindex ae43ae1875c..dba8e09df78 100644--- a/zerver/lib/hotspots.py+++ b/zerver/lib/hotspots.py@@ -58,7 +58,7 @@ def get_next_hotspots(user: UserProfile) -> List[Dict[str, object]]:# ALWAYS_SEND_ALL_HOTSPOTS has some bugs; see ReadTheDocs (link# above) for details.#- # Since this is just for development purposes, it's convinient for us to send+ # Since this is just for development purposes, it's convenient for us to send# all the hotspots rather than any specific category.if settings.ALWAYS_SEND_ALL_HOTSPOTS:return [diff --git a/zerver/lib/markdown/__init__.py b/zerver/lib/markdown/__init__.pyindex 685d953c9c1..a808b6e8a95 100644--- a/zerver/lib/markdown/__init__.py+++ b/zerver/lib/markdown/__init__.py@@ -1690,7 +1690,7 @@ class BlockQuoteProcessor(markdown.blockprocessors.BlockQuoteProcessor):m = self.RE.search(block)if m:before = block[: m.start()] # Lines before blockquote- # Pass lines before blockquote in recursively for parsing forst.+ # Pass lines before blockquote in recursively for parsing first.self.parser.parseBlocks(parent, [before])# Remove ``> `` from beginning of each line.block = "\n".join([self.clean(line) for line in block[m.start() :].split("\n")])diff --git a/zerver/models.py b/zerver/models.pyindex df2e5a92efd..de4eb3537ad 100644--- a/zerver/models.py+++ b/zerver/models.py@@ -471,11 +471,11 @@ class Realm(models.Model):"id": 2,},"pg": {- "name": "PG - Parental guidence",+ "name": "PG - Parental guidance","id": 3,},"pg-13": {- "name": "PG13 - Parental guidence (under 13)",+ "name": "PG13 - Parental guidance (under 13)","id": 4,},"r": {diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex 87290407a4e..d2da5a1380e 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -6716,7 +6716,7 @@ paths:operationId: add_realm_playgroundtags: ["server_and_organizations"]description: |- Configure realm playgrounds options to run code snippets occuring+ Configure realm playgrounds options to run code snippets occurringin a code block using playgrounds which supports that language.`POST {{ api_url }}/v1/realm/playgrounds`@@ -7364,7 +7364,7 @@ paths:type: integerdescription: |The total number of unread messages to display; this includes private- and group private messages, as well as all messags to unmuted topics+ and group private messages, as well as all messages to unmuted topicson unmuted streams.pms:type: arraydiff --git a/zerver/tests/test_reactions.py b/zerver/tests/test_reactions.pyindex 6425793024d..2efd00cf77a 100644--- a/zerver/tests/test_reactions.py+++ b/zerver/tests/test_reactions.py@@ -583,7 +583,7 @@ class ReactionEventTest(ZulipTestCase):private_message_id = self.send_personal_message(iago,hamlet,- "hello to single reciever",+ "hello to single receiver",)events = []with tornado_redirected_to_list(events):@@ -601,7 +601,7 @@ class ReactionEventTest(ZulipTestCase):huddle_message_id = self.send_huddle_message(hamlet,[polonius, iago],- "hello message to muliple reciever",+ "hello message to muliple receiver",)events = []with tornado_redirected_to_list(events):diff --git a/zerver/tests/test_slack_importer.py b/zerver/tests/test_slack_importer.pyindex e41a0969914..8a03b1ac1ad 100644--- a/zerver/tests/test_slack_importer.py+++ b/zerver/tests/test_slack_importer.py@@ -675,7 +675,7 @@ class SlackImporter(ZulipTestCase):def test_get_message_sending_user(self) -> None:message_with_file = {"subtype": "file", "type": "message", "file": {"user": "U064KUGRJ"}}- message_without_file = {"subtype": "file", "type": "messge", "user": "U064KUGRJ"}+ message_without_file = {"subtype": "file", "type": "message", "user": "U064KUGRJ"}user_file = get_message_sending_user(message_with_file)self.assertEqual(user_file, "U064KUGRJ")diff --git a/zerver/tests/test_timezone.py b/zerver/tests/test_timezone.pyindex f1d504af83e..228c2c000f5 100644--- a/zerver/tests/test_timezone.py+++ b/zerver/tests/test_timezone.py@@ -21,7 +21,7 @@ class TimeZoneTest(ZulipTestCase):("CST", +28800), # China Standard Time("CST", -18000), # Cuba Standard Time("PST", -28800), # Pacific Standard Time- ("PST", +28800), # Phillipine Standard Time+ ("PST", +28800), # Philipine Standard Time("IST", +19800), # India Standard Time("IST", +7200), # Israel Standard Time("IST", +3600), # Ireland Standard Timediff --git a/zerver/webhooks/bitbucket2/tests.py b/zerver/webhooks/bitbucket2/tests.pyindex 1b1830154ef..ae7caa4ba5f 100644--- a/zerver/webhooks/bitbucket2/tests.py+++ b/zerver/webhooks/bitbucket2/tests.py@@ -389,7 +389,7 @@ class Bitbucket2HookTests(WebhookTestCase):def test_bitbucket2_on_push_event_filtered_by_branches_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:- self.url = self.build_webhook_url(branches="changes,devlopment")+ self.url = self.build_webhook_url(branches="changes,development")payload = self.get_body("push")result = self.client_post(self.url, payload, content_type="application/json")self.assertFalse(check_send_webhook_message_mock.called)@@ -399,7 +399,7 @@ class Bitbucket2HookTests(WebhookTestCase):def test_bitbucket2_on_push_commits_above_limit_filtered_by_branches_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:- self.url = self.build_webhook_url(branches="changes,devlopment")+ self.url = self.build_webhook_url(branches="changes,development")payload = self.get_body("push_commits_above_limit")result = self.client_post(self.url, payload, content_type="application/json")self.assertFalse(check_send_webhook_message_mock.called)@@ -409,7 +409,7 @@ class Bitbucket2HookTests(WebhookTestCase):def test_bitbucket2_on_force_push_event_filtered_by_branches_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:- self.url = self.build_webhook_url(branches="changes,devlopment")+ self.url = self.build_webhook_url(branches="changes,development")payload = self.get_body("force_push")result = self.client_post(self.url, payload, content_type="application/json")self.assertFalse(check_send_webhook_message_mock.called)@@ -419,7 +419,7 @@ class Bitbucket2HookTests(WebhookTestCase):def test_bitbucket2_on_push_multiple_committers_filtered_by_branches_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:- self.url = self.build_webhook_url(branches="changes,devlopment")+ self.url = self.build_webhook_url(branches="changes,development")payload = self.get_body("push_multiple_committers")result = self.client_post(self.url, payload, content_type="application/json")self.assertFalse(check_send_webhook_message_mock.called)@@ -429,7 +429,7 @@ class Bitbucket2HookTests(WebhookTestCase):def test_bitbucket2_on_push_multiple_committers_with_others_filtered_by_branches_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:- self.url = self.build_webhook_url(branches="changes,devlopment")+ self.url = self.build_webhook_url(branches="changes,development")payload = self.get_body("push_multiple_committers_with_others")result = self.client_post(self.url, payload, content_type="application/json")self.assertFalse(check_send_webhook_message_mock.called)diff --git a/zerver/worker/queue_processors.py b/zerver/worker/queue_processors.pyindex f6aa3a2eb2b..1728a605d41 100644--- a/zerver/worker/queue_processors.py+++ b/zerver/worker/queue_processors.py@@ -483,7 +483,7 @@ class UserActivityWorker(LoopQueueProcessingWorker):# that used the client name in event["client"] instead of having# event["client_id"] directly.#- # TODO/compatability: We can delete this once it is no+ # TODO/compatibility: We can delete this once it is no# longer possible to directly upgrade from 2.1 to master.if event["client"] not in self.client_id_map:client = get_client(event["client"])diff --git a/zproject/backends.py b/zproject/backends.pyindex 68822ae1e8f..741bb9b49f5 100644--- a/zproject/backends.py+++ b/zproject/backends.py@@ -1825,7 +1825,7 @@ class AppleAuthBackend(SocialAuthMixin, AppleIdAuth):def get_user_details(self, response: Dict[str, Any]) -> Dict[str, Any]:"""- Overriden to correctly grab the user's name from the request params,+ Overridden to correctly grab the user's name from the request params,as current upstream code expects it in the id_token and Apple changedthe API.Taken from https://github.com/python-social-auth/social-core/pull/483