i18n: improve

zio/stable
Anthony Fu 2022-11-30 10:16:15 +08:00
parent ba93e6d235
commit 9c83e8bbb6
3 changed files with 10 additions and 8 deletions

View File

@ -21,16 +21,14 @@ async function toggleFollow() {
}
}
const { t } = useI18n()
useCommand({
scope: 'Actions',
order: -2,
visible: () => command && enable,
name: () => `${relationship?.following ? 'Unfollow' : 'Follow'} ${getShortHandle(account)}`,
name: () => `${relationship?.following ? t('account.unfollow') : t('account.follow')} ${getShortHandle(account)}`,
icon: 'i-ri:star-line',
onActivate: () => toggleFollow(),
})
</script>
@ -44,7 +42,7 @@ useCommand({
rounded-full flex="~ gap2 center" font-500 w-30 h-fit py1 :class="relationship?.following ? 'text-base border-text-base' : 'text-inverted bg-primary border-primary'" :hover="relationship?.following ? 'border-red text-red' : 'bg-base border-primary text-primary'" @click="toggleFollow"
>
<template v-if="relationship?.following">
<span group-hover="hidden">{{ relationship?.followedBy ? 'Mutuals' : 'Following' }}</span>
<span group-hover="hidden">{{ relationship?.followedBy ? $t('account.mutuals') : $t('account.following') }}</span>
<span hidden group-hover="inline">{{ $t('account.unfollow') }}</span>
</template>
<template v-else-if="relationship?.requested">

View File

@ -7,9 +7,11 @@
"follow_back": "Follow back",
"follow_requested": "Requested",
"followers_count": "{0} Followers",
"following": "Following",
"following_count": "{0} Following",
"follows_you": "Follows you",
"muted_users": "Muted users",
"mutuals": "Mutuals",
"pinned": "Pinned",
"posts_count": "{0} Posts",
"unfollow": "Unfollow"
@ -105,9 +107,9 @@
"uploading": "Uploading..."
},
"status": {
"reblogged": "{0} reblogged",
"spoiler_show_less": "Show less",
"spoiler_show_more": "Show more",
"reblogged": "{0} reblogged"
"spoiler_show_more": "Show more"
},
"tab": {
"media": "Media",

View File

@ -7,9 +7,11 @@
"follow_back": "回关",
"follow_requested": "已申请关注",
"followers_count": "被 {0} 人关注",
"following": "关注中",
"following_count": "正在关注 {0} 人",
"follows_you": "已关注你",
"muted_users": "已屏蔽的用户",
"mutuals": "互相关注",
"pinned": "置顶的帖文",
"posts_count": "{0} 条帖文",
"unfollow": "取消关注"