diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2026-01-13 18:42:05 +0100 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2026-01-13 18:42:05 +0100 |
| commit | a1d3fb8df0e00faa3920d7f5085a52002e58574e (patch) | |
| tree | 288c0a6003e7069338035a0a0e3864414b3e071b /src/components/blog/webmentions/Likes.astro | |
| parent | 9fe4480c3981c38ae8e24d0495df957039864a5d (diff) | |
Add polish language support
Diffstat (limited to 'src/components/blog/webmentions/Likes.astro')
| -rw-r--r-- | src/components/blog/webmentions/Likes.astro | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/blog/webmentions/Likes.astro b/src/components/blog/webmentions/Likes.astro index 7862c43..fce1a96 100644 --- a/src/components/blog/webmentions/Likes.astro +++ b/src/components/blog/webmentions/Likes.astro @@ -1,12 +1,14 @@ --- import { Image } from "astro:assets"; +import { t } from "@/i18n/translations"; import type { WebmentionsChildren } from "@/types"; interface Props { mentions: WebmentionsChildren[]; + language?: string | undefined; } -const { mentions } = Astro.props; +const { mentions, language } = Astro.props; const MAX_LIKES = 10; const likes = mentions.filter((mention) => mention["wm-property"] === "like-of"); @@ -19,8 +21,8 @@ const likesToShow = likes !!likes.length && ( <div> <p class="text-accent-2 mb-0"> - <strong>{likes.length}</strong> - {likes.length > 1 ? " People" : " Person"} liked this + <strong>{likes.length}</strong>{" "} + {likes.length > 1 ? t(language, "peopleLiked") : t(language, "personLiked")} </p> {!!likesToShow.length && ( <ul class="flex list-none flex-wrap overflow-hidden ps-2" role="list"> |
