From 94c2ca35914e77ce4af172810d4670e0614fb2ba Mon Sep 17 00:00:00 2001 From: haappi <74637670+haappi@users.noreply.github.com> Date: Wed, 18 Jun 2025 09:32:29 -0500 Subject: [PATCH] use correct s thingy in english for words & reading time (#503) Co-authored-by: L4Ph --- src/components/ArchivePanel.svelte | 2 +- src/components/PostCard.astro | 8 ++++++-- src/pages/posts/[...slug].astro | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/ArchivePanel.svelte b/src/components/ArchivePanel.svelte index 17a9f490..94982a9d 100644 --- a/src/components/ArchivePanel.svelte +++ b/src/components/ArchivePanel.svelte @@ -99,7 +99,7 @@ onMount(async () => { >
- {group.posts.length} {i18n(I18nKey.postsCount)} + {group.posts.length} {i18n(group.posts.length === 1 ? I18nKey.postCount : I18nKey.postsCount)}
diff --git a/src/components/PostCard.astro b/src/components/PostCard.astro index 4cbc8477..a7a71430 100644 --- a/src/components/PostCard.astro +++ b/src/components/PostCard.astro @@ -66,9 +66,13 @@ const { remarkPluginFrontmatter } = await entry.render();
-
{remarkPluginFrontmatter.words} {" " + i18n(I18nKey.wordsCount)}
+
+ {remarkPluginFrontmatter.words} {" " + i18n(remarkPluginFrontmatter.words === 1 ? I18nKey.wordCount : I18nKey.wordsCount)} +
|
-
{remarkPluginFrontmatter.minutes} {" " + i18n(I18nKey.minutesCount)}
+
+ {remarkPluginFrontmatter.minutes} {" " + i18n(remarkPluginFrontmatter.minutes === 1 ? I18nKey.minuteCount : I18nKey.minutesCount)} +
diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 402cc4c6..7fdfcb81 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -63,7 +63,9 @@ const jsonLd = {
-
{remarkPluginFrontmatter.minutes} {" " + i18n(I18nKey.minutesCount)}
+
+ {remarkPluginFrontmatter.minutes} {" " + i18n(remarkPluginFrontmatter.minutes === 1 ? I18nKey.minuteCount : I18nKey.minutesCount)} +