commit: 2f7b9fb4efee6400b9bfd9251b06e6cc3787e84e
parent 1d7c9e17feaed3805bb1881d9776d7306cc85611
Author: Henry Jameson <me@hjkos.com>
Date: Thu, 2 Jan 2025 22:58:36 +0200
replace deprecated tc with t equivalent
Diffstat:
12 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue
@@ -73,7 +73,7 @@
</template>
<template #text>
<span>
- {{ $tc('status.show_all_conversation', otherTopLevelCount, { numStatus: otherTopLevelCount }) }}
+ {{ $t('status.show_all_conversation', { numStatus: otherTopLevelCount }, otherTopLevelCount) }}
</span>
</template>
</i18n-t>
@@ -146,7 +146,7 @@
</template>
<template #text>
<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>
</template>
</i18n-t>
diff --git a/src/components/emoji_input/emoji_input.js b/src/components/emoji_input/emoji_input.js
@@ -293,9 +293,12 @@ const EmojiInput = {
}))
this.highlighted = this.defaultCandidateIndex
this.$refs.screenReaderNotice.announce(
- this.$tc('tool_tip.autocomplete_available',
- this.suggestions.length,
- { number: this.suggestions.length }))
+ this.$t(
+ 'tool_tip.autocomplete_available',
+ { number: this.suggestions.length },
+ this.suggestions.length
+ )
+ )
}
},
methods: {
diff --git a/src/components/emoji_reactions/emoji_reactions.js b/src/components/emoji_reactions/emoji_reactions.js
@@ -92,7 +92,7 @@ const EmojiReactions = {
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)
}
}
}
diff --git a/src/components/extra_notifications/extra_notifications.vue b/src/components/extra_notifications/extra_notifications.vue
@@ -14,7 +14,7 @@
class="fa-scale-110 icon"
icon="comments"
/>
- {{ $tc('notifications.unread_chats', unreadChatCount, { num: unreadChatCount }) }}
+ {{ $t('notifications.unread_chats', { num: unreadChatCount }, unreadChatCount) }}
</router-link>
</div>
<div
@@ -31,7 +31,7 @@
class="fa-scale-110 icon"
icon="bullhorn"
/>
- {{ $tc('notifications.unread_announcements', unreadAnnouncementCount, { num: unreadAnnouncementCount }) }}
+ {{ $t('notifications.unread_announcements', { num: unreadAnnouncementCount }, unreadAnnouncementCount) }}
</router-link>
</div>
<div
@@ -48,7 +48,7 @@
class="fa-scale-110 icon"
icon="user-plus"
/>
- {{ $tc('notifications.unread_follow_requests', followRequestCount, { num: followRequestCount }) }}
+ {{ $t('notifications.unread_follow_requests', { num: followRequestCount }, followRequestCount) }}
</router-link>
</div>
<i18n-t
diff --git a/src/components/interface_language_switcher/interface_language_switcher.vue b/src/components/interface_language_switcher/interface_language_switcher.vue
@@ -9,7 +9,7 @@
:key="index"
>
<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
class="language-select"
:model-value="controlledLanguage[index]"
diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue
@@ -98,7 +98,7 @@
<span
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
v-if="loading"
diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue
@@ -85,10 +85,10 @@
</span>
<div class="total">
<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 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>
<span v-if="expiresAt !== null">
·
diff --git a/src/components/poll/poll_form.vue b/src/components/poll/poll_form.vue
@@ -84,7 +84,7 @@
:key="unit"
:value="unit"
>
- {{ $tc(`time.unit.${unit}_short`, expiryAmount, ['']) }}
+ {{ $t(`time.unit.${unit}_short`, [''], expiryAmount) }}
</option>
</Select>
</div>
diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue
@@ -201,7 +201,7 @@
<span>{{ $t('registration.validations.birthday_required') }}</span>
</li>
<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>
</ul>
</div>
diff --git a/src/components/settings_modal/tabs/data_import_export_tab.vue b/src/components/settings_modal/tabs/data_import_export_tab.vue
@@ -80,7 +80,7 @@
<span
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
v-else-if="backup.state === 'failed'"
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
@@ -457,10 +457,10 @@
<button
v-if="showOtherRepliesAsButton && replies.length > 1"
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"
>
- {{ $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>
<span
v-else
diff --git a/src/components/thread_tree/thread_tree.vue b/src/components/thread_tree/thread_tree.vue
@@ -89,7 +89,7 @@
</template>
<template #text>
<span>
- {{ $tc('status.thread_follow', totalReplyCount[status.id], { numStatus: totalReplyCount[status.id] }) }}
+ {{ $t('status.thread_follow', { numStatus: totalReplyCount[status.id] }, totalReplyCount[status.id]) }}
</span>
</template>
</i18n-t>
@@ -108,7 +108,7 @@
</template>
<template #text>
<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>
</template>
</i18n-t>