invites: Update translated errors for stream to channel rename.

In zerver/views/invite.py, updates translated errors strings to
use channel instead of stream.

Part of stream to channel rename project.
This commit is contained in:
Lauryn Menard
2024-04-17 18:18:56 +02:00
committed by Tim Abbott
parent 9aaddc6231
commit df3ab8deea
3 changed files with 12 additions and 12 deletions

View File

@@ -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