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.

Correctly hyphenate “non-”.

Anders Kaseorg6331a314d464
diff --git a/frontend_tests/node_tests/message_flags.js b/frontend_tests/node_tests/message_flags.js
index e2f52df4148..0620e4c03c4 100644
--- a/frontend_tests/node_tests/message_flags.js
+++ b/frontend_tests/node_tests/message_flags.js
@@ -238,7 +238,7 @@ run_test("read", ({override}) => {
channel_post_opts.success(success_response_data);
assert.ok(events.timer_set);
- // Mark them non local
+ // Mark them non-local
local_msg_1.locally_echoed = false;
local_msg_2.locally_echoed = false;
diff --git a/frontend_tests/node_tests/narrow.js b/frontend_tests/node_tests/narrow.js
index b81a39fd969..d64109da72b 100644
--- a/frontend_tests/node_tests/narrow.js
+++ b/frontend_tests/node_tests/narrow.js
@@ -215,7 +215,7 @@ run_test("show_empty_narrow_message", ({mock_template}) => {
empty_narrow_html("translated: This stream does not exist or is private."),
);
- // for non sub public stream
+ // for non-subbed public stream
stream_data.add_sub({name: "ROME", stream_id: 99});
set_filter([["stream", "Rome"]]);
hide_all_empty_narrow_messages();
@@ -228,7 +228,7 @@ run_test("show_empty_narrow_message", ({mock_template}) => {
),
);
- // for non web-public stream for spectator
+ // for non-web-public stream for spectator
page_params.is_spectator = true;
set_filter([["stream", "Rome"]]);
hide_all_empty_narrow_messages();
diff --git a/frontend_tests/node_tests/recent_topics.js b/frontend_tests/node_tests/recent_topics.js
index f12462cefb7..2064cd41212 100644
--- a/frontend_tests/node_tests/recent_topics.js
+++ b/frontend_tests/node_tests/recent_topics.js
@@ -265,7 +265,7 @@ function get_topic_key(stream_id, topic) {
function generate_topic_data(topic_info_array) {
// Since most of the fields are common, this function helps generate fixtures
- // with non common fields.
+ // with non-common fields.
$.clear_all_elements();
const data = [];
diff --git a/zerver/lib/markdown/__init__.py b/zerver/lib/markdown/__init__.py
index ee904283dce..89a1832cd62 100644
--- a/zerver/lib/markdown/__init__.py
+++ b/zerver/lib/markdown/__init__.py
@@ -1402,7 +1402,7 @@ class Timestamp(markdown.inlinepatterns.Pattern):
return time_element
-# All of our emojis(non ZWJ sequences) belong to one of these Unicode blocks:
+# All of our emojis (excluding ZWJ sequences) belong to one of these Unicode blocks:
# \U0001f100-\U0001f1ff - Enclosed Alphanumeric Supplement
# \U0001f200-\U0001f2ff - Enclosed Ideographic Supplement
# \U0001f300-\U0001f5ff - Miscellaneous Symbols and Pictographs
@@ -1737,7 +1737,7 @@ class MarkdownListPreprocessor(markdown.preprocessors.Preprocessor):
copy = lines[:]
for i in range(len(lines) - 1):
# Ignore anything that is inside a fenced code block but not quoted.
- # We ignore all lines where some parent is a non quote code block.
+ # We ignore all lines where some parent is a non-quote code block.
m = FENCE_RE.match(lines[i])
if m:
fence_str = m.group("fence")
diff --git a/zerver/tests/test_message_edit.py b/zerver/tests/test_message_edit.py
index 051b7cedc45..1c2d4973b6b 100644
--- a/zerver/tests/test_message_edit.py
+++ b/zerver/tests/test_message_edit.py
@@ -385,7 +385,7 @@ class EditMessageTest(EditMessageTestCase):
non_web_public_stream = self.make_stream("non-web-public-stream")
self.subscribe(user_profile, non_web_public_stream.name)
non_web_public_stream_msg_id = self.send_stream_message(
- user_profile, non_web_public_stream.name, content="non web-public message"
+ user_profile, non_web_public_stream.name, content="non-web-public message"
)
# Generate a private message to use in verification.
diff --git a/zerver/tests/test_message_fetch.py b/zerver/tests/test_message_fetch.py
index 69da0db8735..aac69ab158d 100644
--- a/zerver/tests/test_message_fetch.py
+++ b/zerver/tests/test_message_fetch.py
@@ -1563,7 +1563,7 @@ class GetOldMessagesTest(ZulipTestCase):
result = self.client_get("/json/messages", dict(rome_web_public_get_params))
self.assert_json_success(result)
- # Cannot access non web-public stream even with `streams:web-public` narrow.
+ # Cannot access non-web-public stream even with `streams:web-public` narrow.
scotland_web_public_get_params: Dict[str, Union[int, str, bool]] = {
**get_params,
"narrow": orjson.dumps(
@@ -1581,7 +1581,7 @@ class GetOldMessagesTest(ZulipTestCase):
def setup_web_public_test(self, num_web_public_message: int = 1) -> None:
"""
- Send N+2 messages, N in a web-public stream, then one in a non web-public stream
+ Send N+2 messages, N in a web-public stream, then one in a non-web-public stream
and then a private message.
"""
user_profile = self.example_user("iago")
@@ -1599,7 +1599,7 @@ class GetOldMessagesTest(ZulipTestCase):
user_profile, web_public_stream.name, content="web-public message"
)
self.send_stream_message(
- user_profile, non_web_public_stream.name, content="non web-public message"
+ user_profile, non_web_public_stream.name, content="non-web-public message"
)
self.send_personal_message(
user_profile, self.example_user("hamlet"), content="private message"
diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py
index 07f987f359b..d3fb42204f0 100644
--- a/zerver/tests/test_subs.py
+++ b/zerver/tests/test_subs.py
@@ -4635,7 +4635,7 @@ class SubscriptionAPITest(ZulipTestCase):
# peer_add event recipient list
self.assertNotIn(user_id, event_sent_to_ids)
for old_user in orig_user_ids_to_subscribe:
- # Check non new users are in peer_add event recipient list.
+ # Check non-new users are in peer_add event recipient list.
self.assertIn(old_user, event_sent_to_ids)
def test_users_getting_remove_peer_event(self) -> None:
@@ -5934,7 +5934,7 @@ class GetSubscribersTest(ZulipTestCase):
self.assert_length(unsubscribed_streams, 1)
self.assert_length(unsubscribed_streams[0]["subscribers"], 1)
- # Test non admin users cannot get previously subscribed private stream's subscribers.
+ # Test non-admin users cannot get previously subscribed private stream's subscribers.
sub_data = gather_subscriptions_helper(non_admin_user)
self.verify_sub_fields(sub_data)
unsubscribed_streams = sub_data.unsubscribed
@@ -6065,7 +6065,7 @@ class GetSubscribersTest(ZulipTestCase):
def test_nonsubscriber_private_stream(self) -> None:
"""
- A non-subscriber non realm admin user to a private stream can't query that stream's membership.
+ A non-subscriber non-realm-admin user to a private stream can't query that stream's membership.
But unsubscribed realm admin users can query private stream's membership.
"""
# Create a private stream for which Hamlet is the only subscriber.
diff --git a/zerver/tests/test_thumbnail.py b/zerver/tests/test_thumbnail.py
index 91eefcdf976..7432a2c8698 100644
--- a/zerver/tests/test_thumbnail.py
+++ b/zerver/tests/test_thumbnail.py
@@ -60,7 +60,7 @@ class ThumbnailTest(ZulipTestCase):
uri = json["uri"]
add_ratelimit_rule(86400, 1000, domain="spectator_attachment_access_by_file")
- # Deny file access for non web-public stream
+ # Deny file access for non-web-public stream
self.subscribe(self.example_user("hamlet"), "Denmark")
host = self.example_user("hamlet").realm.host
body = f"First message ...[zulip.txt](http://{host}" + uri + ")"
diff --git a/zerver/tests/test_upload.py b/zerver/tests/test_upload.py
index 8ddf7d5221c..9b3fd869094 100644
--- a/zerver/tests/test_upload.py
+++ b/zerver/tests/test_upload.py
@@ -253,7 +253,7 @@ class FileUploadTest(UploadSerializeMixin, ZulipTestCase):
self.assert_json_success(result)
add_ratelimit_rule(86400, 1000, domain="spectator_attachment_access_by_file")
- # Deny file access for non web-public stream
+ # Deny file access for non-web-public stream
self.subscribe(self.example_user("hamlet"), "Denmark")
host = self.example_user("hamlet").realm.host
body = f"First message ...[zulip.txt](http://{host}" + uri + ")"
diff --git a/zerver/tests/test_widgets.py b/zerver/tests/test_widgets.py
index 91757fe3626..ab641f62d3c 100644
--- a/zerver/tests/test_widgets.py
+++ b/zerver/tests/test_widgets.py
@@ -385,7 +385,7 @@ class WidgetContentTestCase(ZulipTestCase):
self.assertEqual(get_widget_type(message_id=message.id), "poll")
- submessage.content = "bogus non json"
+ submessage.content = "bogus non-json"
submessage.save()
self.assertEqual(get_widget_type(message_id=message.id), None)
diff --git a/zerver/views/message_fetch.py b/zerver/views/message_fetch.py
index 6f7a4ef2258..c09e8c60d39 100644
--- a/zerver/views/message_fetch.py
+++ b/zerver/views/message_fetch.py
@@ -303,7 +303,7 @@ class NarrowBuilder:
def by_streams(self, query: Select, operand: str, maybe_negate: ConditionTransform) -> Select:
if operand == "public":
- # Get all both subscribed and non subscribed public streams
+ # Get all both subscribed and non-subscribed public streams
# but exclude any private subscribed streams.
recipient_queryset = get_public_streams_queryset(self.realm)
elif operand == "web-public":
@@ -968,7 +968,7 @@ def get_messages_backend(
#
# GetOldMessagesTest.test_unauthenticated_* tests ensure
# that we are not leaking any secure data (private messages and
- # non web-public-stream messages) via this path.
+ # non-web-public stream messages) via this path.
if not realm.allow_web_public_streams_access():
raise MissingAuthenticationError()
if not is_web_public_narrow(narrow):
diff --git a/zerver/webhooks/opencollective/view.py b/zerver/webhooks/opencollective/view.py
index c58b5ed61ea..f451f3cdb24 100644
--- a/zerver/webhooks/opencollective/view.py
+++ b/zerver/webhooks/opencollective/view.py
@@ -28,7 +28,7 @@ def api_opencollective_webhook(
if name == "Incognito": # Incognito donation
body = f"An **Incognito** member donated **{amount}**! :tada:"
- else: # non - Incognito donation
+ else: # non-Incognito donation
body = f"@_**{name}** donated **{amount}**! :tada:"
topic = "New Member"