Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
exceptions: Update translated errors for stream to channel rename.
Lauryn Menard0b5f325e487c
diff --git a/zerver/lib/exceptions.py b/zerver/lib/exceptions.pyindex b6c7f5e970c..e9e04f2bc1d 100644--- a/zerver/lib/exceptions.py+++ b/zerver/lib/exceptions.py@@ -174,7 +174,7 @@ class StreamDoesNotExistError(JsonableError):@staticmethod@overridedef msg_format() -> str:- return _("Stream '{stream}' does not exist")+ return _("Channel '{stream}' does not exist")class StreamWithIDDoesNotExistError(JsonableError):@@ -187,7 +187,7 @@ class StreamWithIDDoesNotExistError(JsonableError):@staticmethod@overridedef msg_format() -> str:- return _("Stream with ID '{stream_id}' does not exist")+ return _("Channel with ID '{stream_id}' does not exist")class CannotDeactivateLastUserError(JsonableError):@@ -631,7 +631,7 @@ class StreamWildcardMentionNotAllowedError(JsonableError):@staticmethod@overridedef msg_format() -> str:- return _("You do not have permission to use stream wildcard mentions in this stream.")+ return _("You do not have permission to use channel wildcard mentions in this channel.")class TopicWildcardMentionNotAllowedError(JsonableError):diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex 1c42b1199f4..b9f7bbea39c 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -6653,7 +6653,7 @@ paths:- example:{"result": "error",- "msg": "You do not have permission to use stream wildcard mentions in this stream.",+ "msg": "You do not have permission to use channel wildcard mentions in this channel.","code": "STREAM_WILDCARD_MENTION_NOT_ALLOWED",}description: |@@ -8010,7 +8010,7 @@ paths:- example:{"result": "error",- "msg": "You do not have permission to use stream wildcard mentions in this stream.",+ "msg": "You do not have permission to use channel wildcard mentions in this channel.","code": "STREAM_WILDCARD_MENTION_NOT_ALLOWED",}description: |@@ -21300,9 +21300,9 @@ components:example:{"code": "STREAM_DOES_NOT_EXIST",- "msg": "Stream 'nonexistent_stream' does not exist",+ "msg": "Channel 'nonexistent' does not exist","result": "error",- "stream": "nonexistent_stream",+ "stream": "nonexistent",}NonExistingStreamIdError:allOf:@@ -21319,7 +21319,7 @@ components:example:{"code": "STREAM_DOES_NOT_EXIST",- "msg": "Stream with ID '9' does not exist",+ "msg": "Channel with ID '9' does not exist","result": "error","stream_id": 9,}diff --git a/zerver/tests/test_message_edit.py b/zerver/tests/test_message_edit.pyindex 55d7298f8c0..e7b633bd918 100644--- a/zerver/tests/test_message_edit.py+++ b/zerver/tests/test_message_edit.py@@ -1423,7 +1423,7 @@ class EditMessageTest(ZulipTestCase):},)self.assert_json_error(- result, "You do not have permission to use stream wildcard mentions in this stream."+ result, "You do not have permission to use channel wildcard mentions in this channel.")with mock.patch("zerver.lib.message.num_subscribers_for_stream_id", return_value=14):diff --git a/zerver/tests/test_message_send.py b/zerver/tests/test_message_send.pyindex 0ba9464342c..e3ad1d69ff0 100644--- a/zerver/tests/test_message_send.py+++ b/zerver/tests/test_message_send.py@@ -135,7 +135,7 @@ class MessagePOSTTest(ZulipTestCase):"topic": "Test topic for stream ID message",},)- self.assert_json_error(result, "Stream with ID '99999' does not exist")+ self.assert_json_error(result, "Channel with ID '99999' does not exist")msg = self.get_last_message()expected = (@@ -558,7 +558,7 @@ class MessagePOSTTest(ZulipTestCase):"topic": "Test topic",},)- self.assert_json_error(result, "Stream 'nonexistent_stream' does not exist")+ self.assert_json_error(result, "Channel 'nonexistent_stream' does not exist")def test_message_to_nonexistent_stream_with_bad_characters(self) -> None:"""@@ -576,7 +576,7 @@ class MessagePOSTTest(ZulipTestCase):},)self.assert_json_error(- result, "Stream '&<"'><non-existent>' does not exist"+ result, "Channel '&<"'><non-existent>' does not exist")def test_message_to_stream_with_automatically_change_visibility_policy(self) -> None:@@ -1961,7 +1961,7 @@ class StreamMessagesTest(ZulipTestCase):else:with self.assertRaisesRegex(JsonableError,- "You do not have permission to use stream wildcard mentions in this stream.",+ "You do not have permission to use channel wildcard mentions in this channel.",):self.send_stream_message(sender, "test_stream", content)