You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Enable proper i18n for date utils
This commit is contained in:
@@ -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 }) : "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user