diff --git a/web/src/info_overlay.js b/web/src/info_overlay.js index 8d02952cda..75fc3c60e3 100644 --- a/web/src/info_overlay.js +++ b/web/src/info_overlay.js @@ -20,14 +20,26 @@ import * as util from "./util"; // set_up_toggler is called. export let toggler; +function format_usage_html(...keys) { + const get_formatted_keys = () => keys.map((key) => `${key}`).join("+"); + return $t_html( + { + defaultMessage: "(or )", + }, + { + "key-html": get_formatted_keys, + }, + ); +} + const markdown_help_rows = [ { markdown: "**bold**", - usage_html: "(or Ctrl+B)", + usage_html: format_usage_html("Ctrl", "B"), }, { markdown: "*italic*", - usage_html: "(or Ctrl+I)", + usage_html: format_usage_html("Ctrl", "I"), }, { markdown: "~~strikethrough~~", @@ -37,7 +49,7 @@ const markdown_help_rows = [ }, { markdown: "[Zulip website](https://zulip.org)", - usage_html: "(or Ctrl+Shift+L)", + usage_html: format_usage_html("Ctrl", "Shift", "L"), }, { markdown: "#**stream name**",