Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
util: Fix spelling mistake.
Aman Agrawal903e65aba82c
diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.tsindex c3191a81801..5ca59672e7c 100644--- a/web/src/inbox_ui.ts+++ b/web/src/inbox_ui.ts@@ -319,7 +319,7 @@ function format_dm(const context = {conversation_key: user_ids_string,is_direct: true,- rendered_dm_with: util.format_array_as_list_with_conjuction(rendered_dm_with, "long"),+ rendered_dm_with: util.format_array_as_list_with_conjunction(rendered_dm_with, "long"),is_group: recipient_ids.length > 1,user_circle_class,is_bot,diff --git a/web/src/people.ts b/web/src/people.tsindex 1d96896723a..0868b17c02c 100644--- a/web/src/people.ts+++ b/web/src/people.ts@@ -469,7 +469,7 @@ export function format_recipients(users_ids_string: string,join_strategy: "long" | "narrow",): string {- const formatted_recipients_string = util.format_array_as_list_with_conjuction(+ const formatted_recipients_string = util.format_array_as_list_with_conjunction(get_recipients(users_ids_string),join_strategy,);diff --git a/web/src/realm_playground.ts b/web/src/realm_playground.tsindex 0ea1f0aa66d..264699305bb 100644--- a/web/src/realm_playground.ts+++ b/web/src/realm_playground.ts@@ -88,7 +88,7 @@ export function get_pygments_typeahead_list_for_settings(query: string): Map<str}for (const [key, values] of map_pygments_pretty_name_to_aliases) {- const formatted_string = util.format_array_as_list_with_conjuction(values, "narrow");+ const formatted_string = util.format_array_as_list_with_conjunction(values, "narrow");language_labels.set(key, key + " (" + formatted_string + ")");}diff --git a/web/src/util.ts b/web/src/util.tsindex bf77c23cce8..db961aa6144 100644--- a/web/src/util.ts+++ b/web/src/util.ts@@ -441,7 +441,7 @@ export function format_array_as_list(return list_formatter.format(array);}-export function format_array_as_list_with_conjuction(+export function format_array_as_list_with_conjunction(array: string[],// long uses "and", narrow uses commas.join_strategy: "long" | "narrow",diff --git a/web/tests/util.test.cjs b/web/tests/util.test.cjsindex 5b65c40e5a8..8081ccf4d9b 100644--- a/web/tests/util.test.cjs+++ b/web/tests/util.test.cjs@@ -374,11 +374,11 @@ run_test("format_array_as_list", () => {// Conjunction formatassert.equal(- util.format_array_as_list_with_conjuction(array, "narrow"),+ util.format_array_as_list_with_conjunction(array, "narrow"),"apple, banana, orange",);assert.equal(- util.format_array_as_list_with_conjuction(array, "long"),+ util.format_array_as_list_with_conjunction(array, "long"),"apple, banana, and orange",);@@ -395,11 +395,11 @@ run_test("format_array_as_list", () => {);assert.equal(- util.format_array_as_list_with_conjuction(array, "narrow"),+ util.format_array_as_list_with_conjunction(array, "narrow"),"apple, banana, orange",);assert.equal(- util.format_array_as_list_with_conjuction(array, "long"),+ util.format_array_as_list_with_conjunction(array, "long"),"apple, banana, orange",);});