wording regarding toc

This commit is contained in:
DrMint 2024-03-09 10:13:20 +01:00
parent 60b5bd13f3
commit 902af3aa9f
2 changed files with 5 additions and 2 deletions

View File

@ -2,12 +2,14 @@
import type { TableOfContentEntry } from "src/shared/payload/payload-sdk"; import type { TableOfContentEntry } from "src/shared/payload/payload-sdk";
import TableOfContentItem from "./components/TableOfContentItem.astro"; import TableOfContentItem from "./components/TableOfContentItem.astro";
import { Icon } from "astro-icon/components"; import { Icon } from "astro-icon/components";
import { getI18n } from "src/i18n/i18n";
interface Props { interface Props {
toc: TableOfContentEntry[]; toc: TableOfContentEntry[];
} }
const { toc } = Astro.props; const { toc } = Astro.props;
const { t } = await getI18n(Astro.locals.currentLocale);
--- ---
{/* ------------------------------------------- HTML ------------------------------------------- */} {/* ------------------------------------------- HTML ------------------------------------------- */}
@ -15,7 +17,7 @@ const { toc } = Astro.props;
<div id="container"> <div id="container">
<div id="title"> <div id="title">
<Icon name="material-symbols:list-alt-outline" width={24} height={24} /> <Icon name="material-symbols:list-alt-outline" width={24} height={24} />
<p>Table of Content</p> <p>{t("pages.tableOfContent")}</p>
</div> </div>
<ol> <ol>
{toc.map((entry) => <TableOfContentItem entry={entry} />)} {toc.map((entry) => <TableOfContentItem entry={entry} />)}

View File

@ -78,4 +78,5 @@ export type WordingKey =
| "global.credits.transcribers" | "global.credits.transcribers"
| "global.credits.translators" | "global.credits.translators"
| "global.credits.proofreaders" | "global.credits.proofreaders"
| "global.credits.authors"; | "global.credits.authors"
| "pages.tableOfContent";