ui_report: Convert messages to FormatJS.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-04-12 20:18:25 -07:00
committed by Tim Abbott
parent 073ec04335
commit a397d51670
24 changed files with 209 additions and 123 deletions

View File

@@ -3,7 +3,7 @@ import $ from "jquery";
import render_admin_default_streams_list from "../templates/admin_default_streams_list.hbs";
import * as channel from "./channel";
import {i18n} from "./i18n";
import {$t_html} from "./i18n";
import * as ListWidget from "./list_widget";
import * as loading from "./loading";
import {page_params} from "./page_params";
@@ -80,9 +80,9 @@ function make_stream_default(stream_id) {
data,
error(xhr) {
if (xhr.status.toString().charAt(0) === "4") {
ui_report.error(i18n.t("Failed"), xhr, default_stream_status);
ui_report.error($t_html({defaultMessage: "Failed"}), xhr, default_stream_status);
} else {
ui_report.error(i18n.t("Failed"), default_stream_status);
ui_report.error($t_html({defaultMessage: "Failed"}), default_stream_status);
}
default_stream_status.show();
},