Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
invites: Update translated errors for stream to channel rename.
Lauryn Menarddf3ab8deea40
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex b9f7bbea39c..4e3a46b0025 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -12049,7 +12049,7 @@ paths:- example:{"code": "BAD_REQUEST",- "msg": "Stream does not exist with id: 11. No invites were sent.",+ "msg": "Invalid channel ID 11. No invites were sent.","result": "error",}description: |@@ -12061,7 +12061,7 @@ paths:- example:{"code": "BAD_REQUEST",- "msg": "You do not have permission to subscribe other users to streams.",+ "msg": "You do not have permission to subscribe other users to channels.","result": "error",}description: |@@ -12162,7 +12162,7 @@ paths:- example:{"code": "BAD_REQUEST",- "msg": "Invalid stream ID 11. No invites were sent.",+ "msg": "Invalid channel ID 11. No invites were sent.","result": "error",}description: |@@ -12174,7 +12174,7 @@ paths:- example:{"code": "BAD_REQUEST",- "msg": "You do not have permission to subscribe other users to streams.",+ "msg": "You do not have permission to subscribe other users to channels.","result": "error",}description: |diff --git a/zerver/tests/test_invite.py b/zerver/tests/test_invite.pyindex 761ad295cf8..938dbfbd988 100644--- a/zerver/tests/test_invite.py+++ b/zerver/tests/test_invite.py@@ -1044,7 +1044,7 @@ [email protected]""",self.login("hamlet")self.assert_json_error(self.invite("[email protected]", ["NotARealStream"]),- f"Stream does not exist with id: {self.INVALID_STREAM_ID}. No invites were sent.",+ f"Invalid channel ID {self.INVALID_STREAM_ID}. No invites were sent.",)self.check_sent_emails([])@@ -1293,7 +1293,7 @@ so we didn't send them an invitation. We did send invitations to everyone else!"self.login("hamlet")result = self.invite(invitee, ["Denmark", "Scotland"])self.assert_json_error(- result, "You do not have permission to subscribe other users to streams."+ result, "You do not have permission to subscribe other users to channels.")result = self.invite(invitee, [])@@ -2487,7 +2487,7 @@ class MultiuseInviteTest(ZulipTestCase):},)self.assert_json_error(- result, "You do not have permission to subscribe other users to streams."+ result, "You do not have permission to subscribe other users to channels.")result = self.client_post(@@ -2682,7 +2682,7 @@ class MultiuseInviteTest(ZulipTestCase):"invite_expires_in_minutes": 2 * 24 * 60,},)- self.assert_json_error(result, "Invalid stream ID 54321. No invites were sent.")+ self.assert_json_error(result, "Invalid channel ID 54321. No invites were sent.")def test_create_multiuse_link_invalid_invite_as_api_call(self) -> None:self.login("iago")diff --git a/zerver/views/invite.py b/zerver/views/invite.pyindex 38c3eaec9e9..3431794649b 100644--- a/zerver/views/invite.py+++ b/zerver/views/invite.py@@ -84,14 +84,14 @@ def invite_users_backend((stream, sub) = access_stream_by_id(user_profile, stream_id)except JsonableError:raise JsonableError(- _("Stream does not exist with id: {channel_id}. No invites were sent.").format(+ _("Invalid channel ID {channel_id}. No invites were sent.").format(channel_id=stream_id))streams.append(stream)if len(streams) and not user_profile.can_subscribe_other_users():- raise JsonableError(_("You do not have permission to subscribe other users to streams."))+ raise JsonableError(_("You do not have permission to subscribe other users to channels."))do_invite_users(user_profile,@@ -221,14 +221,14 @@ def generate_multiuse_invite_backend((stream, sub) = access_stream_by_id(user_profile, stream_id)except JsonableError:raise JsonableError(- _("Invalid stream ID {channel_id}. No invites were sent.").format(+ _("Invalid channel ID {channel_id}. No invites were sent.").format(channel_id=stream_id))streams.append(stream)if len(streams) and not user_profile.can_subscribe_other_users():- raise JsonableError(_("You do not have permission to subscribe other users to streams."))+ raise JsonableError(_("You do not have permission to subscribe other users to channels."))invite_link = do_create_multiuse_invite_link(user_profile, invite_as, invite_expires_in_minutes, streams