mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
compose: Convert show_preview messages to FormatJS.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
d761077dac
commit
a70061d91f
@@ -1558,7 +1558,10 @@ test_ui("on_events", (override) => {
|
|||||||
|
|
||||||
function test_post_error(error_callback) {
|
function test_post_error(error_callback) {
|
||||||
error_callback();
|
error_callback();
|
||||||
assert.equal($("#preview_content").html(), "translated: Failed to generate preview");
|
assert.equal(
|
||||||
|
$("#preview_content").html(),
|
||||||
|
"translated HTML: Failed to generate preview",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function mock_channel_post(msg) {
|
function mock_channel_post(msg) {
|
||||||
@@ -1598,7 +1601,7 @@ test_ui("on_events", (override) => {
|
|||||||
|
|
||||||
handler(event);
|
handler(event);
|
||||||
|
|
||||||
assert.equal($("#preview_content").html(), "translated: Nothing to preview");
|
assert.equal($("#preview_content").html(), "translated HTML: Nothing to preview");
|
||||||
assert_visibilities();
|
assert_visibilities();
|
||||||
|
|
||||||
let make_indicator_called = false;
|
let make_indicator_called = false;
|
||||||
|
|||||||
@@ -955,7 +955,7 @@ export function render_and_show_preview(preview_spinner, preview_content_box, co
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (content.length === 0) {
|
if (content.length === 0) {
|
||||||
show_preview(i18n.t("Nothing to preview"));
|
show_preview($t_html({defaultMessage: "Nothing to preview"}));
|
||||||
} else {
|
} else {
|
||||||
if (markdown.contains_backend_only_syntax(content)) {
|
if (markdown.contains_backend_only_syntax(content)) {
|
||||||
const spinner = preview_spinner.expectOne();
|
const spinner = preview_spinner.expectOne();
|
||||||
@@ -988,7 +988,7 @@ export function render_and_show_preview(preview_spinner, preview_content_box, co
|
|||||||
if (markdown.contains_backend_only_syntax(content)) {
|
if (markdown.contains_backend_only_syntax(content)) {
|
||||||
loading.destroy_indicator(preview_spinner);
|
loading.destroy_indicator(preview_spinner);
|
||||||
}
|
}
|
||||||
show_preview(i18n.t("Failed to generate preview"));
|
show_preview($t_html({defaultMessage: "Failed to generate preview"}));
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user