replace deprecated tc with t equivalent

This commit is contained in:
Henry Jameson 2025-01-02 22:58:36 +02:00
parent 1d7c9e17fe
commit 2f7b9fb4ef
12 changed files with 23 additions and 20 deletions

View file

@ -73,7 +73,7 @@
</template> </template>
<template #text> <template #text>
<span> <span>
{{ $tc('status.show_all_conversation', otherTopLevelCount, { numStatus: otherTopLevelCount }) }} {{ $t('status.show_all_conversation', { numStatus: otherTopLevelCount }, otherTopLevelCount) }}
</span> </span>
</template> </template>
</i18n-t> </i18n-t>
@ -146,7 +146,7 @@
</template> </template>
<template #text> <template #text>
<span> <span>
{{ $tc('status.ancestor_follow', getReplies(status.id).length - 1, { numReplies: getReplies(status.id).length - 1 }) }} {{ $t('status.ancestor_follow', { numReplies: getReplies(status.id, getReplies(status.id).length - 1).length - 1 }) }}
</span> </span>
</template> </template>
</i18n-t> </i18n-t>

View file

@ -293,9 +293,12 @@ const EmojiInput = {
})) }))
this.highlighted = this.defaultCandidateIndex this.highlighted = this.defaultCandidateIndex
this.$refs.screenReaderNotice.announce( this.$refs.screenReaderNotice.announce(
this.$tc('tool_tip.autocomplete_available', this.$t(
this.suggestions.length, 'tool_tip.autocomplete_available',
{ number: this.suggestions.length })) { number: this.suggestions.length },
this.suggestions.length
)
)
} }
}, },
methods: { methods: {

View file

@ -92,7 +92,7 @@ const EmojiReactions = {
toggled: this.reactedWith(reaction.name) toggled: this.reactedWith(reaction.name)
} }
], ],
'aria-label': this.$tc('status.reaction_count_label', reaction.count, { num: reaction.count }) 'aria-label': this.$t('status.reaction_count_label', { num: reaction.count }, reaction.count)
} }
} }
} }

View file

@ -14,7 +14,7 @@
class="fa-scale-110 icon" class="fa-scale-110 icon"
icon="comments" icon="comments"
/> />
{{ $tc('notifications.unread_chats', unreadChatCount, { num: unreadChatCount }) }} {{ $t('notifications.unread_chats', { num: unreadChatCount }, unreadChatCount) }}
</router-link> </router-link>
</div> </div>
<div <div
@ -31,7 +31,7 @@
class="fa-scale-110 icon" class="fa-scale-110 icon"
icon="bullhorn" icon="bullhorn"
/> />
{{ $tc('notifications.unread_announcements', unreadAnnouncementCount, { num: unreadAnnouncementCount }) }} {{ $t('notifications.unread_announcements', { num: unreadAnnouncementCount }, unreadAnnouncementCount) }}
</router-link> </router-link>
</div> </div>
<div <div
@ -48,7 +48,7 @@
class="fa-scale-110 icon" class="fa-scale-110 icon"
icon="user-plus" icon="user-plus"
/> />
{{ $tc('notifications.unread_follow_requests', followRequestCount, { num: followRequestCount }) }} {{ $t('notifications.unread_follow_requests', { num: followRequestCount }, followRequestCount) }}
</router-link> </router-link>
</div> </div>
<i18n-t <i18n-t

View file

@ -9,7 +9,7 @@
:key="index" :key="index"
> >
<label> <label>
{{ index === 0 ? $t('settings.primary_language') : $tc('settings.fallback_language', index, { index }) }} {{ index === 0 ? $t('settings.primary_language') : $t('settings.fallback_language', { index }, index) }}
<Select <Select
class="language-select" class="language-select"
:model-value="controlledLanguage[index]" :model-value="controlledLanguage[index]"

View file

@ -98,7 +98,7 @@
<span <span
class="counter" class="counter"
> >
{{ $tc('media_modal.counter', currentIndex + 1, { current: currentIndex + 1, total: media.length }) }} {{ $t('media_modal.counter', { current: currentIndex + 1, total: media.length }, currentIndex + 1) }}
</span> </span>
<span <span
v-if="loading" v-if="loading"

View file

@ -85,10 +85,10 @@
</span> </span>
<div class="total"> <div class="total">
<template v-if="typeof poll.voters_count === 'number'"> <template v-if="typeof poll.voters_count === 'number'">
{{ $tc("polls.people_voted_count", poll.voters_count, { count: poll.voters_count }) }} {{ $t("polls.people_voted_count", { count: poll.voters_count }, poll.voters_count) }}
</template> </template>
<template v-else> <template v-else>
{{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }} {{ $t("polls.votes_count", { count: poll.votes_count }, poll.votes_count) }}
</template> </template>
<span v-if="expiresAt !== null"> <span v-if="expiresAt !== null">
&nbsp;·&nbsp; &nbsp;·&nbsp;

View file

@ -84,7 +84,7 @@
:key="unit" :key="unit"
:value="unit" :value="unit"
> >
{{ $tc(`time.unit.${unit}_short`, expiryAmount, ['']) }} {{ $t(`time.unit.${unit}_short`, [''], expiryAmount) }}
</option> </option>
</Select> </Select>
</div> </div>

View file

@ -201,7 +201,7 @@
<span>{{ $t('registration.validations.birthday_required') }}</span> <span>{{ $t('registration.validations.birthday_required') }}</span>
</li> </li>
<li v-if="v$.user.birthday.maxValue.$invalid"> <li v-if="v$.user.birthday.maxValue.$invalid">
<span>{{ $tc('registration.validations.birthday_min_age', { date: birthdayMinFormatted }) }}</span> <span>{{ $t('registration.validations.birthday_min_age', { date: birthdayMinFormatted }) }}</span>
</li> </li>
</ul> </ul>
</div> </div>

View file

@ -80,7 +80,7 @@
<span <span
v-else-if="backup.state === 'running'" v-else-if="backup.state === 'running'"
> >
{{ $tc('settings.backup_running', backup.processed_number, { number: backup.processed_number }) }} {{ $t('settings.backup_running', { number: backup.processed_number }, backup.processed_number) }}
</span> </span>
<span <span
v-else-if="backup.state === 'failed'" v-else-if="backup.state === 'failed'"

View file

@ -457,10 +457,10 @@
<button <button
v-if="showOtherRepliesAsButton && replies.length > 1" v-if="showOtherRepliesAsButton && replies.length > 1"
class="button-unstyled -link" class="button-unstyled -link"
:title="$tc('status.ancestor_follow', replies.length - 1, { numReplies: replies.length - 1 })" :title="$t('status.ancestor_follow', { numReplies: replies.length - 1 }, replies.length - 1)"
@click.prevent="dive" @click.prevent="dive"
> >
{{ $tc('status.replies_list_with_others', replies.length - 1, { numReplies: replies.length - 1 }) }} {{ $t('status.replies_list_with_others', { numReplies: replies.length - 1 }, replies.length - 1) }}
</button> </button>
<span <span
v-else v-else

View file

@ -89,7 +89,7 @@
</template> </template>
<template #text> <template #text>
<span> <span>
{{ $tc('status.thread_follow', totalReplyCount[status.id], { numStatus: totalReplyCount[status.id] }) }} {{ $t('status.thread_follow', { numStatus: totalReplyCount[status.id] }, totalReplyCount[status.id]) }}
</span> </span>
</template> </template>
</i18n-t> </i18n-t>
@ -108,7 +108,7 @@
</template> </template>
<template #text> <template #text>
<span> <span>
{{ $tc('status.thread_show_full', totalReplyCount[status.id], { numStatus: totalReplyCount[status.id], depth: totalReplyDepth[status.id] }) }} {{ $t('status.thread_show_full', { numStatus: totalReplyCount[status.id], depth: totalReplyDepth[status.id] }, totalReplyCount[status.id]) }}
</span> </span>
</template> </template>
</i18n-t> </i18n-t>