Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
search: Adjust text in has: message suggestions.
Karl Stolley7f4fe7282f5c
diff --git a/web/src/search_suggestion.js b/web/src/search_suggestion.jsindex 55ab221dc67..3468fc93f04 100644--- a/web/src/search_suggestion.js+++ b/web/src/search_suggestion.js@@ -575,17 +575,17 @@ function get_has_filter_suggestions(last, operators) {const suggestions = [{search_string: "has:link",- description_html: "messages with one or more link",+ description_html: "messages that contain links",invalid: [{operator: "has", operand: "link"}],},{search_string: "has:image",- description_html: "messages with one or more image",+ description_html: "messages that contain images",invalid: [{operator: "has", operand: "image"}],},{search_string: "has:attachment",- description_html: "messages with one or more attachment",+ description_html: "messages that contain attachments",invalid: [{operator: "has", operand: "attachment"}],},];@@ -747,7 +747,7 @@ export function get_search_result(base_query, query) {// Display the default first// `has` and `is` operators work only on predefined categories. Default suggestion- // is not displayed in that case. e.g. `messages with one or more abc` as+ // is not displayed in that case. e.g. `messages that contain abc` as// a suggestion for `has:abc`does not make sense.if (last.operator !== "" && last.operator !== "has" && last.operator !== "is") {suggestion = get_default_suggestion(search_operators);diff --git a/web/tests/search_suggestion.test.js b/web/tests/search_suggestion.test.jsindex 08302bd287c..241c8d511bb 100644--- a/web/tests/search_suggestion.test.js+++ b/web/tests/search_suggestion.test.js@@ -441,9 +441,9 @@ test("empty_query_suggestions", () => {assert.equal(describe("is:unread"), "Unread messages");assert.equal(describe("is:resolved"), "Topics marked as resolved");assert.equal(describe("sender:[email protected]"), "Sent by me");- assert.equal(describe("has:link"), "Messages with one or more link");- assert.equal(describe("has:image"), "Messages with one or more image");- assert.equal(describe("has:attachment"), "Messages with one or more attachment");+ assert.equal(describe("has:link"), "Messages that contain links");+ assert.equal(describe("has:image"), "Messages that contain images");+ assert.equal(describe("has:attachment"), "Messages that contain attachments");});test("has_suggestions", ({override}) => {@@ -462,17 +462,17 @@ test("has_suggestions", ({override}) => {return suggestions.lookup_table.get(q).description_html;}- assert.equal(describe("has:link"), "Messages with one or more link");- assert.equal(describe("has:image"), "Messages with one or more image");- assert.equal(describe("has:attachment"), "Messages with one or more attachment");+ assert.equal(describe("has:link"), "Messages that contain links");+ assert.equal(describe("has:image"), "Messages that contain images");+ assert.equal(describe("has:attachment"), "Messages that contain attachments");query = "-h";suggestions = get_suggestions("", query);expected = ["-h", "-has:link", "-has:image", "-has:attachment"];assert.deepEqual(suggestions.strings, expected);- assert.equal(describe("-has:link"), "Exclude messages with one or more link");- assert.equal(describe("-has:image"), "Exclude messages with one or more image");- assert.equal(describe("-has:attachment"), "Exclude messages with one or more attachment");+ assert.equal(describe("-has:link"), "Exclude messages that contain links");+ assert.equal(describe("-has:image"), "Exclude messages that contain images");+ assert.equal(describe("-has:attachment"), "Exclude messages that contain attachments");// operand suggestions follow.