feat(i18n): improve translations (#219)

Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: 沈青川 <46062972+ShenQingchuan@users.noreply.github.com>
zio/stable
Alex 2022-11-29 18:55:28 +08:00 committed by GitHub
parent 8df22b8a3f
commit 09f80f291b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 103 additions and 44 deletions

View File

@ -117,39 +117,19 @@ const toggleBlockDomain = async () => {
<template v-else>
<NuxtLink to="/pinned">
<CommonDropdownItem
text="Pinned"
icon="i-ri:pushpin-line"
:command="command"
/>
<CommonDropdownItem :text="$t('account.pinned')" icon="i-ri:pushpin-line" :command="command" />
</NuxtLink>
<NuxtLink to="/favourites">
<CommonDropdownItem
text="Favourites"
icon="i-ri:heart-3-line"
:command="command"
/>
<CommonDropdownItem :text="$t('account.favourites')" icon="i-ri:heart-3-line" :command="command" />
</NuxtLink>
<NuxtLink to="/mutes">
<CommonDropdownItem
text="Muted users"
icon="i-ri:volume-mute-line"
:command="command"
/>
<CommonDropdownItem :text="$t('account.muted_users')" icon="i-ri:volume-mute-line" :command="command" />
</NuxtLink>
<NuxtLink to="/blocks">
<CommonDropdownItem
text="Blocked users"
icon="i-ri:forbid-2-line"
:command="command"
/>
<CommonDropdownItem :text="$t('account.blocked_users')" icon="i-ri:forbid-2-line" :command="command" />
</NuxtLink>
<NuxtLink to="/domain_blocks">
<CommonDropdownItem
text="Blocked domains"
icon="i-ri:shut-down-line"
:command="command"
/>
<CommonDropdownItem text="$t('account.blocked_domains')" icon="i-ri:shut-down-line" :command="command" />
</NuxtLink>
</template>
</template>

View File

@ -2,7 +2,7 @@
<div flex="~ col" items-center>
<div i-ri:forbid-line text-10 mt10 mb2 />
<div text-lg>
<slot>404 Not Found</slot>
<slot>{{ $t('common.not_found') }}</slot>
</div>
</div>
</template>

View File

@ -55,10 +55,10 @@ const { items, prevItems, update, state, endAnchor, error } = usePaginator(pagin
</div>
</slot>
<div v-else-if="state === 'done'" p5 text-secondary italic text-center>
End of the list
{{ $t('common.end_of_list') }}
</div>
<div v-else-if="state === 'error'" p5 text-secondary>
ERROR: {{ error }}
{{ $t('common.error') }}: {{ error }}
</div>
</div>
</template>

View File

@ -12,7 +12,7 @@ const { notification } = defineProps<{
<div flex ml-4 items-center>
<div i-ri:user-follow-fill mr-3 color-primary />
<AccountInlineInfo :account="notification.account" mr1 />
followed you
{{ $t('notification.followed_you') }}
</div>
<AccountCard :account="notification.account" p3 />
</template>
@ -20,7 +20,7 @@ const { notification } = defineProps<{
<div flex ml-4 items-center>
<div i-ri:user-follow-fill mr-3 />
<AccountInlineInfo :account="notification.account" mr1 />
requested to follow you
{{ $t('notification.request_to_follow') }}
</div>
<!-- TODO: accept request -->
<AccountCard :account="notification.account" p3 />
@ -29,7 +29,7 @@ const { notification } = defineProps<{
<div flex ml-4 items-center>
<div i-ri:heart-fill mr-3 color-red />
<AccountInlineInfo :account="notification.account" mr1 />
favourited your post
{{ $t('notification.favourited_post') }}
</div>
<StatusCard :status="notification.status!" p3 />
</template>
@ -37,7 +37,7 @@ const { notification } = defineProps<{
<div flex ml-4 items-center>
<div i-ri:repeat-fill mr-3 color-green />
<AccountInlineInfo :account="notification.account" mr1 />
reblogged your post
{{ $t('notification.reblogged_post') }}
</div>
<StatusCard :status="notification.status!" p3 />
</template>
@ -45,7 +45,7 @@ const { notification } = defineProps<{
<div flex ml-4 items-center>
<div i-ri:edit-2-fill mr-3 text-secondary />
<AccountInlineInfo :account="notification.account" mr1 />
updated their status
{{ $t('notification.update_status') }}
</div>
<StatusCard :status="notification.status!" p3 />
</template>
@ -54,7 +54,7 @@ const { notification } = defineProps<{
</template>
<template v-else>
<div text-red font-bold>
[DEV] MISSING notification.type: '{{ notification.type }}'
[DEV] {{ $t('notification.missing_type') }} '{{ notification.type }}'
</div>
</template>
</article>

View File

@ -18,7 +18,7 @@ async function handleInput() {
<template>
<form text-center justify-center items-center flex="~ col gap2" @submit.prevent="oauth">
<div text-3xl mb2>
Sign in
{{ $t('action.sign_in') }}
</div>
<div>Mastodon Server Name</div>
<div flex bg-gray:10 px2 py1 mxa rounded border="~ border" text-xl items-center>
@ -26,7 +26,7 @@ async function handleInput() {
<input v-model="server" :placeholder="DEFAULT_SERVER" outline-none bg-transparent @input="handleInput">
</div>
<button btn-solid mt2>
Sign in
{{ $t('action.sign_in') }}
</button>
</form>
</template>

View File

@ -1,10 +1,10 @@
<template>
<div p8 flex="~ col gap4">
<div text-sm text-secondary>
Sign in to follow profiles or hashtags, favourite, share and reply to posts, or interact from your account on a different server.
{{ $t('nav_user.sign_in_desc') }}
</div>
<button class="btn-solid text-center" @click="openSigninDialog()">
Sign in
{{ $t('action.sign_in') }}
</button>
</div>
</template>

View File

@ -1,12 +1,17 @@
{
"account": {
"blocked_users": "Blocked users",
"blocked_domains": "Blocked domains",
"favourites": "Favourites",
"follow": "Follow",
"follow_back": "Follow back",
"follow_requested": "Requested",
"followers_count": "{0} Followers",
"following_count": "{0} Following",
"follows_you": "Follows you",
"muted_users": "Muted users",
"posts_count": "{0} Posts",
"pinned": "Pinned",
"unfollow": "Unfollow"
},
"action": {
@ -16,6 +21,11 @@
"save_changes": "Save changes",
"sign_in": "Sign in"
},
"common": {
"not_found": "404 Not Found",
"end_of_list": "End of the list",
"error": "ERROR"
},
"feature_flag": {
"virtual_scroll": "Virtual Scrolling"
},
@ -47,6 +57,17 @@
"notifications": "Notifications",
"profile": "Profile"
},
"nav_user": {
"sign_in_desc": "Sign in to follow profiles or hashtags, favourite, share and reply to posts, or interact from your account on a different server."
},
"notification": {
"followed_you": "followed you",
"request_to_follow": "requested to follow you",
"favourited_post": "favourited your post",
"reblogged_post": "reblogged your post",
"update_status": "updated their status",
"missing_type": "MISSING notification.type:"
},
"state": {
"editing": "Editing",
"uploading": "Uploading..."

View File

@ -1,12 +1,47 @@
{
"account": {
"followers_count": "被 {0} 人关注",
"following_count": "正在关注 {0} 人",
"posts_count": "{0} 条帖文"
"blocked_users": "已@:menu.block的用户",
"blocked_domains": "已@:menu.block的域名",
"favourites": "喜欢的@:post",
"follow": "关注",
"follow_back": "回关",
"follow_requested": "已申请@:account.follow",
"followers_count": "被 {0} 人@:account.follow",
"following_count": "正在@:account.follow {0} 人",
"follows_you": "已@:account.follow你",
"muted_users": "已@:menu.mute的用户",
"posts_count": "{0} 条@:post",
"pinned": "置顶的@:post",
"unfollow": "取消@:account.follow"
},
"action": {
"compose": "撰写",
"enter_app": "进入应用",
"publish": "发布!",
"save_changes": "保存更改",
"sign_in": "登录"
},
"common": {
"not_found": "无法找到相关内容",
"end_of_list": "列表到底啦",
"error": "错误"
},
"feature_flag": {
"virtual_scroll": "虚拟滚动"
},
"menu": {
"block": "拉黑",
"mute": "屏蔽",
"block_account": "@:menu.block {0}",
"block_domain": "@:menu.block域名 {0}",
"direct_message_account": "私信 {0}",
"mention_account": "提及 {0}",
"mute_account": "@:menu.mute {0}",
"open_in_original_site": "从源站打开",
"unblock_account": "解除@:menu.block {0}",
"unblock_domain": "解除@:menu.block域名 {0}",
"unmute_account": "解除@:menu.mute {0}"
},
"nav_footer": {
"select_feature_flags": "功能开关",
"select_language": "选择语言",
@ -24,16 +59,39 @@
"notifications": "通知",
"profile": "个人资料"
},
"nav_user": {
"sign_in_desc": "登录后可关注其他人或标签、点赞、分享和回复@:post或与不同服务器上的账号交互。"
},
"notification": {
"followed_you": "@:account.follow了你",
"request_to_follow": "请求@:account.follow你",
"favourited_post": "点赞了你的@:post",
"reblogged_post": "转发了你的@:post",
"update_status": "更新了他们的状态",
"missing_type": "未知的通知类型:"
},
"post": "帖文",
"state": {
"editing": "编辑中",
"uploading": "上传中..."
},
"tab": {
"media": "媒体",
"posts": "贴文",
"posts_with_replies": "帖文与留言"
"posts": "@:post",
"posts_with_replies": "@:post与留言"
},
"timeline": {
"name": "时间轴"
"name": "时间线",
"show_new_items": "展示 {0} 条新@:post"
},
"title": {
"federated_timeline": "@:nav_side.federated@:timeline.name",
"local_timeline": "@:nav_side.local@:timeline.name"
},
"tooltip": {
"add_content_warning": "添加内容警告标识",
"add_media": "添加图片、视频或者音频文件",
"change_content_visibility": "修改内容是否可见",
"toggle_code_block": "切换代码块"
}
}