Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Apply i18n to strings in the html export (#11176)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Jul 4, 2023
1 parent 54ffce9 commit d87be36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,9 @@
"%(creatorName)s created this room.": "%(creatorName)s created this room.",
"This is the start of export of <roomName/>. Exported by <exporterDetails/> at %(exportDate)s.": "This is the start of export of <roomName/>. Exported by <exporterDetails/> at %(exportDate)s.",
"Topic: %(topic)s": "Topic: %(topic)s",
"Previous group of messages": "Previous group of messages",
"Next group of messages": "Next group of messages",
"Exported Data": "Exported Data",
"Error fetching file": "Error fetching file",
"Processing event %(number)s out of %(total)s": "Processing event %(number)s out of %(total)s",
"Starting export…": "Starting export…",
Expand Down
6 changes: 3 additions & 3 deletions src/utils/exportUtils/HtmlExport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default class HTMLExporter extends Exporter {
currentPage !== 0 ? (
<div style={{ textAlign: "center" }}>
<a href={`./messages${currentPage === 1 ? "" : currentPage}.html`} style={{ fontWeight: "bold" }}>
Previous group of messages
{_t("Previous group of messages")}
</a>
</div>
) : (
Expand All @@ -144,7 +144,7 @@ export default class HTMLExporter extends Exporter {
currentPage < nbPages - 1 ? (
<div style={{ textAlign: "center", margin: "10px" }}>
<a href={"./messages" + (currentPage + 2) + ".html"} style={{ fontWeight: "bold" }}>
Next group of messages
{_t("Next group of messages")}
</a>
</div>
) : (
Expand All @@ -161,7 +161,7 @@ export default class HTMLExporter extends Exporter {
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="css/style.css" rel="stylesheet" />
<script src="js/script.js"></script>
<title>Exported Data</title>
<title>${_t("Exported Data")}</title>
</head>
<body style="height: 100vh;">
<section
Expand Down

0 comments on commit d87be36

Please sign in to comment.