Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
private-messages: Update translated backend strings use "direct message".
Lauryn Menarda0fd7b2afc03
diff --git a/analytics/tests/test_stats_views.py b/analytics/tests/test_stats_views.pyindex 863b5124e80..e96a9a77057 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.pyindex 7e4c11ceb3d..2e9744ba583 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.pyindex b8d3557c304..a5b4680df6c 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.pyindex 3c8f25ea648..2e10948e07b 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.pyindex b1048624728..e5afc4bc6f2 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.pyindex df4d5ed4a5f..7baa411609d 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.pyindex e299d2dc583..17dcf268fb3 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.pyindex 2eac9c8c4d2..2d705f49aa7 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(- "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.pyindex 1f7c5f161b1..8c5b4aa2e9c 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.pyindex 2af6ae15b11..5df3671d095 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.pyindex 446448ee4a2..7c991dc52ce 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_tocheck_send_typing_notification(user_profile, user_ids, operator)