如何使用 <Trans id="xxx"/> (@lingui/react) 在 .po 翻译文件中使用 HTML 标记
How to use HTML markups in .po translation files using <Trans id="xxx"/> (@lingui/react)
在我的 React 代码中我有:
<Trans id={"hello"} />
在 .po 文件中我有:
msgid "hello"
msgstr "Hello <strong> world! </strong>"
但翻译不适用于 <strong>
。有没有办法让这段文字加粗?
谢谢
我找到了解决方案:
<Trans id={"hello"}>
<strong>world!</strong>
</Trans>
msgid "hello"
msgstr "Hello <0> world! </0>"
在我的 React 代码中我有:
<Trans id={"hello"} />
在 .po 文件中我有:
msgid "hello"
msgstr "Hello <strong> world! </strong>"
但翻译不适用于 <strong>
。有没有办法让这段文字加粗?
谢谢
我找到了解决方案:
<Trans id={"hello"}>
<strong>world!</strong>
</Trans>
msgid "hello"
msgstr "Hello <0> world! </0>"