notification bot: Update message for stream name changes.

Also properly internationalizes string formatting arguments for the stream
created message.
This commit is contained in:
Rishi Gupta
2019-07-19 11:13:21 -07:00
committed by Tim Abbott
parent 9d6727d18c
commit c9f194be99
4 changed files with 13 additions and 9 deletions

View File

@@ -3564,10 +3564,13 @@ def do_rename_stream(stream: Stream,
stream.realm,
sender,
stream,
"welcome",
"@_**%s|%d** renamed stream **%s** to **%s**" % (user_profile.full_name,
user_profile.id,
old_name, new_name)
_('stream events'),
_('@_**%(user_name)s|%(user_id)d** renamed stream **%(old_stream_name)s** to '
'**%(new_stream_name)s**.') % {
'user_name': user_profile.full_name,
'user_id': user_profile.id,
'old_stream_name': old_name,
'new_stream_name': new_name}
)
# Even though the token doesn't change, the web client needs to update the
# email forwarding address to display the correctly-escaped new name.