From 7781c69153e3956ca14684fe9a287fbbb8a01082 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sun, 13 Aug 2023 20:41:29 +0100 Subject: Determines current locale with lib function --- src/components/LallansIssue.astro | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/components/LallansIssue.astro') diff --git a/src/components/LallansIssue.astro b/src/components/LallansIssue.astro index a07d345..690e96c 100644 --- a/src/components/LallansIssue.astro +++ b/src/components/LallansIssue.astro @@ -1,19 +1,19 @@ --- import translate from '$i18n/translate'; import tSite from '$i18n/translations/site'; +import getLocaleFromPath from '$lib/getLocaleFromPath'; import relativePath from '$lib/relativePath'; import type LallansIssue from '$types/LallansIssue'; -import type Locale from '$types/Locale'; import LallansIssueContributions from './LallansIssueContributions.astro'; import LallansIssueContributors from './LallansIssueContributors.astro'; import PayPalButtons from './PayPalButtons.astro'; interface Props { issue: LallansIssue; - locale: Locale; } -const { issue, locale } = Astro.props; +const { issue } = Astro.props; +const locale = getLocaleFromPath(Astro.url.pathname); const t = translate(locale); --- @@ -36,7 +36,7 @@ const t = translate(locale);
{ 'contributions' in issue ? ( - + ) : ( 'contributors' in issue && ) -- cgit v1.2.3