Enable proper i18n for date utils
This commit is contained in:
parent
573ababb8c
commit
716e2effbc
3 changed files with 40 additions and 23 deletions
|
@ -82,14 +82,36 @@ export default class HTMLExporter extends Exporter {
|
|||
creatorName,
|
||||
});
|
||||
|
||||
const exportedText = _t(`This is the start of export of <b>%(roomName)s</b>.
|
||||
Exported by %(exporterDetails)s at %(exportDate)s. `, {
|
||||
exportDate,
|
||||
roomName: this.room.name,
|
||||
exporterDetails: `<a href="https://matrix.to/#/${exporter}" target="_blank" rel="noopener noreferrer">
|
||||
${exporterName ? `<b>${ exporterName }</b>(${ exporter })` : `<b>${ exporter }</b>`}
|
||||
</a>`,
|
||||
});
|
||||
const exportedText = renderToStaticMarkup(
|
||||
<p>
|
||||
{_t(
|
||||
"This is the start of export of <roomName/>. Exported by <exporterDetails/> at %(exportDate)s.",
|
||||
{
|
||||
exportDate,
|
||||
},
|
||||
{
|
||||
roomName: () => <b>{this.room.name}</b>,
|
||||
exporterDetails: () => (
|
||||
<a
|
||||
href={`https://matrix.to/#/${exporter}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{exporterName ? (
|
||||
<>
|
||||
<b>{exporterName}</b>
|
||||
{exporter}
|
||||
</>
|
||||
) : (
|
||||
<b>{exporter}</b>
|
||||
)}
|
||||
</a>
|
||||
),
|
||||
},
|
||||
)}
|
||||
</p>,
|
||||
);
|
||||
|
||||
|
||||
const topicText = topic ? _t("Topic: %(topic)s", { topic }) : "";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue