Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compose: Add missing translation tag to quoting placeholder.
Tim Abbott23558ebd39c1
diff --git a/frontend_tests/node_tests/compose_actions.js b/frontend_tests/node_tests/compose_actions.jsindex 2ba4982e4e6..b01b45a05da 100644--- a/frontend_tests/node_tests/compose_actions.js+++ b/frontend_tests/node_tests/compose_actions.js@@ -338,7 +338,7 @@ test("quote_and_reply", ({override}) => {let expected_replacement;let replaced;override(compose_ui, "replace_syntax", (syntax, replacement) => {- assert.equal(syntax, "[Quoting…]");+ assert.equal(syntax, "translated: [Quoting…]");assert.equal(replacement, expected_replacement);replaced = true;});@@ -361,7 +361,7 @@ test("quote_and_reply", ({override}) => {override(message_lists.current, "selected_id", () => 100);override(compose_ui, "insert_syntax_and_focus", (syntax) => {- assert.equal(syntax, "[Quoting…]\n");+ assert.equal(syntax, "translated: [Quoting…]\n");});const opts = {diff --git a/frontend_tests/node_tests/compose_ui.js b/frontend_tests/node_tests/compose_ui.jsindex f5e1e560bc1..b04b19fdf45 100644--- a/frontend_tests/node_tests/compose_ui.js+++ b/frontend_tests/node_tests/compose_ui.js@@ -162,9 +162,9 @@ run_test("smart_insert", () => {textbox = make_textbox("");textbox.caret(0);textbox.trigger("blur");- compose_ui.smart_insert(textbox, "[Quoting…]\n");- assert.equal(textbox.insert_text, "[Quoting…]\n");- assert.equal(textbox.val(), "[Quoting…]\n");+ compose_ui.smart_insert(textbox, "translated: [Quoting…]\n");+ assert.equal(textbox.insert_text, "translated: [Quoting…]\n");+ assert.equal(textbox.val(), "translated: [Quoting…]\n");assert.ok(textbox.focused);textbox = make_textbox("abc");@@ -342,7 +342,7 @@ run_test("quote_and_reply", ({override}) => {set_compose_content_with_caret("hello %there"); // "%" is used to encode/display position of focus before changecompose_actions.quote_and_reply();- assert.equal(get_compose_content_with_caret(), "hello \n[Quoting…]\n%there");+ assert.equal(get_compose_content_with_caret(), "hello \ntranslated: [Quoting…]\n%there");success_function({raw_content: "Testing caret position",@@ -358,7 +358,7 @@ run_test("quote_and_reply", ({override}) => {// add a newline before the quoted message.set_compose_content_with_caret("%hello there");compose_actions.quote_and_reply();- assert.equal(get_compose_content_with_caret(), "[Quoting…]\n%hello there");+ assert.equal(get_compose_content_with_caret(), "translated: [Quoting…]\n%hello there");success_function({raw_content: "Testing with caret initially positioned at 0.",@@ -381,7 +381,7 @@ run_test("quote_and_reply", ({override}) => {// quoting a message, the quoted message should be placed// at the beginning of compose-box.compose_actions.quote_and_reply();- assert.equal(get_compose_content_with_caret(), "[Quoting…]\n%");+ assert.equal(get_compose_content_with_caret(), "translated: [Quoting…]\n%");success_function({raw_content: "Testing with compose-box closed initially.",@@ -399,7 +399,7 @@ run_test("quote_and_reply", ({override}) => {// message should start from the beginning of compose-box.set_compose_content_with_caret(" \n\n \n %");compose_actions.quote_and_reply();- assert.equal(get_compose_content_with_caret(), "[Quoting…]\n%");+ assert.equal(get_compose_content_with_caret(), "translated: [Quoting…]\n%");success_function({raw_content: "Testing with compose-box containing whitespaces and newlines only.",diff --git a/static/js/compose_actions.js b/static/js/compose_actions.jsindex ea2c62f9dcf..5559132b25d 100644--- a/static/js/compose_actions.js+++ b/static/js/compose_actions.js@@ -463,7 +463,7 @@ export function quote_and_reply(opts) {const textarea = $("#compose-textarea");const message_id = message_lists.current.selected_id();const message = message_lists.current.selected_message();- const quoting_placeholder = "[Quoting…]";+ const quoting_placeholder = $t({defaultMessage: "[Quoting…]"});if (compose_state.has_message_content()) {// The user already started typing a message,