--- import type { CollectionEntry } from 'astro:content'; import NewsPreviewLink from './NewsPreviewLink.astro'; import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath'; import translate from '$i18n/translate'; import tComponent from '$i18n/translations/components/newsIndex'; interface Props { headingLevel: 'h2' | 'h3' | 'h4'; newsItems: CollectionEntry<'news'>[]; } const { headingLevel, newsItems } = Astro.props; const locale = getLocaleFromPathOrThrow(Astro.url.pathname); const t = translate(locale); ---
{t(tComponent, { key: 'no-news' })}
) }