Skip to content

Commit 80ad36b

Browse files
authored
fix: correct pluralization for stars and forks (#86)
1 parent be9ae01 commit 80ad36b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

app/pages/[...package].vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,8 @@ defineOgImageComponent('Package', {
496496
>
497497
<span class="i-carbon-logo-github w-4 h-4" aria-hidden="true" />
498498
<span v-if="repoMeta">
499-
{{ formatCompactNumber(stars, { decimals: 1 }) }} stars
499+
{{ formatCompactNumber(stars, { decimals: 1 }) }}
500+
{{ stars === 1 ? 'star' : 'stars' }}
500501
</span>
501502
<span v-else>repo</span>
502503
</a>
@@ -532,7 +533,10 @@ defineOgImageComponent('Package', {
532533
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5"
533534
>
534535
<span class="i-carbon-fork w-4 h-4" aria-hidden="true" />
535-
<span>{{ formatCompactNumber(forks, { decimals: 1 }) }} forks</span>
536+
<span>
537+
{{ formatCompactNumber(forks, { decimals: 1 }) }}
538+
{{ forks === 1 ? 'fork' : 'forks' }}
539+
</span>
536540
</a>
537541
</li>
538542

0 commit comments

Comments
 (0)