summaryrefslogtreecommitdiff
path: root/src/components/blog/webmentions/Likes.astro
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/blog/webmentions/Likes.astro')
-rw-r--r--src/components/blog/webmentions/Likes.astro8
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">