Fix followers translation

This commit is contained in:
Chocobozzz 2021-07-05 10:19:59 +02:00
parent 3e69838cac
commit fe4867ae93
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 7 additions and 2 deletions

View File

@ -19,7 +19,7 @@
<div class="additional-information">
<div class="followers-count">
<translate :translate-n="channel.followersCount" translate-plural="%{channel.followersCount} followers">%{ channel.followersCount } follower</translate>
{{ followersCountMessage }}
</div>
</div>
@ -58,7 +58,6 @@
</style>
<script lang="ts">
import { useGettext } from '@jshmrtn/vue3-gettext'
import { defineComponent, PropType } from 'vue'
import { VideoChannel } from '../../../PeerTube/shared/models'
@ -76,6 +75,12 @@
discoverChannelMessage (): string {
return this.$gettextInterpolate(this.$gettext('Discover this channel on %{host}'), { host: this.host })
},
followersCountMessage (): string {
const translated = this.$ngettext('%{ n } follower', '%{ n } followers', this.channel.followersCount)
return this.$gettextInterpolate(translated, { n: this.channel.followersCount })
}
}
})