Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
info_overlay: Convert note_html messages to FormatJS.
Anders Kaseorga33ee8c36f2b
diff --git a/static/js/info_overlay.js b/static/js/info_overlay.jsindex 1d4206c3d90..1d369cdf7b0 100644--- a/static/js/info_overlay.js+++ b/static/js/info_overlay.js@@ -5,7 +5,7 @@ import render_markdown_help from "../templates/markdown_help.hbs";import * as browser_history from "./browser_history";import * as common from "./common";import * as components from "./components";-import {i18n} from "./i18n";+import {$t_html, i18n} from "./i18n";import * as keydown_util from "./keydown_util";import * as markdown from "./markdown";import * as overlays from "./overlays";@@ -101,8 +101,15 @@ def zulip():<span class="k">print</span> <span class="s">"Zulip"</span></pre></div>`,},{- note_html: i18n.t(- 'To add syntax highlighting to a multi-line code block, add the language\'s <b>first</b> <a target="_blank" rel="noopener noreferrer" href="https://pygments.org/docs/lexers/">Pygments short name</a> after the first set of back-ticks. You can also make a code block by indenting each line with 4 spaces.',+ note_html: $t_html(+ {+ defaultMessage:+ "To add syntax highlighting to a multi-line code block, add the language's <b>first</b> <z-link>Pygments short name</z-link> after the first set of back-ticks. You can also make a code block by indenting each line with 4 spaces.",+ },+ {+ "z-link": (content_html) =>+ `<a target="_blank" rel="noopener noreferrer" href="https://pygments.org/docs/lexers/">${content_html}</a>`,+ },),},{@@ -130,8 +137,15 @@ This text won't be visible until the user clicks.\`\`\``,},{- note_html: i18n.t(- 'You can also make <a target="_blank" rel="noopener noreferrer" href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-tables">tables</a> with this <a target="_blank" rel="noopener noreferrer" href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-tables">Markdown-ish table syntax</a>.',+ note_html: $t_html(+ {+ defaultMessage:+ "You can also make <z-link>tables</z-link> with this <z-link>Markdown-ish table syntax</z-link>.",+ },+ {+ "z-link": (content_html) =>+ `<a target="_blank" rel="noopener noreferrer" href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-tables">${content_html}</a>`,+ },),},];