use correct s thingy in english for words & reading time (#503)
Some checks failed
Code quality / quality (push) Failing after 10s
Build and Check / Astro Check for Node.js 22 (push) Failing after 4s
Build and Check / Astro Check for Node.js 23 (push) Failing after 5s
Build and Check / Astro Build for Node.js 22 (push) Failing after 5s
Build and Check / Astro Build for Node.js 23 (push) Failing after 5s

Co-authored-by: L4Ph <me@l4ph.moe>
This commit is contained in:
haappi
2025-06-18 09:32:29 -05:00
committed by GitHub
parent 9130765d45
commit 94c2ca3591
3 changed files with 10 additions and 4 deletions

View File

@@ -99,7 +99,7 @@ onMount(async () => {
></div>
</div>
<div class="w-[70%] md:w-[80%] transition text-left text-50">
{group.posts.length} {i18n(I18nKey.postsCount)}
{group.posts.length} {i18n(group.posts.length === 1 ? I18nKey.postCount : I18nKey.postsCount)}
</div>
</div>

View File

@@ -66,9 +66,13 @@ const { remarkPluginFrontmatter } = await entry.render();
<!-- word count and read time -->
<div class="text-sm text-black/30 dark:text-white/30 flex gap-4 transition">
<div>{remarkPluginFrontmatter.words} {" " + i18n(I18nKey.wordsCount)}</div>
<div>
{remarkPluginFrontmatter.words} {" " + i18n(remarkPluginFrontmatter.words === 1 ? I18nKey.wordCount : I18nKey.wordsCount)}
</div>
<div>|</div>
<div>{remarkPluginFrontmatter.minutes} {" " + i18n(I18nKey.minutesCount)}</div>
<div>
{remarkPluginFrontmatter.minutes} {" " + i18n(remarkPluginFrontmatter.minutes === 1 ? I18nKey.minuteCount : I18nKey.minutesCount)}
</div>
</div>
</div>

View File

@@ -63,7 +63,9 @@ const jsonLd = {
<div class="transition h-6 w-6 rounded-md bg-black/5 dark:bg-white/10 text-black/50 dark:text-white/50 flex items-center justify-center mr-2">
<Icon name="material-symbols:schedule-outline-rounded"></Icon>
</div>
<div class="text-sm">{remarkPluginFrontmatter.minutes} {" " + i18n(I18nKey.minutesCount)}</div>
<div class="text-sm">
{remarkPluginFrontmatter.minutes} {" " + i18n(remarkPluginFrontmatter.minutes === 1 ? I18nKey.minuteCount : I18nKey.minutesCount)}
</div>
</div>
</div>