mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	util: Fix spelling mistake.
This commit is contained in:
		@@ -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,
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
    );
 | 
			
		||||
 
 | 
			
		||||
@@ -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 + ")");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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",
 | 
			
		||||
 
 | 
			
		||||
@@ -374,11 +374,11 @@ run_test("format_array_as_list", () => {
 | 
			
		||||
 | 
			
		||||
    // Conjunction format
 | 
			
		||||
    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, 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",
 | 
			
		||||
        );
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user