Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_list: Convert bookend_content messages to FormatJS.
Anders Kaseorg70bf9914b26d
diff --git a/static/js/message_list.js b/static/js/message_list.jsindex db9461e53a0..2c916a41aaa 100644--- a/static/js/message_list.js+++ b/static/js/message_list.js@@ -2,7 +2,7 @@ import autosize from "autosize";import $ from "jquery";import * as blueslip from "./blueslip";-import {i18n} from "./i18n";+import {$t} from "./i18n";import {MessageListData} from "./message_list_data";import {MessageListView} from "./message_list_view";import * as narrow_banner from "./narrow_banner";@@ -232,19 +232,22 @@ export class MessageList {}subscribed_bookend_content(stream_name) {- return i18n.t("You subscribed to stream __stream__", {stream: stream_name});+ return $t({defaultMessage: "You subscribed to stream {stream}"}, {stream: stream_name});}unsubscribed_bookend_content(stream_name) {- return i18n.t("You unsubscribed from stream __stream__", {stream: stream_name});+ return $t({defaultMessage: "You unsubscribed from stream {stream}"}, {stream: stream_name});}not_subscribed_bookend_content(stream_name) {- return i18n.t("You are not subscribed to stream __stream__", {stream: stream_name});+ return $t(+ {defaultMessage: "You are not subscribed to stream {stream}"},+ {stream: stream_name},+ );}deactivated_bookend_content() {- return i18n.t("This stream has been deactivated");+ return $t({defaultMessage: "This stream has been deactivated"});}// Maintains a trailing bookend element explaining any changes indiff --git a/static/templates/bookend.hbs b/static/templates/bookend.hbsindex a98ead02419..6ddbfa932b1 100644--- a/static/templates/bookend.hbs+++ b/static/templates/bookend.hbs@@ -2,7 +2,7 @@{{#if bookend_content}}<div class="{{#if trailing}}trailing_bookend{{/if}} bookend sub-unsub-message">- <span>{{{bookend_content}}}</span>+ <span>{{bookend_content}}</span>{{#if trailing}}<div class="sub_button_row new-style"><button class="button white rounded stream_sub_unsub_button {{#unless subscribed}}sea-green{{/unless}}" type="button" name="subscription">