diff --git a/analytics/tests/test_stats_views.py b/analytics/tests/test_stats_views.py index 863b5124e8..e96a9a7705 100644 --- a/analytics/tests/test_stats_views.py +++ b/analytics/tests/test_stats_views.py @@ -179,20 +179,20 @@ class TestGetChartData(ZulipTestCase): "everyone": { "Public streams": self.data(100), "Private streams": self.data(0), - "Private messages": self.data(101), - "Group private messages": self.data(0), + "Direct messages": self.data(101), + "Group direct messages": self.data(0), }, "user": { "Public streams": self.data(200), "Private streams": self.data(201), - "Private messages": self.data(0), - "Group private messages": self.data(0), + "Direct messages": self.data(0), + "Group direct messages": self.data(0), }, "display_order": [ - "Private messages", + "Direct messages", "Public streams", "Private streams", - "Group private messages", + "Group direct messages", ], "result": "success", }, @@ -287,8 +287,8 @@ class TestGetChartData(ZulipTestCase): { "Public streams": [0], "Private streams": [0], - "Private messages": [0], - "Group private messages": [0], + "Direct messages": [0], + "Group direct messages": [0], }, ) self.assertEqual( @@ -296,8 +296,8 @@ class TestGetChartData(ZulipTestCase): { "Public streams": [0], "Private streams": [0], - "Private messages": [0], - "Group private messages": [0], + "Direct messages": [0], + "Group direct messages": [0], }, ) diff --git a/analytics/views/stats.py b/analytics/views/stats.py index 7e4c11ceb3..2e9744ba58 100644 --- a/analytics/views/stats.py +++ b/analytics/views/stats.py @@ -293,8 +293,8 @@ def get_chart_data( stats[0]: { "public_stream": _("Public streams"), "private_stream": _("Private streams"), - "private_message": _("Private messages"), - "huddle_message": _("Group private messages"), + "private_message": _("Direct messages"), + "huddle_message": _("Group direct messages"), } } labels_sort_function = lambda data: sort_by_totals(data["everyone"]) diff --git a/zerver/actions/message_edit.py b/zerver/actions/message_edit.py index b8d3557c30..a5b4680df6 100644 --- a/zerver/actions/message_edit.py +++ b/zerver/actions/message_edit.py @@ -85,9 +85,9 @@ def validate_message_edit_payload( if not message.is_stream_message(): if stream_id is not None: - raise JsonableError(_("Private messages cannot be moved to streams.")) + raise JsonableError(_("Direct messages cannot be moved to streams.")) if topic_name is not None: - raise JsonableError(_("Private messages cannot have topics.")) + raise JsonableError(_("Direct messages cannot have topics.")) if propagate_mode != "change_one" and topic_name is None and stream_id is None: raise JsonableError(_("Invalid propagate_mode without topic edit")) diff --git a/zerver/actions/message_send.py b/zerver/actions/message_send.py index 3c8f25ea64..2e10948e07 100644 --- a/zerver/actions/message_send.py +++ b/zerver/actions/message_send.py @@ -1322,7 +1322,7 @@ def check_private_message_policy( # notifications from system bots to users. return - raise JsonableError(_("Private messages are disabled in this organization.")) + raise JsonableError(_("Direct messages are disabled in this organization.")) # check_message: diff --git a/zerver/lib/onboarding.py b/zerver/lib/onboarding.py index b104862472..e5afc4bc6f 100644 --- a/zerver/lib/onboarding.py +++ b/zerver/lib/onboarding.py @@ -70,7 +70,7 @@ def send_initial_pms(user: UserProfile) -> None: content = "".join( [ welcome_msg + " ", - _("This is a private message from me, Welcome Bot.") + "\n\n", + _("This is a direct message from me, Welcome Bot.") + "\n\n", _( "If you are new to Zulip, check out our [Getting started guide]({getting_started_url})!" ), @@ -160,7 +160,7 @@ def select_welcome_bot_response(human_response_lower: str) -> str: + "\n\n", _( "Check out [Recent conversations](#recent) to see what's happening! " - 'You can return to this conversation by clicking "Private messages" in the upper left.' + 'You can return to this conversation by clicking "Direct messages" in the upper left.' ), ] ) diff --git a/zerver/lib/recipient_users.py b/zerver/lib/recipient_users.py index df4d5ed4a5..7baa411609 100644 --- a/zerver/lib/recipient_users.py +++ b/zerver/lib/recipient_users.py @@ -74,7 +74,7 @@ def validate_recipient_user_profiles( realms.add(user_profile.realm_id) if len(realms) > 1: - raise ValidationError(_("You can't send private messages outside of your organization.")) + raise ValidationError(_("You can't send direct messages outside of your organization.")) return list(recipient_profiles_map.values()) diff --git a/zerver/tests/test_message_edit.py b/zerver/tests/test_message_edit.py index e299d2dc58..17dcf268fb 100644 --- a/zerver/tests/test_message_edit.py +++ b/zerver/tests/test_message_edit.py @@ -152,7 +152,7 @@ class EditMessagePayloadTest(EditMessageTestCase): }, ) - self.assert_json_error(result, "Private messages cannot be moved to streams.") + self.assert_json_error(result, "Direct messages cannot be moved to streams.") def test_private_message_edit_topic(self) -> None: hamlet = self.example_user("hamlet") @@ -167,7 +167,7 @@ class EditMessagePayloadTest(EditMessageTestCase): }, ) - self.assert_json_error(result, "Private messages cannot have topics.") + self.assert_json_error(result, "Direct messages cannot have topics.") def test_propagate_invalid(self) -> None: self.login("hamlet") diff --git a/zerver/tests/test_message_send.py b/zerver/tests/test_message_send.py index 2eac9c8c4d..2d705f49aa 100644 --- a/zerver/tests/test_message_send.py +++ b/zerver/tests/test_message_send.py @@ -2351,7 +2351,7 @@ class InternalPrepTest(ZulipTestCase): m.output[0].split("\n")[0], "ERROR:root:Error queueing internal message by {}: {}".format( "cordelia@zulip.com", - "You can't send private messages outside of your organization.", + "You can't send direct messages outside of your organization.", ), ) diff --git a/zerver/tests/test_tutorial.py b/zerver/tests/test_tutorial.py index 1f7c5f161b..8c5b4aa2e9 100644 --- a/zerver/tests/test_tutorial.py +++ b/zerver/tests/test_tutorial.py @@ -107,7 +107,7 @@ class TutorialTests(ZulipTestCase): "In Zulip, topics [tell you what a message is about](/help/streams-and-topics). " "They are light-weight subjects, very similar to the subject line of an email.\n\n" "Check out [Recent conversations](#recent) to see what's happening! " - 'You can return to this conversation by clicking "Private messages" in the upper left.' + 'You can return to this conversation by clicking "Direct messages" in the upper left.' ) self.assertEqual(most_recent_message(user).content, expected_response) diff --git a/zerver/tests/test_typing.py b/zerver/tests/test_typing.py index 2af6ae15b1..5df3671d09 100644 --- a/zerver/tests/test_typing.py +++ b/zerver/tests/test_typing.py @@ -448,9 +448,7 @@ class TestSendTypingNotificationsSettings(ZulipTestCase): with self.tornado_redirected_to_list(events, expected_num_events=0): result = self.api_post(sender, "/api/v1/typing", params) - self.assert_json_error( - result, "User has disabled typing notifications for private messages" - ) + self.assert_json_error(result, "User has disabled typing notifications for direct messages") self.assertEqual(events, []) def test_send_stream_typing_notifications_setting(self) -> None: diff --git a/zerver/views/typing.py b/zerver/views/typing.py index 446448ee4a..7c991dc52c 100644 --- a/zerver/views/typing.py +++ b/zerver/views/typing.py @@ -49,7 +49,7 @@ def send_notification_backend( do_send_stream_typing_notification(user_profile, operator, stream, topic) else: if not user_profile.send_private_typing_notifications: - raise JsonableError(_("User has disabled typing notifications for private messages")) + raise JsonableError(_("User has disabled typing notifications for direct messages")) user_ids = notification_to check_send_typing_notification(user_profile, user_ids, operator)