From 09f80f291b1e37dc6e79a5e476030e8db63aff87 Mon Sep 17 00:00:00 2001 From: Alex <49969959+alexzhang1030@users.noreply.github.com> Date: Tue, 29 Nov 2022 18:55:28 +0800 Subject: [PATCH] feat(i18n): improve translations (#219) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 三咲智子 Kevin Deng Co-authored-by: 沈青川 <46062972+ShenQingchuan@users.noreply.github.com> --- components/account/AccountMoreButton.vue | 30 ++------- components/common/CommonNotFound.vue | 2 +- components/common/CommonPaginator.vue | 4 +- components/notification/NotificationCard.vue | 12 ++-- components/user/UserSignIn.vue | 4 +- components/user/UserSignInEntry.vue | 4 +- locales/en-US.json | 21 ++++++ locales/zh-CN.json | 70 ++++++++++++++++++-- 8 files changed, 103 insertions(+), 44 deletions(-) diff --git a/components/account/AccountMoreButton.vue b/components/account/AccountMoreButton.vue index ac4dcf82..8ecb2fad 100644 --- a/components/account/AccountMoreButton.vue +++ b/components/account/AccountMoreButton.vue @@ -117,39 +117,19 @@ const toggleBlockDomain = async () => { diff --git a/components/common/CommonNotFound.vue b/components/common/CommonNotFound.vue index 1cf80863..18fb7cdf 100644 --- a/components/common/CommonNotFound.vue +++ b/components/common/CommonNotFound.vue @@ -2,7 +2,7 @@
- 404 Not Found + {{ $t('common.not_found') }}
diff --git a/components/common/CommonPaginator.vue b/components/common/CommonPaginator.vue index 963614ee..20a8315b 100644 --- a/components/common/CommonPaginator.vue +++ b/components/common/CommonPaginator.vue @@ -55,10 +55,10 @@ const { items, prevItems, update, state, endAnchor, error } = usePaginator(pagin
- End of the list + {{ $t('common.end_of_list') }}
- ERROR: {{ error }} + {{ $t('common.error') }}: {{ error }}
diff --git a/components/notification/NotificationCard.vue b/components/notification/NotificationCard.vue index 326f102a..eda951ff 100644 --- a/components/notification/NotificationCard.vue +++ b/components/notification/NotificationCard.vue @@ -12,7 +12,7 @@ const { notification } = defineProps<{
- followed you + {{ $t('notification.followed_you') }}
@@ -20,7 +20,7 @@ const { notification } = defineProps<{
- requested to follow you + {{ $t('notification.request_to_follow') }}
@@ -29,7 +29,7 @@ const { notification } = defineProps<{
- favourited your post + {{ $t('notification.favourited_post') }}
@@ -37,7 +37,7 @@ const { notification } = defineProps<{
- reblogged your post + {{ $t('notification.reblogged_post') }}
@@ -45,7 +45,7 @@ const { notification } = defineProps<{
- updated their status + {{ $t('notification.update_status') }}
@@ -54,7 +54,7 @@ const { notification } = defineProps<{ diff --git a/components/user/UserSignIn.vue b/components/user/UserSignIn.vue index bff70e5c..ee5cbd94 100644 --- a/components/user/UserSignIn.vue +++ b/components/user/UserSignIn.vue @@ -18,7 +18,7 @@ async function handleInput() { diff --git a/components/user/UserSignInEntry.vue b/components/user/UserSignInEntry.vue index 62b46cbc..96a8dd6a 100644 --- a/components/user/UserSignInEntry.vue +++ b/components/user/UserSignInEntry.vue @@ -1,10 +1,10 @@ diff --git a/locales/en-US.json b/locales/en-US.json index 63b68687..71ac894f 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -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..." diff --git a/locales/zh-CN.json b/locales/zh-CN.json index 544bff7b..8ef8c3c3 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -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": "切换代码块" } }