diff --git a/src/components/ArchivePanel.svelte b/src/components/ArchivePanel.svelte index 17a9f49..94982a9 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 4cbc847..a7a7143 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 402cc4c..7fdfcb8 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)} +