Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ const TutorialsList = ({ internalTutorials }: TutorialsListProps) => {
: "normal"
}
>
<Translation id={getSkillTranslationId(tutorial.skill)} />
{t(getSkillTranslationId(tutorial.skill))}
</Tag>
)}
</Flex>
Expand Down
5 changes: 3 additions & 2 deletions app/[locale]/quizzes/page-jsonld.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default async function QuizzesPageJsonLD({
contributors: FileContributor[]
}) {
const t = await getTranslations("page-quizzes")
const tCommon = await getTranslations("common")

const url = normalizeUrlForJsonLd(locale, `/quizzes/`)

Expand All @@ -33,7 +34,7 @@ export default async function QuizzesPageJsonLD({
{
"@type": "WebPage",
"@id": url,
name: t("common:quizzes-title"),
name: tCommon("quizzes-title"),
description: t("quizzes-subtitle"),
url,
inLanguage: locale,
Expand All @@ -52,7 +53,7 @@ export default async function QuizzesPageJsonLD({
{
"@type": "ListItem",
position: 2,
name: t("common:quizzes-title"),
name: tCommon("quizzes-title"),
item: url,
},
],
Expand Down
5 changes: 2 additions & 3 deletions src/components/TutorialMetadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ export type TutorialMetadataProps = {
timeToRead: number
}

// Key within the "page-developers-tutorials" namespace
export const getSkillTranslationId = (skill: Skill): TranslationKey =>
`page-developers-tutorials:page-tutorial-${
Skill[skill.toUpperCase() as keyof typeof Skill]
}`
`page-tutorial-${Skill[skill.toUpperCase() as keyof typeof Skill]}`

const TutorialMetadata = ({
frontmatter,
Expand Down
Loading