From fa7e544a15cf7063d80613cb50bfa6a24497754e Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 10 Feb 2025 13:59:37 +0800 Subject: [PATCH] feat: user manual and help doc support i18n (#2199) Co-authored-by: wangdan-fit2cloud --- ui/src/locales/lang/en-US/layout.ts | 4 +++- ui/src/locales/lang/en-US/views/application-overview.ts | 2 +- ui/src/locales/lang/zh-CN/layout.ts | 4 +++- ui/src/locales/lang/zh-Hant/layout.ts | 4 +++- ui/src/utils/theme.ts | 4 ++-- ui/src/views/application-overview/index.vue | 2 +- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ui/src/locales/lang/en-US/layout.ts b/ui/src/locales/lang/en-US/layout.ts index aaa4a8c6d..d3d2247c1 100644 --- a/ui/src/locales/lang/en-US/layout.ts +++ b/ui/src/locales/lang/en-US/layout.ts @@ -23,5 +23,7 @@ export default { expired: 'expired', expiringSoon: 'expiring soon' }, - copyright: 'Copyright © 2014-2025 FIT2CLOUD, All rights reserved.' + copyright: 'Copyright © 2014-2025 FIT2CLOUD, All rights reserved.', + userManualUrl: 'http://docs.maxkb.hk/', + forumUrl: 'https://github.com/1Panel-dev/MaxKB/discussions' } diff --git a/ui/src/locales/lang/en-US/views/application-overview.ts b/ui/src/locales/lang/en-US/views/application-overview.ts index 4bc01e63a..46d4af045 100644 --- a/ui/src/locales/lang/en-US/views/application-overview.ts +++ b/ui/src/locales/lang/en-US/views/application-overview.ts @@ -21,7 +21,7 @@ export default { }, APIKeyDialog: { saveSettings: 'Save Settings', - msgConfirm1: 'Are you sure you want to delete the API Key?', + msgConfirm1: 'Are you sure you want to delete the API Key', msgConfirm2: 'This action is irreversible. Once deleted, the API Key cannot be recovered. Do you still want to proceed?', enabledSuccess: 'Enabled', diff --git a/ui/src/locales/lang/zh-CN/layout.ts b/ui/src/locales/lang/zh-CN/layout.ts index 39bb67179..3a066f8e3 100644 --- a/ui/src/locales/lang/zh-CN/layout.ts +++ b/ui/src/locales/lang/zh-CN/layout.ts @@ -23,5 +23,7 @@ export default { expired: '已过期', expiringSoon: '即将到期' }, - copyright: '版权所有 © 2014-2025 杭州飞致云信息科技有限公司' + copyright: '版权所有 © 2014-2025 杭州飞致云信息科技有限公司', + userManualUrl: 'https://maxkb.cn/docs/', + forumUrl: 'https://bbs.fit2cloud.com/c/mk/11' } diff --git a/ui/src/locales/lang/zh-Hant/layout.ts b/ui/src/locales/lang/zh-Hant/layout.ts index efa94b4e2..4117faf6a 100644 --- a/ui/src/locales/lang/zh-Hant/layout.ts +++ b/ui/src/locales/lang/zh-Hant/layout.ts @@ -24,5 +24,7 @@ export default { expired: '已過期', expiringSoon: '即將到期' }, - copyright: '版權所有 © 2014-2025 杭州飛致雲信息科技有限公司' + copyright: '版權所有 © 2014-2025 杭州飛致雲信息科技有限公司', + userManualUrl:'https://maxkb.cn/docs/', + forumUrl: 'https://github.com/1Panel-dev/MaxKB/discussions' } diff --git a/ui/src/utils/theme.ts b/ui/src/utils/theme.ts index 13ffd67f8..c1e6ce5d1 100644 --- a/ui/src/utils/theme.ts +++ b/ui/src/utils/theme.ts @@ -42,9 +42,9 @@ export const defaultSetting = { export const defaultPlatformSetting = { showUserManual: true, - userManualUrl: 'https://maxkb.cn/docs/', + userManualUrl: t('layout.userManualUrl'), showForum: true, - forumUrl: 'https://bbs.fit2cloud.com/c/mk/11', + forumUrl: t('layout.forumUrl'), showProject: true, projectUrl: 'https://github.com/1Panel-dev/MaxKB' } diff --git a/ui/src/views/application-overview/index.vue b/ui/src/views/application-overview/index.vue index fd8508b3e..1316041c9 100644 --- a/ui/src/views/application-overview/index.vue +++ b/ui/src/views/application-overview/index.vue @@ -239,7 +239,7 @@ const dayOptions = [ { value: 7, // @ts-ignore - label: t('views.applicationOverview.monitor.pastDayOptions.past7Days') // 使用 t 方法来国际化显示文本 + label: t('views.applicationOverview.monitor.pastDayOptions.past7Days') }, { value: 30,