feat(i18n): plurals support (#278)
This commit is contained in:
parent
0f7de38c24
commit
c4cf3fb371
17 changed files with 234 additions and 91 deletions
|
@ -5,15 +5,30 @@ const { items } = defineProps<{
|
|||
items: GroupedNotifications
|
||||
}>()
|
||||
|
||||
const count = computed(() => items.items.length)
|
||||
const { formatHumanReadableNumber, forSR } = useHumanReadableNumber()
|
||||
|
||||
const count = $computed(() => items.items.length)
|
||||
const addSR = $computed(() => forSR(count))
|
||||
const isExpanded = ref(false)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<article flex flex-col>
|
||||
<div flex ml-4 items-center>
|
||||
<div i-ri:user-follow-fill mr-3 color-primary />
|
||||
{{ $t('notification.followed_you_count', [`${count}`]) }}
|
||||
<div i-ri:user-follow-fill mr-3 color-primary aria-hidden="true" />
|
||||
<template v-if="addSR">
|
||||
<span
|
||||
aria-hidden="true"
|
||||
>
|
||||
{{ $t('notification.followed_you_count', count, { named: { followers: formatHumanReadableNumber(count) } }) }}
|
||||
</span>
|
||||
<span sr-only>
|
||||
{{ $t('notification.followed_you_count', count, { named: { followers: count } }) }}
|
||||
</span>
|
||||
</template>
|
||||
<span v-else>
|
||||
{{ $t('notification.followed_you_count', count, { named: { followers: count } }) }}
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="isExpanded">
|
||||
<AccountCard
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue