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/Comments.astro | |
| parent | 9fe4480c3981c38ae8e24d0495df957039864a5d (diff) | |
Add polish language support
Diffstat (limited to 'src/components/blog/webmentions/Comments.astro')
| -rw-r--r-- | src/components/blog/webmentions/Comments.astro | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/components/blog/webmentions/Comments.astro b/src/components/blog/webmentions/Comments.astro index af14bd0..9d274f9 100644 --- a/src/components/blog/webmentions/Comments.astro +++ b/src/components/blog/webmentions/Comments.astro @@ -1,13 +1,15 @@ --- import { Image } from "astro:assets"; import { Icon } from "astro-icon/components"; +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 validComments = ["mention-of", "in-reply-to"]; @@ -20,7 +22,8 @@ const comments = mentions.filter( !!comments.length && ( <div> <p class="text-accent-2 mb-0"> - <strong>{comments.length}</strong> Mention{comments.length > 1 ? "s" : ""} + <strong>{comments.length}</strong>{" "} + {comments.length > 1 ? t(language, "mentions") : t(language, "mention")} </p> <ul class="divide-global-text/20 mt-0 divide-y ps-0" role="list"> {comments.map((mention) => ( @@ -65,7 +68,7 @@ const comments = mentions.filter( target="_blank" > <span class="hidden" id="cmt-source"> - Visit the source of this webmention + {t(language, "visitWebmentionSource")} </span> <Icon aria-hidden="true" |
