From bc44b0127d35c315731899947982753bffb1a4ed Mon Sep 17 00:00:00 2001 From: Ayaka Rizumu <464388324@qq.com> Date: Mon, 28 Nov 2022 22:25:32 +0800 Subject: [PATCH] feat(i18n): add title texts (#201) --- locales/en-US.json | 5 +++++ locales/zh-CN.json | 5 +++++ pages/@[account]/index.vue | 4 +++- pages/bookmarks.vue | 6 ++++-- pages/conversations.vue | 6 ++++-- pages/explore.vue | 6 ++++-- pages/notifications.vue | 6 ++++-- pages/public/index.vue | 6 ++++-- pages/public/local.vue | 6 ++++-- 9 files changed, 37 insertions(+), 13 deletions(-) diff --git a/locales/en-US.json b/locales/en-US.json index 512fed4b..dc5a5b1d 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -10,6 +10,11 @@ "bookmarks": "Bookmarks", "profile": "Profile" }, + "timeline": "Timeline", + "title": { + "local-timeline": "@:nav_side.local @:timeline", + "federated-timeline": "@:nav_side.federated @:timeline" + }, "account": { "posts": "{0} Posts", "following": "{0} Following", diff --git a/locales/zh-CN.json b/locales/zh-CN.json index 3399abac..7c9acc2b 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -10,6 +10,11 @@ "notifications": "通知", "profile": "个人资料" }, + "timeline": "时间轴", + "title": { + "local-timeline": "@:nav_side.local@:timeline", + "federated-timeline": "@:nav_side.federated@:timeline" + }, "account": { "followers": "被 {0} 人关注", "following": "正在关注 {0} 人", diff --git a/pages/@[account]/index.vue b/pages/@[account]/index.vue index 0c8c0977..9460992e 100644 --- a/pages/@[account]/index.vue +++ b/pages/@[account]/index.vue @@ -2,6 +2,8 @@ const params = useRoute().params const accountName = $(computedEager(() => toShortHandle(params.account as string))) +const { t } = useI18n() + const { data: account, refresh } = $(await useAsyncData(() => fetchAccountByName(accountName).catch(() => null))) if (account) { @@ -20,7 +22,7 @@ onReactivated(() => {