From 60b5bd13f39592a25ddbcf76becbcf607dd6941f Mon Sep 17 00:00:00 2001 From: DrMint <29893320+DrMint@users.noreply.github.com> Date: Sat, 9 Mar 2024 10:09:02 +0100 Subject: [PATCH] Wordings related to credits --- src/components/Credits.astro | 17 +++++++++++++---- src/i18n/wordings-keys.ts | 6 +++++- src/pages/[locale]/api/pages/partial.astro | 7 ++++++- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/components/Credits.astro b/src/components/Credits.astro index 8c6b339..b3326ee 100644 --- a/src/components/Credits.astro +++ b/src/components/Credits.astro @@ -1,32 +1,41 @@ --- import type { EndpointRecorder } from "src/shared/payload/payload-sdk"; import Metadata from "./Metadata.astro"; +import { getI18n } from "src/i18n/i18n"; interface Props { translators?: EndpointRecorder[] | undefined; transcribers?: EndpointRecorder[] | undefined; proofreaders?: EndpointRecorder[] | undefined; + authors?: EndpointRecorder[] | undefined; } -const { translators = [], transcribers = [], proofreaders = [] } = Astro.props; +const { translators = [], transcribers = [], proofreaders = [], authors = [] } = Astro.props; +const { t } = await getI18n(Astro.locals.currentLocale); --- {/* ------------------------------------------- HTML ------------------------------------------- */} username)} /> username)} /> username)} /> + + username)} +/> diff --git a/src/i18n/wordings-keys.ts b/src/i18n/wordings-keys.ts index 38962d6..b52002f 100644 --- a/src/i18n/wordings-keys.ts +++ b/src/i18n/wordings-keys.ts @@ -74,4 +74,8 @@ export type WordingKey = | "collectibles.imageCount" | "header.topbar.settings.tooltip" | "collectibles.contents" - | "collectibles.weight"; + | "collectibles.weight" + | "global.credits.transcribers" + | "global.credits.translators" + | "global.credits.proofreaders" + | "global.credits.authors"; diff --git a/src/pages/[locale]/api/pages/partial.astro b/src/pages/[locale]/api/pages/partial.astro index 425acb5..43cb5e8 100644 --- a/src/pages/[locale]/api/pages/partial.astro +++ b/src/pages/[locale]/api/pages/partial.astro @@ -73,7 +73,11 @@ const translation = getLocalizedMatch(page.translations); /> ) } - + { @@ -118,6 +122,7 @@ const translation = getLocalizedMatch(page.translations); translators={translation.translators} transcribers={translation.transcribers} proofreaders={translation.proofreaders} + authors={page.authors} />